Skip to content

Commit fe24a54

Browse files
dhowellskuba-moo
authored andcommitted
rxrpc: Send jumbo DATA packets
Send jumbo DATA packets if the path-MTU probing using padded PING ACK packets shows up sufficient capacity to do so. This allows larger chunks of data to be sent without reducing the retryability as the subpackets in a jumbo packet can also be retransmitted individually. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 0130eff commit fe24a54

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

net/rxrpc/ar-internal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ struct rxrpc_call {
710710
u16 tx_backoff; /* Delay to insert due to Tx failure (ms) */
711711
u8 tx_winsize; /* Maximum size of Tx window */
712712
#define RXRPC_TX_MAX_WINDOW 128
713+
u8 tx_jumbo_max; /* Maximum subpkts peer will accept */
713714
ktime_t tx_last_sent; /* Last time a transmission occurred */
714715

715716
/* Received data tracking */

net/rxrpc/call_event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ static void rxrpc_transmit_fresh_data(struct rxrpc_call *call)
288288
struct rxrpc_txqueue *tq;
289289
struct rxrpc_txbuf *txb;
290290
rxrpc_seq_t send_top, seq;
291-
int limit = min(space, 1);
291+
int limit = min(space, max(call->peer->pmtud_jumbo, 1));
292292

293293
/* Order send_top before the contents of the new txbufs and
294294
* txqueue pointers

net/rxrpc/call_object.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ struct rxrpc_call *rxrpc_alloc_call(struct rxrpc_sock *rx, gfp_t gfp,
155155
refcount_set(&call->ref, 1);
156156
call->debug_id = debug_id;
157157
call->tx_total_len = -1;
158+
call->tx_jumbo_max = 1;
158159
call->next_rx_timo = 20 * HZ;
159160
call->next_req_timo = 1 * HZ;
160161
call->ackr_window = 1;

net/rxrpc/input.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,8 +796,11 @@ static void rxrpc_input_ack_trailer(struct rxrpc_call *call, struct sk_buff *skb
796796
peer->ackr_adv_pmtud = true;
797797
} else {
798798
peer->ackr_adv_pmtud = false;
799+
capacity = clamp(capacity, 1, jumbo_max);
799800
}
800801

802+
call->tx_jumbo_max = capacity;
803+
801804
if (wake)
802805
wake_up(&call->waitq);
803806
}

0 commit comments

Comments
 (0)