Lines Matching refs:csk

84 #define cxgbi_is_iso_config(csk)	((csk)->cdev->skb_iso_txhdr)
85 #define cxgbi_is_iso_disabled(csk) ((csk)->disable_iso)
274 static inline void cxgbi_sock_set_flag(struct cxgbi_sock *csk,
277 __set_bit(flag, &csk->flags);
279 "csk 0x%p,%u,0x%lx, bit %d.\n",
280 csk, csk->state, csk->flags, flag);
283 static inline void cxgbi_sock_clear_flag(struct cxgbi_sock *csk,
286 __clear_bit(flag, &csk->flags);
288 "csk 0x%p,%u,0x%lx, bit %d.\n",
289 csk, csk->state, csk->flags, flag);
292 static inline int cxgbi_sock_flag(struct cxgbi_sock *csk,
295 if (csk == NULL)
297 return test_bit(flag, &csk->flags);
300 static inline void cxgbi_sock_set_state(struct cxgbi_sock *csk, int state)
303 "csk 0x%p,%u,0x%lx, state -> %u.\n",
304 csk, csk->state, csk->flags, state);
305 csk->state = state;
310 struct cxgbi_sock *csk = container_of(kref,
313 if (csk) {
315 "free csk 0x%p, state %u, flags 0x%lx\n",
316 csk, csk->state, csk->flags);
317 kfree(csk);
321 static inline void __cxgbi_sock_put(const char *fn, struct cxgbi_sock *csk)
324 "%s, put csk 0x%p, ref %u-1.\n",
325 fn, csk, kref_read(&csk->refcnt));
326 kref_put(&csk->refcnt, cxgbi_sock_free);
328 #define cxgbi_sock_put(csk) __cxgbi_sock_put(__func__, csk)
330 static inline void __cxgbi_sock_get(const char *fn, struct cxgbi_sock *csk)
333 "%s, get csk 0x%p, ref %u+1.\n",
334 fn, csk, kref_read(&csk->refcnt));
335 kref_get(&csk->refcnt);
337 #define cxgbi_sock_get(csk) __cxgbi_sock_get(__func__, csk)
339 static inline int cxgbi_sock_is_closing(struct cxgbi_sock *csk)
341 return csk->state >= CTP_ACTIVE_CLOSE;
344 static inline int cxgbi_sock_is_established(struct cxgbi_sock *csk)
346 return csk->state == CTP_ESTABLISHED;
349 static inline void cxgbi_sock_purge_write_queue(struct cxgbi_sock *csk)
353 while ((skb = __skb_dequeue(&csk->write_queue)))
387 static inline void cxgbi_sock_reset_wr_list(struct cxgbi_sock *csk)
389 csk->wr_pending_head = csk->wr_pending_tail = NULL;
392 static inline void cxgbi_sock_enqueue_wr(struct cxgbi_sock *csk,
402 if (!csk->wr_pending_head)
403 csk->wr_pending_head = skb;
405 cxgbi_skcb_tx_wr_next(csk->wr_pending_tail) = skb;
406 csk->wr_pending_tail = skb;
409 static inline int cxgbi_sock_count_pending_wrs(const struct cxgbi_sock *csk)
412 const struct sk_buff *skb = csk->wr_pending_head;
421 static inline struct sk_buff *cxgbi_sock_peek_wr(const struct cxgbi_sock *csk)
423 return csk->wr_pending_head;
426 static inline struct sk_buff *cxgbi_sock_dequeue_wr(struct cxgbi_sock *csk)
428 struct sk_buff *skb = csk->wr_pending_head;
431 csk->wr_pending_head = cxgbi_skcb_tx_wr_next(skb);
540 struct cxgbi_sock *csk;