Lines Matching full:txb

72 	struct rxrpc_txbuf *txb;  in rxrpc_send_ACK()  local
79 txb = rxrpc_alloc_txbuf(call, RXRPC_PACKET_TYPE_ACK, in rxrpc_send_ACK()
81 if (!txb) { in rxrpc_send_ACK()
86 txb->ack_why = why; in rxrpc_send_ACK()
87 txb->wire.seq = 0; in rxrpc_send_ACK()
88 txb->wire.type = RXRPC_PACKET_TYPE_ACK; in rxrpc_send_ACK()
89 txb->wire.flags |= RXRPC_SLOW_START_OK; in rxrpc_send_ACK()
90 txb->ack.bufferSpace = 0; in rxrpc_send_ACK()
91 txb->ack.maxSkew = 0; in rxrpc_send_ACK()
92 txb->ack.firstPacket = 0; in rxrpc_send_ACK()
93 txb->ack.previousPacket = 0; in rxrpc_send_ACK()
94 txb->ack.serial = htonl(serial); in rxrpc_send_ACK()
95 txb->ack.reason = ack_reason; in rxrpc_send_ACK()
96 txb->ack.nAcks = 0; in rxrpc_send_ACK()
99 rxrpc_send_ack_packet(call, txb); in rxrpc_send_ACK()
100 rxrpc_put_txbuf(txb, rxrpc_txbuf_put_ack_tx); in rxrpc_send_ACK()
117 struct rxrpc_txbuf *txb; in rxrpc_resend() local
138 txb = list_first_entry(&call->tx_buffer, struct rxrpc_txbuf, call_link); in rxrpc_resend()
152 if (after(txb->seq, transmitted)) in rxrpc_resend()
154 if (after(txb->seq, seq)) in rxrpc_resend()
156 list_for_each_entry_from(txb, &call->tx_buffer, call_link) { in rxrpc_resend()
157 if (txb->seq == seq) in rxrpc_resend()
163 if (after(ntohl(txb->wire.serial), call->acks_highest_serial)) in rxrpc_resend()
166 rxrpc_see_txbuf(txb, rxrpc_txbuf_see_unacked); in rxrpc_resend()
168 if (list_empty(&txb->tx_link)) { in rxrpc_resend()
169 list_add_tail(&txb->tx_link, &retrans_queue); in rxrpc_resend()
170 set_bit(RXRPC_TXBUF_RESENT, &txb->flags); in rxrpc_resend()
173 trace_rxrpc_retransmit(call, txb->seq, in rxrpc_resend()
174 ktime_to_ns(ktime_sub(txb->last_sent, in rxrpc_resend()
177 if (list_is_last(&txb->call_link, &call->tx_buffer)) in rxrpc_resend()
179 txb = list_next_entry(txb, call_link); in rxrpc_resend()
193 list_for_each_entry_from(txb, &call->tx_buffer, call_link) { in rxrpc_resend()
194 if (before_eq(txb->seq, READ_ONCE(call->acks_prev_seq))) in rxrpc_resend()
196 if (after(txb->seq, READ_ONCE(call->tx_transmitted))) in rxrpc_resend()
200 before(ntohl(txb->wire.serial), ntohl(ack->serial))) in rxrpc_resend()
203 if (ktime_after(txb->last_sent, max_age)) { in rxrpc_resend()
204 if (ktime_before(txb->last_sent, oldest)) in rxrpc_resend()
205 oldest = txb->last_sent; in rxrpc_resend()
211 if (list_empty(&txb->tx_link)) { in rxrpc_resend()
212 list_add_tail(&txb->tx_link, &retrans_queue); in rxrpc_resend()
213 set_bit(RXRPC_TXBUF_RESENT, &txb->flags); in rxrpc_resend()
244 while ((txb = list_first_entry_or_null(&retrans_queue, in rxrpc_resend()
246 list_del_init(&txb->tx_link); in rxrpc_resend()
247 rxrpc_transmit_one(call, txb); in rxrpc_resend()
306 struct rxrpc_txbuf *txb; in rxrpc_decant_prepared_tx() local
314 while ((txb = list_first_entry_or_null(&call->tx_sendmsg, in rxrpc_decant_prepared_tx()
317 list_del(&txb->call_link); in rxrpc_decant_prepared_tx()
320 call->tx_top = txb->seq; in rxrpc_decant_prepared_tx()
321 list_add_tail(&txb->call_link, &call->tx_buffer); in rxrpc_decant_prepared_tx()
323 if (txb->wire.flags & RXRPC_LAST_PACKET) in rxrpc_decant_prepared_tx()
326 rxrpc_transmit_one(call, txb); in rxrpc_decant_prepared_tx()