Re: [PATCH net v3 07/10] rxrpc: Fix limit on packets to be transmitted in one go

From: netdev-bot+sashiko

Date: Fri Nov 27 2026 - 05:14:55 EST


Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message for "rxrpc: Fix limit on packets to be
transmitted in one go" describes the mechanism correctly: the inner…

--

rxrpc: Fix limit on packets to be transmitted in one go

This commit makes rxrpc_transmit_fresh_data() honour its limit parameter.
A local variable of the same name, used for the jumbo packet limit, had
been shadowing it. The local is renamed to jlimit and clamped to limit.
The remaining limit is then decremented after each send, and the loop
breaks out once it reaches zero.

> rxrpc: Fix limit on packets to be transmitted in one go
>
> Fix rxrpc_transmit_fresh_data() to honour the limit set on the number of
> packets it can transmit in one go. The 'limit' variable is accidentally
> shadowed by another variable calculating the limit dynamically.

[Severity: Low]
This isn't a bug, but could the commit message also say what went wrong
because of the shadowing? The patch is Cc'd to stable, so the user-visible
impact would help backporters.

There are two callers of rxrpc_transmit_some_data().
rxrpc_input_call_event() passes UINT_MAX, so it was never affected. The
other caller is rxrpc_tlp_send_probe() in net/rxrpc/input_rack.c, which
asks for a single new-data loss probe:

net/rxrpc/input_rack.c:rxrpc_tlp_send_probe() {
...
/* Transmit the lowest-sequence unsent DATA */
call->tx_last_serial = 0;
rxrpc_transmit_some_data(call, 1, rxrpc_txdata_tlp_new_data);
call->tlp_serial = call->tx_last_serial;
call->tlp_seq = call->tx_transmitted;
...
}

Since the limit of 1 was ignored, a TLP new-data probe could send every
unsent packet that fit in rxrpc_tx_window_space(). It sent them in jumbo
groups of up to pmtud_jumbo, over several loop iterations.

rxrpc_prepare_data_packet() sets the serial of the last packet sent:

call->tx_last_serial = serial + req->n - 1;

As a result, tlp_serial and tlp_seq ended up pointing at the last packet
of the burst rather than at a single probe packet.

Would it be worth adding a sentence along the lines of "the TLP new-data
probe could send a burst of up to the whole Tx window instead of a single
packet"?

The code change itself looks correct. With limit == 1, jlimit becomes 1,
req.n becomes 1, limit drops to 0 and the loop breaks.

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124161302.4044422-1-dhowells%40redhat.com