Re: [PATCH net-next 4/5] net: cortina: Add CS7542 CPU network datapath
From: Fil Dunsky
Date: Mon Nov 23 2026 - 18:41:40 EST
Hi Andrew,
I removed both module parameters and the unused internal-buffer alternative,
keeping the previous external-DDR QM/TM default. I could not justify weight
16 with a hardware requirement, so the next version uses netif_napi_add()
and the normal weight 64. The .c helpers are plain static functions, and
ndo_open now unwinds through cleanup labels.
I reviewed the flags against the core transitions. opened publishes a port
under the shared TX lock after IRQ/NAPI setup succeeds. netif_running() is
already true while ndo_open can still fail, so it cannot identify a port
that shared completions may safely wake. Clearing opened under that lock
before netif_tx_disable prevents completions waking a closing queue.
stopping gates the single reap timer shared by all ports. Last-port close
sets it under the same lock used by timer-rearm paths, before dropping the
lock and calling hrtimer_cancel(). It prevents a running callback or RX
poll from rearming during cancellation. I retained these flags and added
comments explaining their roles. rx_stopping separately closes the device
retry/IRQ-rearm window; napi_disable alone does not join a poll tail after
napi_complete_done().
Independent built-in/module ARM builds without the platform series pass.
The revised driver also passed Almond+ RAM testing with live NAPI weight
64, two load/unload cycles, 600 byte-exact UDP echoes and 20 ICMPv6 replies
through the normal DSA path. A separate internal CPU-port diagnostic
passed 448 nonlinear/jumbo frames, including 8192-byte payloads. These are
functional checks, not throughput measurements.
I will collect further review before sending v2 within the agreed cadence.
Thanks,
Fil