[PATCH net-next] net: stmmac: stm32: Set TSO/TBS Tx queues default settings

Kurt Kanzenbach kurt at linutronix.de
Mon Aug 31 05:21:32 PDT 2026


Hi Maxime,

On Fri Aug 21 2026, Maxime Chevallier wrote:
> Thanks for tackling this, let me know if you need testing. In the past weeks
> I've been looking deep in my drawers as well as on various online shops, and
> I'm starting to have a farily comprehensive set of stmmac-enabled devices
> (although I couldn't get my hands on XGMAC, AgileX5 devkits appear to be way
> outside my budget).
>
> Let me know if you need help in testing for this, and we can ask the Altera folks
> for some help in XGMAC testing.

Ok, I don't have a xgmac device either. Only stm32mp{1,2}, imx8mp and Intel
Elkhart Lake.

So, I've been looking into this TBS thingy and have a patch set for it. However,
there's one other issue which might be worth fixing first: When opening an
AF_XDP/ZC socket the kernel crashes rarely. Stacktrace see below. Seems like the
kernel is sending packets while the XSK socket is being configured.

Looking at stmmac_xdp_enable_pool(), there's napi_disable() and
stmmac_disable_tx_queue(). However, don't we miss something like
netif_tx_stop_queue() or synchronize_net()?

Also stmmac_enable_tx_queue() is of type void, but does memory allocations which
can fail. Shouldn't that function report the errors to the callers? ;-)

Thanks,
Kurt

Stacktrace on stm32mp2:

[ 1205.743707] stm32-dwmac 482c0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 1205.746103] stm32-dwmac 482c0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-1
[ 1205.971709] Unable to handle kernel paging request at virtual address ffff800083a2d010
[ 1205.971736] Mem abort info:
[ 1205.971741]   ESR = 0x0000000096000047
[ 1205.971747]   EC = 0x25: DABT (current EL), IL = 32 bits
[ 1205.971756]   SET = 0, FnV = 0
[ 1205.971762]   EA = 0, S1PTW = 0
[ 1205.971767]   FSC = 0x07: level 3 translation fault
[ 1205.971774] Data abort info:
[ 1205.971778]   ISV = 0, ISS = 0x00000047, ISS2 = 0x00000000
[ 1205.971785]   CM = 0, WnR = 1, TnD = 0, TagAccess = 0
[ 1205.971793]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 1205.971801] swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000008c517000
[ 1205.971809] [ffff800083a2d010] pgd=100000008cb71003, p4d=100000008cb71003, pud=100000008cb72003, pmd=10000001066eb403, pte=0000000000000000
[ 1205.971847] Internal error: Oops: 0000000096000047 [#1]  SMP
[ 1205.971847] stm32-dwmac 482c0000.ethernet end0: Register MEM_TYPE_XSK_BUFF_POOL RxQ-1
[ 1205.971856] Modules linked in:
[ 1205.971869] CPU: 1 UID: 0 PID: 112 Comm: kworker/1:2 Not tainted 7.2.0-rc4-00002-g36d3d0252886 #3 PREEMPT_RT 
[ 1205.971882] Hardware name: STMicroelectronics STM32MP257F-DK Discovery Board (DT)
[ 1205.971888] Workqueue: mld mld_ifc_work
[ 1205.971916] pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 1205.971926] pc : dwmac4_set_addr+0x8/0x20
[ 1205.971944] lr : stmmac_xmit+0x364/0x1950
[ 1205.971959] sp : ffff80008330b7f0
[ 1205.971963] x29: ffff80008330b800 x28: 0000000000000001 x27: ffff000082420b80
[ 1205.971977] x26: ffff0000842ed500 x25: 0000000000000001 x24: ffff000082420000
[ 1205.971991] x23: 0000000000000000 x22: 0000000000000020 x21: ffff000083afd002
[ 1205.972004] x20: 000000000000005a x19: 0000000000000001 x18: 0000000000000000
[ 1205.972017] x17: 008f000100000205 x16: 003a160000000000 x15: 0000000000000000
[ 1205.972030] x14: 02ff0017899bdb57 x13: 001789ff01000000 x12: 00000000000002ff
[ 1205.972043] x11: 0000000401000000 x10: 1816008f00010000 x9 : ffff800080e52c6c
[ 1205.972057] x8 : 80fe010024000000 x7 : 0060dd86ccd4e37a x6 : 0000000000000000
[ 1205.972070] x5 : ffff00007ae3405a x4 : 00000000ffffffff x3 : ffff0000873a0020
[ 1205.972083] x2 : ffff800080e5e3a8 x1 : 00000000fae34000 x0 : ffff800083a2d010
[ 1205.972098] Call trace:
[ 1205.972107]  dwmac4_set_addr+0x8/0x20 (P)
[ 1205.972123]  dev_hard_start_xmit+0xa8/0x300
[ 1205.972143]  sch_direct_xmit+0x9c/0x1f0
[ 1205.972157]  __dev_queue_xmit+0xb08/0x10e0
[ 1205.972168]  ip6_finish_output2+0x3b0/0x900
[ 1205.972189]  ip6_finish_output+0x1bc/0x370
[ 1205.972203]  ip6_output+0x88/0x1f8
[ 1205.972217]  NF_HOOK.constprop.0+0x54/0xf0
[ 1205.972234]  mld_sendpack+0x1c4/0x3a8
[ 1205.972247]  mld_ifc_work+0x1e0/0x420
[ 1205.972261]  process_one_work+0x164/0x4b0
[ 1205.972280]  worker_thread+0x194/0x318
[ 1205.972293]  kthread+0x138/0x150
[ 1205.972308]  ret_from_fork+0x10/0x20
[ 1205.972333] Code: 8156bd00 ffff8000 aa1e03e9 d503201f (f9000001) 
[ 1205.972349] ---[ end trace 0000000000000000 ]---
[ 1205.972363] Kernel panic - not syncing: Oops: Fatal exception in interrupt
[ 1205.972371] SMP: stopping secondary CPUs
[ 1205.972393] Kernel Offset: disabled
[ 1205.972397] CPU features: 0x00000000,00000008,00040000,0400421b
[ 1205.972404] Memory Limit: none
[ 1206.253642] ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]---
E/TC:0   Panic 'Watchdog' at /usr/src/debug/optee-os-stm32mp/4.0.0-stm32mp-r1-rc9/core/drivers/stm32_iwdg.c:228 <stm32_iwdg_it_handler>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 861 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260831/13b06680/attachment.sig>


More information about the linux-arm-kernel mailing list