Lines Matching refs:ses
27 void tst_crypto_open(struct tst_crypto_session *ses) in tst_crypto_open() argument
38 ses->fd = TST_RET; in tst_crypto_open()
39 ses->seq_num = 0; in tst_crypto_open()
42 void tst_crypto_close(struct tst_crypto_session *ses) in tst_crypto_close() argument
44 SAFE_CLOSE(ses->fd); in tst_crypto_close()
47 static int tst_crypto_recv_ack(struct tst_crypto_session *ses) in tst_crypto_recv_ack() argument
53 len = SAFE_NETLINK_RECV(ses->fd, buf, sizeof(buf)); in tst_crypto_recv_ack()
58 if (nh->nlmsg_seq != ses->seq_num) { in tst_crypto_recv_ack()
61 nh->nlmsg_type, nh->nlmsg_seq, ses->seq_num); in tst_crypto_recv_ack()
79 int tst_crypto_add_alg(struct tst_crypto_session *ses, in tst_crypto_add_alg() argument
86 .nlmsg_seq = ++(ses->seq_num), in tst_crypto_add_alg()
90 SAFE_NETLINK_SEND(ses->fd, &nh, alg); in tst_crypto_add_alg()
92 return tst_crypto_recv_ack(ses); in tst_crypto_add_alg()
95 int tst_crypto_del_alg(struct tst_crypto_session *ses, in tst_crypto_del_alg() argument
107 nh.nlmsg_seq = ++(ses->seq_num), in tst_crypto_del_alg()
109 SAFE_NETLINK_SEND(ses->fd, &nh, alg); in tst_crypto_del_alg()
111 TEST(tst_crypto_recv_ack(ses)); in tst_crypto_del_alg()
112 if (TST_RET != -EBUSY || i >= ses->retries) in tst_crypto_del_alg()