Lines Matching refs:send_ctx
227 struct smb_direct_send_ctx *send_ctx,
919 struct smb_direct_send_ctx *send_ctx, in smb_direct_send_ctx_init() argument
923 INIT_LIST_HEAD(&send_ctx->msg_list); in smb_direct_send_ctx_init()
924 send_ctx->wr_cnt = 0; in smb_direct_send_ctx_init()
925 send_ctx->need_invalidate_rkey = need_invalidate_rkey; in smb_direct_send_ctx_init()
926 send_ctx->remote_key = remote_key; in smb_direct_send_ctx_init()
930 struct smb_direct_send_ctx *send_ctx, in smb_direct_flush_send_list() argument
936 if (list_empty(&send_ctx->msg_list)) in smb_direct_flush_send_list()
939 first = list_first_entry(&send_ctx->msg_list, in smb_direct_flush_send_list()
942 last = list_last_entry(&send_ctx->msg_list, in smb_direct_flush_send_list()
948 if (is_last && send_ctx->need_invalidate_rkey) { in smb_direct_flush_send_list()
950 last->wr.ex.invalidate_rkey = send_ctx->remote_key; in smb_direct_flush_send_list()
955 smb_direct_send_ctx_init(t, send_ctx, in smb_direct_flush_send_list()
956 send_ctx->need_invalidate_rkey, in smb_direct_flush_send_list()
957 send_ctx->remote_key); in smb_direct_flush_send_list()
959 atomic_add(send_ctx->wr_cnt, &t->send_credits); in smb_direct_flush_send_list()
961 list_for_each_entry_safe(first, last, &send_ctx->msg_list, in smb_direct_flush_send_list()
992 struct smb_direct_send_ctx *send_ctx) in wait_for_send_credits() argument
996 if (send_ctx && in wait_for_send_credits()
997 (send_ctx->wr_cnt >= 16 || atomic_read(&t->send_credits) <= 1)) { in wait_for_send_credits()
998 ret = smb_direct_flush_send_list(t, send_ctx, false); in wait_for_send_credits()
1124 struct smb_direct_send_ctx *send_ctx, in post_sendmsg() argument
1140 if (send_ctx) { in post_sendmsg()
1143 if (!list_empty(&send_ctx->msg_list)) { in post_sendmsg()
1146 last = list_last_entry(&send_ctx->msg_list, in post_sendmsg()
1151 list_add_tail(&msg->list, &send_ctx->msg_list); in post_sendmsg()
1152 send_ctx->wr_cnt++; in post_sendmsg()
1162 struct smb_direct_send_ctx *send_ctx, in smb_direct_post_send_data() argument
1171 ret = wait_for_send_credits(t, send_ctx); in smb_direct_post_send_data()
1216 ret = post_sendmsg(t, send_ctx, msg); in smb_direct_post_send_data()
1237 struct smb_direct_send_ctx send_ctx; in smb_direct_writev() local
1248 smb_direct_send_ctx_init(st, &send_ctx, need_invalidate, remote_key); in smb_direct_writev()
1257 ret = smb_direct_post_send_data(st, &send_ctx, in smb_direct_writev()
1275 ret = smb_direct_post_send_data(st, &send_ctx, &vec, 1, in smb_direct_writev()
1291 ret = smb_direct_post_send_data(st, &send_ctx, in smb_direct_writev()
1302 ret = smb_direct_flush_send_list(st, &send_ctx, true); in smb_direct_writev()