]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: ethtool: Introduce per-PHY DUMP operations
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Fri, 2 May 2025 08:52:39 +0000 (10:52 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 6 May 2025 00:17:40 +0000 (17:17 -0700)
commit172265b44cd3c90b76f2153a15abf64520d70e4a
tree997afd447dee5a810841f44d3991fca36ab0d4a9
parent953d9480f7d1bee0ec00c7c23ec4d3b33f585ed1
net: ethtool: Introduce per-PHY DUMP operations

ethnl commands that target a phy_device need a DUMP implementation that
will fill the reply for every PHY behind a netdev. We therefore need to
iterate over the dev->topo to list them.

When multiple PHYs are behind the same netdev, it's also useful to
perform DUMP with a filter on a given netdev, to get the capability of
every PHY.

Implement dedicated genl ->start(), ->dumpit() and ->done() operations
for PHY-targetting command, allowing filtered dumps and using a dump
context that keep track of the PHY iteration for multi-message dump.

PSE-PD and PLCA are converted to this new set of ops along the way.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250502085242.248645-2-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/netlink.c