Re: [PATCH net] net: usb: cdc_ncm: don't flush the TX timer into a stopped queue

From: William A Kennington III

Date: Thu Nov 26 2026 - 18:13:27 EST


On 11/26/26 2:51 AM, Paolo Abeni wrote:

On 11/18/26 04:41, William A. Kennington III wrote:
cdc_ncm_txpath_bh() calls usbnet_start_xmit() directly without checking
whether usbnet has stopped the netdev TX queue. Since commit
ad70411a978d ("usbnet: fix kernel crash after disconnect"),
usbnet_start_xmit() frees any NTB submitted while the queue is stopped
and increments tx_dropped.

This triggers routinely under bulk load. With the default 16 KiB NTBs,
usbnet only allows MAX_QUEUE_MEMORY / tx_max = 5 TX URBs in flight, so a
bulk TCP stream stops the queue constantly.

The sashiko comments look relevant. Also it feels like this is papering
over the real issue: bulk transfers should not cause TX queue stop.
Yes, this was my original thought too. I have a v2 that just pokes the TX queue after doing other operations but that feels like it just papers over the underlying problem.

It's not clear to me if there are H/W constrains behind the
MAX_QUEUE_MEMORY value. Perhaps is time to revisit it?
I don't think it's the MAX_QUEUE_MEMORY value. I think it was a decision years ago about how the queue is stopped around link down that is leaking into the congestion flow. I'm going to port my platform onto master and do some testing.

FWIW neon seems to think the BQL changes for usbnet might have fixed this as a side-effect. Let me test it and see. I'm not sure how that will help me on 5.15 in the interim though. I may just carry a downstream patch to force kicking the queues.

/P