Re: [PATCH net v2 2/2] ionic: limit TSO segments to the minimum Tx ring size

From: Rao, Nikhil

Date: Mon Nov 30 2026 - 17:36:32 EST



On 11/21/2026 11:32 AM, netdev-bot+sashiko@xxxxxxxxxx wrote:
[...]
Is this limit enforced on every path that reaches ionic_start_xmit()?

No, and it is not ionic specific. I reproduced both paths on net/main
with ionic:

- AF_PACKET with PACKET_QDISC_BYPASS and PACKET_VNET_HDR, sending a
60 KB TCP frame with a 39 byte gso_size
- a tcx egress program that IPIP-encapsulates the same frame with
bpf_skb_adjust_room()

In both cases the skb reaches the driver with gso_segs still 0, gets
past the gso_max_segs check, and causes a Tx timeout and queue reset.

Counting the segments of such skbs in gso_within_dev_limits() fixes
both in my test.

Jakub, do you want this fixed in the core? The first path needs
CAP_NET_RAW, the second a BPF program, and nobody has reported it, so
I'd send it to net-next unless you prefer otherwise.


Would it make sense to ring the doorbell before returning
NETDEV_TX_BUSY?

Yes. I reproduced it with a 128-entry ring by forcing xmit_more on a
small frame ahead of a 127-segment TSO skb: the queue stops until the
watchdog resets it. Ringing the doorbell before returning
NETDEV_TX_BUSY fixes it. It needs a near-minimum ring and the
doorbell to be deferred at that moment, so I'll send the fix to
net-next.

Thanks,
Nikhil