Lines Matching refs:csk
83 #define cxgbi_is_iso_config(csk) ((csk)->cdev->skb_iso_txhdr)
84 #define cxgbi_is_iso_disabled(csk) ((csk)->disable_iso)
273 static inline void cxgbi_sock_set_flag(struct cxgbi_sock *csk,
276 __set_bit(flag, &csk->flags);
278 "csk 0x%p,%u,0x%lx, bit %d.\n",
279 csk, csk->state, csk->flags, flag);
282 static inline void cxgbi_sock_clear_flag(struct cxgbi_sock *csk,
285 __clear_bit(flag, &csk->flags);
287 "csk 0x%p,%u,0x%lx, bit %d.\n",
288 csk, csk->state, csk->flags, flag);
291 static inline int cxgbi_sock_flag(struct cxgbi_sock *csk,
294 if (csk == NULL)
296 return test_bit(flag, &csk->flags);
299 static inline void cxgbi_sock_set_state(struct cxgbi_sock *csk, int state)
302 "csk 0x%p,%u,0x%lx, state -> %u.\n",
303 csk, csk->state, csk->flags, state);
304 csk->state = state;
309 struct cxgbi_sock *csk = container_of(kref,
312 if (csk) {
314 "free csk 0x%p, state %u, flags 0x%lx\n",
315 csk, csk->state, csk->flags);
316 kfree(csk);
320 static inline void __cxgbi_sock_put(const char *fn, struct cxgbi_sock *csk)
323 "%s, put csk 0x%p, ref %u-1.\n",
324 fn, csk, kref_read(&csk->refcnt));
325 kref_put(&csk->refcnt, cxgbi_sock_free);
327 #define cxgbi_sock_put(csk) __cxgbi_sock_put(__func__, csk)
329 static inline void __cxgbi_sock_get(const char *fn, struct cxgbi_sock *csk)
332 "%s, get csk 0x%p, ref %u+1.\n",
333 fn, csk, kref_read(&csk->refcnt));
334 kref_get(&csk->refcnt);
336 #define cxgbi_sock_get(csk) __cxgbi_sock_get(__func__, csk)
338 static inline int cxgbi_sock_is_closing(struct cxgbi_sock *csk)
340 return csk->state >= CTP_ACTIVE_CLOSE;
343 static inline int cxgbi_sock_is_established(struct cxgbi_sock *csk)
345 return csk->state == CTP_ESTABLISHED;
348 static inline void cxgbi_sock_purge_write_queue(struct cxgbi_sock *csk)
352 while ((skb = __skb_dequeue(&csk->write_queue)))
386 static inline void cxgbi_sock_reset_wr_list(struct cxgbi_sock *csk)
388 csk->wr_pending_head = csk->wr_pending_tail = NULL;
391 static inline void cxgbi_sock_enqueue_wr(struct cxgbi_sock *csk,
401 if (!csk->wr_pending_head)
402 csk->wr_pending_head = skb;
404 cxgbi_skcb_tx_wr_next(csk->wr_pending_tail) = skb;
405 csk->wr_pending_tail = skb;
408 static inline int cxgbi_sock_count_pending_wrs(const struct cxgbi_sock *csk)
411 const struct sk_buff *skb = csk->wr_pending_head;
420 static inline struct sk_buff *cxgbi_sock_peek_wr(const struct cxgbi_sock *csk)
422 return csk->wr_pending_head;
425 static inline struct sk_buff *cxgbi_sock_dequeue_wr(struct cxgbi_sock *csk)
427 struct sk_buff *skb = csk->wr_pending_head;
430 csk->wr_pending_head = cxgbi_skcb_tx_wr_next(skb);
539 struct cxgbi_sock *csk;