Thread (1 message) 1 message, 1 author, 2025-03-12

Re: [PATCH iwl-next v9 02/14] net: ethtool: mm: extract stmmac verification logic into common library

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2025-03-12 15:46:26
Also in: bpf, intel-wired-lan, linux-arm-kernel, lkml

On Sun, Mar 09, 2025 at 06:46:36AM -0400, Faizal Rahim wrote:
From: Vladimir Oltean <vladimir.oltean@nxp.com>

It appears that stmmac is not the only hardware which requires a
software-driven verification state machine for the MAC Merge layer.

While on the one hand it's good to encourage hardware implementations,
on the other hand it's quite difficult to tolerate multiple drivers
implementing independently fairly non-trivial logic.

Extract the hardware-independent logic from stmmac into library code and
put it in ethtool. Name the state structure "mmsv" for MAC Merge
Software Verification. Let this expose an operations structure for
executing the hardware stuff: sync hardware with the tx_active boolean
(result of verification process), enable/disable the pMAC, send mPackets,
notify library of external events (reception of mPackets), as well as
link state changes.

Note that it is assumed that the external events are received in hardirq
context. If they are not, it is probably a good idea to disable hardirqs
when calling ethtool_mmsv_event_handle(), because the library does not
do so.

Also, the MM software verification process has no business with the
tx_min_frag_size, that is all the driver's to handle.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Co-developed-by: Choong Yong Liang <redacted>
Signed-off-by: Choong Yong Liang <redacted>
Tested-by: Choong Yong Liang <redacted>
Tested-by: Furong Xu <redacted>
---
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help