Lines Matching refs:csk

328 static inline void cxgbi_sock_set_flag(struct cxgbi_sock *csk,  in cxgbi_sock_set_flag()  argument
331 __set_bit(flag, &csk->flags); in cxgbi_sock_set_flag()
334 csk, csk->state, csk->flags, flag); in cxgbi_sock_set_flag()
337 static inline void cxgbi_sock_clear_flag(struct cxgbi_sock *csk, in cxgbi_sock_clear_flag() argument
340 __clear_bit(flag, &csk->flags); in cxgbi_sock_clear_flag()
343 csk, csk->state, csk->flags, flag); in cxgbi_sock_clear_flag()
346 static inline int cxgbi_sock_flag(struct cxgbi_sock *csk, in cxgbi_sock_flag() argument
349 if (csk == NULL) in cxgbi_sock_flag()
351 return test_bit(flag, &csk->flags); in cxgbi_sock_flag()
354 static inline void cxgbi_sock_set_state(struct cxgbi_sock *csk, int state) in cxgbi_sock_set_state() argument
358 csk, csk->state, csk->flags, state); in cxgbi_sock_set_state()
359 csk->state = state; in cxgbi_sock_set_state()
364 struct cxgbi_sock *csk = container_of(kref, in cxgbi_sock_free() local
367 if (csk) { in cxgbi_sock_free()
370 csk, csk->state, csk->flags); in cxgbi_sock_free()
371 kfree(csk); in cxgbi_sock_free()
375 static inline void __cxgbi_sock_put(const char *fn, struct cxgbi_sock *csk) in __cxgbi_sock_put() argument
379 fn, csk, atomic_read(&csk->refcnt.refcount)); in __cxgbi_sock_put()
380 kref_put(&csk->refcnt, cxgbi_sock_free); in __cxgbi_sock_put()
382 #define cxgbi_sock_put(csk) __cxgbi_sock_put(__func__, csk) argument
384 static inline void __cxgbi_sock_get(const char *fn, struct cxgbi_sock *csk) in __cxgbi_sock_get() argument
388 fn, csk, atomic_read(&csk->refcnt.refcount)); in __cxgbi_sock_get()
389 kref_get(&csk->refcnt); in __cxgbi_sock_get()
391 #define cxgbi_sock_get(csk) __cxgbi_sock_get(__func__, csk) argument
393 static inline int cxgbi_sock_is_closing(struct cxgbi_sock *csk) in cxgbi_sock_is_closing() argument
395 return csk->state >= CTP_ACTIVE_CLOSE; in cxgbi_sock_is_closing()
398 static inline int cxgbi_sock_is_established(struct cxgbi_sock *csk) in cxgbi_sock_is_established() argument
400 return csk->state == CTP_ESTABLISHED; in cxgbi_sock_is_established()
403 static inline void cxgbi_sock_purge_write_queue(struct cxgbi_sock *csk) in cxgbi_sock_purge_write_queue() argument
407 while ((skb = __skb_dequeue(&csk->write_queue))) in cxgbi_sock_purge_write_queue()
441 static inline void cxgbi_sock_reset_wr_list(struct cxgbi_sock *csk) in cxgbi_sock_reset_wr_list() argument
443 csk->wr_pending_head = csk->wr_pending_tail = NULL; in cxgbi_sock_reset_wr_list()
446 static inline void cxgbi_sock_enqueue_wr(struct cxgbi_sock *csk, in cxgbi_sock_enqueue_wr() argument
458 if (!csk->wr_pending_head) in cxgbi_sock_enqueue_wr()
459 csk->wr_pending_head = skb; in cxgbi_sock_enqueue_wr()
461 cxgbi_skcb_tx_wr_next(csk->wr_pending_tail) = skb; in cxgbi_sock_enqueue_wr()
462 csk->wr_pending_tail = skb; in cxgbi_sock_enqueue_wr()
465 static inline int cxgbi_sock_count_pending_wrs(const struct cxgbi_sock *csk) in cxgbi_sock_count_pending_wrs() argument
468 const struct sk_buff *skb = csk->wr_pending_head; in cxgbi_sock_count_pending_wrs()
477 static inline struct sk_buff *cxgbi_sock_peek_wr(const struct cxgbi_sock *csk) in cxgbi_sock_peek_wr() argument
479 return csk->wr_pending_head; in cxgbi_sock_peek_wr()
482 static inline struct sk_buff *cxgbi_sock_dequeue_wr(struct cxgbi_sock *csk) in cxgbi_sock_dequeue_wr() argument
484 struct sk_buff *skb = csk->wr_pending_head; in cxgbi_sock_dequeue_wr()
487 csk->wr_pending_head = cxgbi_skcb_tx_wr_next(skb); in cxgbi_sock_dequeue_wr()
588 struct cxgbi_sock *csk; member