Lines Matching full:cb

64 	struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb;  in nfp_ccm_mbox_msg_init()  local
66 cb->state = NFP_NET_MBOX_CMSG_STATE_QUEUED; in nfp_ccm_mbox_msg_init()
67 cb->err = 0; in nfp_ccm_mbox_msg_init()
68 cb->max_len = max_len; in nfp_ccm_mbox_msg_init()
69 cb->exp_reply = exp_reply; in nfp_ccm_mbox_msg_init()
70 cb->posted = false; in nfp_ccm_mbox_msg_init()
75 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_maxlen() local
77 return cb->max_len; in nfp_ccm_mbox_maxlen()
82 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_done() local
84 return cb->state == NFP_NET_MBOX_CMSG_STATE_DONE; in nfp_ccm_mbox_done()
89 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_in_progress() local
91 return cb->state != NFP_NET_MBOX_CMSG_STATE_QUEUED && in nfp_ccm_mbox_in_progress()
92 cb->state != NFP_NET_MBOX_CMSG_STATE_NEXT; in nfp_ccm_mbox_in_progress()
97 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_set_busy() local
99 cb->state = NFP_NET_MBOX_CMSG_STATE_BUSY; in nfp_ccm_mbox_set_busy()
104 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_is_posted() local
106 return cb->posted; in nfp_ccm_mbox_is_posted()
111 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_mark_posted() local
113 cb->posted = true; in nfp_ccm_mbox_mark_posted()
123 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_should_run() local
125 return cb->state == NFP_NET_MBOX_CMSG_STATE_NEXT; in nfp_ccm_mbox_should_run()
130 struct nfp_ccm_mbox_cmsg_cb *cb; in nfp_ccm_mbox_mark_next_runner() local
137 cb = (void *)skb->cb; in nfp_ccm_mbox_mark_next_runner()
138 cb->state = NFP_NET_MBOX_CMSG_STATE_NEXT; in nfp_ccm_mbox_mark_next_runner()
139 if (cb->posted) in nfp_ccm_mbox_mark_next_runner()
216 struct nfp_ccm_mbox_cmsg_cb *cb; in nfp_ccm_mbox_copy_out() local
268 cb = (void *)skb->cb; in nfp_ccm_mbox_copy_out()
274 cb->err = -EIO; in nfp_ccm_mbox_copy_out()
282 cb->err = -EIO; in nfp_ccm_mbox_copy_out()
285 if (cb->exp_reply && length != cb->exp_reply) { in nfp_ccm_mbox_copy_out()
287 hdr.type, length, cb->exp_reply); in nfp_ccm_mbox_copy_out()
288 cb->err = -EIO; in nfp_ccm_mbox_copy_out()
291 if (length > cb->max_len) { in nfp_ccm_mbox_copy_out()
293 hdr.type, cb->max_len, length); in nfp_ccm_mbox_copy_out()
294 cb->err = -EIO; in nfp_ccm_mbox_copy_out()
298 if (!cb->posted) { in nfp_ccm_mbox_copy_out()
319 cb->state = NFP_NET_MBOX_CMSG_STATE_REPLY_FOUND; in nfp_ccm_mbox_copy_out()
329 smp_wmb(); /* order the skb->data vs. cb->state */ in nfp_ccm_mbox_copy_out()
333 cb = (void *)skb->cb; in nfp_ccm_mbox_copy_out()
335 if (cb->state != NFP_NET_MBOX_CMSG_STATE_REPLY_FOUND) { in nfp_ccm_mbox_copy_out()
336 cb->err = -ENOENT; in nfp_ccm_mbox_copy_out()
337 smp_wmb(); /* order the cb->err vs. cb->state */ in nfp_ccm_mbox_copy_out()
339 cb->state = NFP_NET_MBOX_CMSG_STATE_DONE; in nfp_ccm_mbox_copy_out()
341 if (cb->posted) { in nfp_ccm_mbox_copy_out()
342 if (cb->err) in nfp_ccm_mbox_copy_out()
345 nfp_ccm_get_type(skb), cb->err); in nfp_ccm_mbox_copy_out()
357 struct nfp_ccm_mbox_cmsg_cb *cb; in nfp_ccm_mbox_mark_all_err() local
363 cb = (void *)skb->cb; in nfp_ccm_mbox_mark_all_err()
365 cb->err = err; in nfp_ccm_mbox_mark_all_err()
366 smp_wmb(); /* order the cb->err vs. cb->state */ in nfp_ccm_mbox_mark_all_err()
367 cb->state = NFP_NET_MBOX_CMSG_STATE_DONE; in nfp_ccm_mbox_mark_all_err()
422 struct nfp_ccm_mbox_cmsg_cb *cb = (void *)skb->cb; in nfp_ccm_mbox_skb_return() local
424 if (cb->err) in nfp_ccm_mbox_skb_return()
426 return cb->err; in nfp_ccm_mbox_skb_return()