Lines Matching refs:csk
84 #define cxgbi_is_iso_config(csk) ((csk)->cdev->skb_iso_txhdr) argument
85 #define cxgbi_is_iso_disabled(csk) ((csk)->disable_iso) argument
274 static inline void cxgbi_sock_set_flag(struct cxgbi_sock *csk, in cxgbi_sock_set_flag() argument
277 __set_bit(flag, &csk->flags); in cxgbi_sock_set_flag()
280 csk, csk->state, csk->flags, flag); in cxgbi_sock_set_flag()
283 static inline void cxgbi_sock_clear_flag(struct cxgbi_sock *csk, in cxgbi_sock_clear_flag() argument
286 __clear_bit(flag, &csk->flags); in cxgbi_sock_clear_flag()
289 csk, csk->state, csk->flags, flag); in cxgbi_sock_clear_flag()
292 static inline int cxgbi_sock_flag(struct cxgbi_sock *csk, in cxgbi_sock_flag() argument
295 if (csk == NULL) in cxgbi_sock_flag()
297 return test_bit(flag, &csk->flags); in cxgbi_sock_flag()
300 static inline void cxgbi_sock_set_state(struct cxgbi_sock *csk, int state) in cxgbi_sock_set_state() argument
304 csk, csk->state, csk->flags, state); in cxgbi_sock_set_state()
305 csk->state = state; in cxgbi_sock_set_state()
310 struct cxgbi_sock *csk = container_of(kref, in cxgbi_sock_free() local
313 if (csk) { in cxgbi_sock_free()
316 csk, csk->state, csk->flags); in cxgbi_sock_free()
317 kfree(csk); in cxgbi_sock_free()
321 static inline void __cxgbi_sock_put(const char *fn, struct cxgbi_sock *csk) in __cxgbi_sock_put() argument
325 fn, csk, kref_read(&csk->refcnt)); in __cxgbi_sock_put()
326 kref_put(&csk->refcnt, cxgbi_sock_free); in __cxgbi_sock_put()
328 #define cxgbi_sock_put(csk) __cxgbi_sock_put(__func__, csk) argument
330 static inline void __cxgbi_sock_get(const char *fn, struct cxgbi_sock *csk) in __cxgbi_sock_get() argument
334 fn, csk, kref_read(&csk->refcnt)); in __cxgbi_sock_get()
335 kref_get(&csk->refcnt); in __cxgbi_sock_get()
337 #define cxgbi_sock_get(csk) __cxgbi_sock_get(__func__, csk) argument
339 static inline int cxgbi_sock_is_closing(struct cxgbi_sock *csk) in cxgbi_sock_is_closing() argument
341 return csk->state >= CTP_ACTIVE_CLOSE; in cxgbi_sock_is_closing()
344 static inline int cxgbi_sock_is_established(struct cxgbi_sock *csk) in cxgbi_sock_is_established() argument
346 return csk->state == CTP_ESTABLISHED; in cxgbi_sock_is_established()
349 static inline void cxgbi_sock_purge_write_queue(struct cxgbi_sock *csk) in cxgbi_sock_purge_write_queue() argument
353 while ((skb = __skb_dequeue(&csk->write_queue))) in cxgbi_sock_purge_write_queue()
387 static inline void cxgbi_sock_reset_wr_list(struct cxgbi_sock *csk) in cxgbi_sock_reset_wr_list() argument
389 csk->wr_pending_head = csk->wr_pending_tail = NULL; in cxgbi_sock_reset_wr_list()
392 static inline void cxgbi_sock_enqueue_wr(struct cxgbi_sock *csk, in cxgbi_sock_enqueue_wr() argument
402 if (!csk->wr_pending_head) in cxgbi_sock_enqueue_wr()
403 csk->wr_pending_head = skb; in cxgbi_sock_enqueue_wr()
405 cxgbi_skcb_tx_wr_next(csk->wr_pending_tail) = skb; in cxgbi_sock_enqueue_wr()
406 csk->wr_pending_tail = skb; in cxgbi_sock_enqueue_wr()
409 static inline int cxgbi_sock_count_pending_wrs(const struct cxgbi_sock *csk) in cxgbi_sock_count_pending_wrs() argument
412 const struct sk_buff *skb = csk->wr_pending_head; in cxgbi_sock_count_pending_wrs()
421 static inline struct sk_buff *cxgbi_sock_peek_wr(const struct cxgbi_sock *csk) in cxgbi_sock_peek_wr() argument
423 return csk->wr_pending_head; in cxgbi_sock_peek_wr()
426 static inline struct sk_buff *cxgbi_sock_dequeue_wr(struct cxgbi_sock *csk) in cxgbi_sock_dequeue_wr() argument
428 struct sk_buff *skb = csk->wr_pending_head; in cxgbi_sock_dequeue_wr()
431 csk->wr_pending_head = cxgbi_skcb_tx_wr_next(skb); in cxgbi_sock_dequeue_wr()
540 struct cxgbi_sock *csk; member