summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorCosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>2026-08-17 22:26:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-10-29 11:12:21 +0100
commit78585f90feb3bbaf3b1c642294c8c47e451dc3cf (patch)
tree48c92d28b3c95532dd9e2c8f969520b88b0601fc /tools/perf/scripts/python/task-analyzer.py
parent78a8d6537f1de34770e460edee360b556ef40427 (diff)
usb: gadget: f_ncm: restart the TX timer if the TX freelist is empty
ncm_wrap_ntb() aggregates datagrams into a pending NTB, which is sent either when it becomes full, or after 300us since the NTB was started, using ndo_start_xmit() (eth_start_xmit()). ndo_start_xmit() returns NETDEV_TX_BUSY when the TX freelist is empty. For regular packets this is fine since the networking core will requeue them, but for timer-flushed packets there is no logic to handle this situation, and HRTIMER_NORESTART is returned from ncm_tx_timeout() without checking eth_start_xmit()'s return value. Under sustained TX saturation the request freelist is empty most of the time. Since the timer is never restarted, small packets keep getting accumulated into the NTB, until either TX_MAX_NUM_DPE packets are stored or NTB_DEFAULT_IN_SIZE is reached, which is an unknown amount of time. Check the return value of ndo_start_xmit() and restart the timer after another 300us. Cc: stable <stable@kernel.org> Fixes: 6d3865f9d41f ("usb: gadget: NCM: Add transmit multi-frame.") Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com> Tested-by: Vladyslav Tymoshchuk <tvlad744@gmail.com> Tested-by: Leonardo Costa <leonardo.costa@toradex.com> Reported-by: Hiago De Franco <hiago.franco@toradex.com> Closes: https://lore.kernel.org/all/20231204183751.64202-1-hiagofranco@gmail.com/ Link: https://patch.msgid.link/20260817192638.437798-1-cosmin-gabriel.tanislav.xa@renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions