Lines Matching full:txb
22 struct rxrpc_txbuf *txb; in rxrpc_alloc_data_txbuf() local
26 txb = kzalloc(sizeof(*txb), gfp); in rxrpc_alloc_data_txbuf()
27 if (!txb) in rxrpc_alloc_data_txbuf()
42 kfree(txb); in rxrpc_alloc_data_txbuf()
46 refcount_set(&txb->ref, 1); in rxrpc_alloc_data_txbuf()
47 txb->call_debug_id = call->debug_id; in rxrpc_alloc_data_txbuf()
48 txb->debug_id = atomic_inc_return(&rxrpc_txbuf_debug_ids); in rxrpc_alloc_data_txbuf()
49 txb->alloc_size = data_size; in rxrpc_alloc_data_txbuf()
50 txb->space = data_size; in rxrpc_alloc_data_txbuf()
51 txb->offset = 0; in rxrpc_alloc_data_txbuf()
52 txb->flags = call->conn->out_clientflag; in rxrpc_alloc_data_txbuf()
53 txb->seq = call->send_top + 1; in rxrpc_alloc_data_txbuf()
54 txb->data = buf + doff; in rxrpc_alloc_data_txbuf()
56 trace_rxrpc_txbuf(txb->debug_id, txb->call_debug_id, txb->seq, 1, in rxrpc_alloc_data_txbuf()
60 return txb; in rxrpc_alloc_data_txbuf()
63 void rxrpc_get_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what) in rxrpc_get_txbuf() argument
67 __refcount_inc(&txb->ref, &r); in rxrpc_get_txbuf()
68 trace_rxrpc_txbuf(txb->debug_id, txb->call_debug_id, txb->seq, r + 1, what); in rxrpc_get_txbuf()
71 void rxrpc_see_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what) in rxrpc_see_txbuf() argument
73 int r = refcount_read(&txb->ref); in rxrpc_see_txbuf()
75 trace_rxrpc_txbuf(txb->debug_id, txb->call_debug_id, txb->seq, r, what); in rxrpc_see_txbuf()
78 static void rxrpc_free_txbuf(struct rxrpc_txbuf *txb) in rxrpc_free_txbuf() argument
80 trace_rxrpc_txbuf(txb->debug_id, txb->call_debug_id, txb->seq, 0, in rxrpc_free_txbuf()
82 if (txb->data) in rxrpc_free_txbuf()
83 page_frag_free(txb->data); in rxrpc_free_txbuf()
84 kfree(txb); in rxrpc_free_txbuf()
88 void rxrpc_put_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what) in rxrpc_put_txbuf() argument
95 if (txb) { in rxrpc_put_txbuf()
96 debug_id = txb->debug_id; in rxrpc_put_txbuf()
97 call_debug_id = txb->call_debug_id; in rxrpc_put_txbuf()
98 seq = txb->seq; in rxrpc_put_txbuf()
99 dead = __refcount_dec_and_test(&txb->ref, &r); in rxrpc_put_txbuf()
102 rxrpc_free_txbuf(txb); in rxrpc_put_txbuf()