Message ID | 20240228114728.51861-9-maxime.chevallier@bootlin.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Introduce PHY listing and link_topology tracking | expand |
On Wed, 28 Feb 2024 12:47:22 +0100 Maxime Chevallier wrote: > + reply: > + attributes: > + - header > + - index > + - drvname > + - name > + - upstream-type > + - upstream-phy-index doesn't exist: s/phy-// FWIW make -j $(nproc) -C tools/net/ynl/ should build reliably, again. > + - upstream-sfp-name > + - downstream-sfp-name > + - id
Hello Jakub, On Wed, 28 Feb 2024 20:10:18 -0800 Jakub Kicinski <kuba@kernel.org> wrote: > On Wed, 28 Feb 2024 12:47:22 +0100 Maxime Chevallier wrote: > > + reply: > > + attributes: > > + - header > > + - index > > + - drvname > > + - name > > + - upstream-type > > + - upstream-phy-index > > doesn't exist: s/phy-// Arg. Quite a silly mistake indeed :/ > FWIW > > make -j $(nproc) -C tools/net/ynl/ > > should build reliably, again. Just tested with a fix and it builds fine indeed. I'll send another iteration. Sorry and thanks, Maxime
diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml index bb6e1dc6d1c5..6e6f6c393d01 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -16,6 +16,11 @@ definitions: name: stringset type: enum entries: [] + - + name: phy-upstream-type + enum-name: + type: enum + entries: [ mac, phy ] attribute-sets: - @@ -945,6 +950,38 @@ attribute-sets: - name: burst-tmr type: u32 + - + name: phy + attributes: + - + name: header + type: nest + nested-attributes: header + - + name: index + type: u32 + - + name: drvname + type: string + - + name: name + type: string + - + name: upstream-type + type: u32 + enum: phy-upstream-type + - + name: upstream-index + type: u32 + - + name: upstream-sfp-name + type: string + - + name: downstream-sfp-name + type: string + - + name: id + type: u32 operations: enum-model: directional @@ -1696,3 +1733,25 @@ operations: name: mm-ntf doc: Notification for change in MAC Merge configuration. notify: mm-get + - + name: phy-get + doc: Get PHY devices attached to an interface + + attribute-set: phy + + do: &phy-get-op + request: + attributes: + - header + reply: + attributes: + - header + - index + - drvname + - name + - upstream-type + - upstream-phy-index + - upstream-sfp-name + - downstream-sfp-name + - id + dump: *phy-get-op
The PHY_GET command, supporting both DUMP and GET operations, is used to retrieve the list of PHYs connected to a netdevice, and get topology information to know where exactly it sits on the physical link. Add the netlink specs corresponding to that command. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> --- V9: rename upstream-phy-index to upstream-index to align with the ethtool_netlink.h definition V8: No changes V7: No changes V6: Updated the spec according to the new attributes V5: No changes V4: Remove the ethtool-user generated code V3: New patch Documentation/netlink/specs/ethtool.yaml | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+)