mbox series

[net-next,0/2] ethtool mm API improvements

Message ID 20230415173454.3970647-1-vladimir.oltean@nxp.com (mailing list archive)
Headers show
Series ethtool mm API improvements | expand

Message

Vladimir Oltean April 15, 2023, 5:34 p.m. UTC
Currently the ethtool --set-mm API permits the existence of 2
configurations which don't make sense:

- pmac-enabled false tx-enabled true
- tx-enabled false verify-enabled true

By rejecting these, we can give driver-level code more guarantees.
I re-ran the MM selftest posted here (which I need to repost):
https://lore.kernel.org/netdev/20230210221243.228932-1-vladimir.oltean@nxp.com/

and it didn't cause functional problems.

Vladimir Oltean (2):
  net: enetc: fix MAC Merge layer remaining enabled until a link down
    event
  net: ethtool: mm: sanitize some UAPI configurations

 drivers/net/ethernet/freescale/enetc/enetc_ethtool.c | 11 +++++++----
 net/ethtool/mm.c                                     |  5 +++++
 2 files changed, 12 insertions(+), 4 deletions(-)

Comments

Vladimir Oltean April 15, 2023, 6:09 p.m. UTC | #1
On Sat, Apr 15, 2023 at 08:34:52PM +0300, Vladimir Oltean wrote:
> Currently the ethtool --set-mm API permits the existence of 2
> configurations which don't make sense:
> 
> - pmac-enabled false tx-enabled true
> - tx-enabled false verify-enabled true
> 
> By rejecting these, we can give driver-level code more guarantees.
> I re-ran the MM selftest posted here (which I need to repost):
> https://lore.kernel.org/netdev/20230210221243.228932-1-vladimir.oltean@nxp.com/
> 
> and it didn't cause functional problems.

Actually, it looks like that selftest passed by mistake in the
configuration that I tested it in. I actually get these failures:

~/selftests/net/forwarding# journalctl -b -u lldpad
Apr 15 18:05:10 lldpad[705]: arg_path "tlvid00120f07.addFragSize"
Apr 15 18:05:10 lldpad[705]: arg_path "tlvid00120f07.addFragSize"
Apr 15 18:05:10 lldpad[705]: arg_path "tlvid00120f07.addFragSize"
Apr 15 18:05:10 lldpad[705]: arg_path "tlvid00120f07.addFragSize"
Apr 15 18:05:10 lldpad[705]: Signal 15 received - terminating
Apr 15 18:05:10 lldpad[705]: ethtool: kernel reports: TX enabled requires pMAC enabled
Apr 15 18:05:10 lldpad[705]: ethtool: kernel reports: TX enabled requires pMAC enabled
Apr 15 18:05:10 systemd[1]: lldpad.service: Deactivated successfully.
Apr 15 18:05:10 systemd[1]: Stopped Link Layer Discovery Protocol Agent Daemon..

Please disregard at least patch 2. Patch 1 is still perfectly valid as-is.