Lines Matching refs:csk

83 #define cxgbi_is_iso_config(csk)	((csk)->cdev->skb_iso_txhdr)  argument
84 #define cxgbi_is_iso_disabled(csk) ((csk)->disable_iso) argument
273 static inline void cxgbi_sock_set_flag(struct cxgbi_sock *csk, in cxgbi_sock_set_flag() argument
276 __set_bit(flag, &csk->flags); in cxgbi_sock_set_flag()
279 csk, csk->state, csk->flags, flag); in cxgbi_sock_set_flag()
282 static inline void cxgbi_sock_clear_flag(struct cxgbi_sock *csk, in cxgbi_sock_clear_flag() argument
285 __clear_bit(flag, &csk->flags); in cxgbi_sock_clear_flag()
288 csk, csk->state, csk->flags, flag); in cxgbi_sock_clear_flag()
291 static inline int cxgbi_sock_flag(struct cxgbi_sock *csk, in cxgbi_sock_flag() argument
294 if (csk == NULL) in cxgbi_sock_flag()
296 return test_bit(flag, &csk->flags); in cxgbi_sock_flag()
299 static inline void cxgbi_sock_set_state(struct cxgbi_sock *csk, int state) in cxgbi_sock_set_state() argument
303 csk, csk->state, csk->flags, state); in cxgbi_sock_set_state()
304 csk->state = state; in cxgbi_sock_set_state()
309 struct cxgbi_sock *csk = container_of(kref, in cxgbi_sock_free() local
312 if (csk) { in cxgbi_sock_free()
315 csk, csk->state, csk->flags); in cxgbi_sock_free()
316 kfree(csk); in cxgbi_sock_free()
320 static inline void __cxgbi_sock_put(const char *fn, struct cxgbi_sock *csk) in __cxgbi_sock_put() argument
324 fn, csk, kref_read(&csk->refcnt)); in __cxgbi_sock_put()
325 kref_put(&csk->refcnt, cxgbi_sock_free); in __cxgbi_sock_put()
327 #define cxgbi_sock_put(csk) __cxgbi_sock_put(__func__, csk) argument
329 static inline void __cxgbi_sock_get(const char *fn, struct cxgbi_sock *csk) in __cxgbi_sock_get() argument
333 fn, csk, kref_read(&csk->refcnt)); in __cxgbi_sock_get()
334 kref_get(&csk->refcnt); in __cxgbi_sock_get()
336 #define cxgbi_sock_get(csk) __cxgbi_sock_get(__func__, csk) argument
338 static inline int cxgbi_sock_is_closing(struct cxgbi_sock *csk) in cxgbi_sock_is_closing() argument
340 return csk->state >= CTP_ACTIVE_CLOSE; in cxgbi_sock_is_closing()
343 static inline int cxgbi_sock_is_established(struct cxgbi_sock *csk) in cxgbi_sock_is_established() argument
345 return csk->state == CTP_ESTABLISHED; in cxgbi_sock_is_established()
348 static inline void cxgbi_sock_purge_write_queue(struct cxgbi_sock *csk) in cxgbi_sock_purge_write_queue() argument
352 while ((skb = __skb_dequeue(&csk->write_queue))) in cxgbi_sock_purge_write_queue()
386 static inline void cxgbi_sock_reset_wr_list(struct cxgbi_sock *csk) in cxgbi_sock_reset_wr_list() argument
388 csk->wr_pending_head = csk->wr_pending_tail = NULL; in cxgbi_sock_reset_wr_list()
391 static inline void cxgbi_sock_enqueue_wr(struct cxgbi_sock *csk, in cxgbi_sock_enqueue_wr() argument
401 if (!csk->wr_pending_head) in cxgbi_sock_enqueue_wr()
402 csk->wr_pending_head = skb; in cxgbi_sock_enqueue_wr()
404 cxgbi_skcb_tx_wr_next(csk->wr_pending_tail) = skb; in cxgbi_sock_enqueue_wr()
405 csk->wr_pending_tail = skb; in cxgbi_sock_enqueue_wr()
408 static inline int cxgbi_sock_count_pending_wrs(const struct cxgbi_sock *csk) in cxgbi_sock_count_pending_wrs() argument
411 const struct sk_buff *skb = csk->wr_pending_head; in cxgbi_sock_count_pending_wrs()
420 static inline struct sk_buff *cxgbi_sock_peek_wr(const struct cxgbi_sock *csk) in cxgbi_sock_peek_wr() argument
422 return csk->wr_pending_head; in cxgbi_sock_peek_wr()
425 static inline struct sk_buff *cxgbi_sock_dequeue_wr(struct cxgbi_sock *csk) in cxgbi_sock_dequeue_wr() argument
427 struct sk_buff *skb = csk->wr_pending_head; in cxgbi_sock_dequeue_wr()
430 csk->wr_pending_head = cxgbi_skcb_tx_wr_next(skb); in cxgbi_sock_dequeue_wr()
539 struct cxgbi_sock *csk; member