Lines Matching refs:csk

326 static inline void cxgbi_sock_set_flag(struct cxgbi_sock *csk,  in cxgbi_sock_set_flag()  argument
329 __set_bit(flag, &csk->flags); in cxgbi_sock_set_flag()
332 csk, csk->state, csk->flags, flag); in cxgbi_sock_set_flag()
335 static inline void cxgbi_sock_clear_flag(struct cxgbi_sock *csk, in cxgbi_sock_clear_flag() argument
338 __clear_bit(flag, &csk->flags); in cxgbi_sock_clear_flag()
341 csk, csk->state, csk->flags, flag); in cxgbi_sock_clear_flag()
344 static inline int cxgbi_sock_flag(struct cxgbi_sock *csk, in cxgbi_sock_flag() argument
347 if (csk == NULL) in cxgbi_sock_flag()
349 return test_bit(flag, &csk->flags); in cxgbi_sock_flag()
352 static inline void cxgbi_sock_set_state(struct cxgbi_sock *csk, int state) in cxgbi_sock_set_state() argument
356 csk, csk->state, csk->flags, state); in cxgbi_sock_set_state()
357 csk->state = state; in cxgbi_sock_set_state()
362 struct cxgbi_sock *csk = container_of(kref, in cxgbi_sock_free() local
365 if (csk) { in cxgbi_sock_free()
368 csk, csk->state, csk->flags); in cxgbi_sock_free()
369 kfree(csk); in cxgbi_sock_free()
373 static inline void __cxgbi_sock_put(const char *fn, struct cxgbi_sock *csk) in __cxgbi_sock_put() argument
377 fn, csk, atomic_read(&csk->refcnt.refcount)); in __cxgbi_sock_put()
378 kref_put(&csk->refcnt, cxgbi_sock_free); in __cxgbi_sock_put()
380 #define cxgbi_sock_put(csk) __cxgbi_sock_put(__func__, csk) argument
382 static inline void __cxgbi_sock_get(const char *fn, struct cxgbi_sock *csk) in __cxgbi_sock_get() argument
386 fn, csk, atomic_read(&csk->refcnt.refcount)); in __cxgbi_sock_get()
387 kref_get(&csk->refcnt); in __cxgbi_sock_get()
389 #define cxgbi_sock_get(csk) __cxgbi_sock_get(__func__, csk) argument
391 static inline int cxgbi_sock_is_closing(struct cxgbi_sock *csk) in cxgbi_sock_is_closing() argument
393 return csk->state >= CTP_ACTIVE_CLOSE; in cxgbi_sock_is_closing()
396 static inline int cxgbi_sock_is_established(struct cxgbi_sock *csk) in cxgbi_sock_is_established() argument
398 return csk->state == CTP_ESTABLISHED; in cxgbi_sock_is_established()
401 static inline void cxgbi_sock_purge_write_queue(struct cxgbi_sock *csk) in cxgbi_sock_purge_write_queue() argument
405 while ((skb = __skb_dequeue(&csk->write_queue))) in cxgbi_sock_purge_write_queue()
439 static inline void cxgbi_sock_reset_wr_list(struct cxgbi_sock *csk) in cxgbi_sock_reset_wr_list() argument
441 csk->wr_pending_head = csk->wr_pending_tail = NULL; in cxgbi_sock_reset_wr_list()
444 static inline void cxgbi_sock_enqueue_wr(struct cxgbi_sock *csk, in cxgbi_sock_enqueue_wr() argument
456 if (!csk->wr_pending_head) in cxgbi_sock_enqueue_wr()
457 csk->wr_pending_head = skb; in cxgbi_sock_enqueue_wr()
459 cxgbi_skcb_tx_wr_next(csk->wr_pending_tail) = skb; in cxgbi_sock_enqueue_wr()
460 csk->wr_pending_tail = skb; in cxgbi_sock_enqueue_wr()
463 static inline int cxgbi_sock_count_pending_wrs(const struct cxgbi_sock *csk) in cxgbi_sock_count_pending_wrs() argument
466 const struct sk_buff *skb = csk->wr_pending_head; in cxgbi_sock_count_pending_wrs()
475 static inline struct sk_buff *cxgbi_sock_peek_wr(const struct cxgbi_sock *csk) in cxgbi_sock_peek_wr() argument
477 return csk->wr_pending_head; in cxgbi_sock_peek_wr()
480 static inline struct sk_buff *cxgbi_sock_dequeue_wr(struct cxgbi_sock *csk) in cxgbi_sock_dequeue_wr() argument
482 struct sk_buff *skb = csk->wr_pending_head; in cxgbi_sock_dequeue_wr()
485 csk->wr_pending_head = cxgbi_skcb_tx_wr_next(skb); in cxgbi_sock_dequeue_wr()
588 struct cxgbi_sock *csk; member