Lines Matching refs:ses
15 void tst_crypto_open(struct tst_crypto_session *ses) in tst_crypto_open() argument
27 ses->fd = ret; in tst_crypto_open()
28 ses->seq_num = 0; in tst_crypto_open()
31 void tst_crypto_close(struct tst_crypto_session *ses) in tst_crypto_close() argument
33 SAFE_CLOSE(ses->fd); in tst_crypto_close()
36 static int tst_crypto_recv_ack(struct tst_crypto_session *ses) in tst_crypto_recv_ack() argument
42 len = SAFE_NETLINK_RECV(ses->fd, buf, sizeof(buf)); in tst_crypto_recv_ack()
47 if (nh->nlmsg_seq != ses->seq_num) { in tst_crypto_recv_ack()
50 nh->nlmsg_type, nh->nlmsg_seq, ses->seq_num); in tst_crypto_recv_ack()
68 int tst_crypto_add_alg(struct tst_crypto_session *ses, in tst_crypto_add_alg() argument
75 .nlmsg_seq = ++(ses->seq_num), in tst_crypto_add_alg()
79 SAFE_NETLINK_SEND(ses->fd, &nh, alg); in tst_crypto_add_alg()
81 return tst_crypto_recv_ack(ses); in tst_crypto_add_alg()
84 int tst_crypto_del_alg(struct tst_crypto_session *ses, in tst_crypto_del_alg() argument
97 nh.nlmsg_seq = ++(ses->seq_num), in tst_crypto_del_alg()
99 SAFE_NETLINK_SEND(ses->fd, &nh, alg); in tst_crypto_del_alg()
101 ret = tst_crypto_recv_ack(ses); in tst_crypto_del_alg()
102 if (ret != -EBUSY || i >= ses->retries) in tst_crypto_del_alg()