[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df90eb1f-fab1-408d-af8d-fc620f505522@lunn.ch>
Date: Tue, 12 Sep 2023 18:29:40 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Vladimir Oltean <vladimir.oltean@....com>,
Oleksij Rempel <linux@...pel-privat.de>,
Nicolò Veronese <nicveronese@...il.com>,
thomas.petazzoni@...tlin.com,
Christophe Leroy <christophe.leroy@...roup.eu>
Subject: Re: [RFC PATCH net-next 4/7] net: ethtool: add a netlink command to
list PHYs
> +static int phy_list_fill_reply(struct sk_buff *skb,
> + const struct ethnl_req_info *req_base,
> + const struct ethnl_reply_data *reply_base)
> +{
> + const struct phy_list_reply_data *data = PHY_LIST_REPDATA(reply_base);
> +
> + if (nla_put_u8(skb, ETHTOOL_A_PHY_LIST_COUNT, data->n_phys))
> + return -EMSGSIZE;
> +
> + if (!data->n_phys)
> + return 0;
> +
> + if (nla_put(skb, ETHTOOL_A_PHY_LIST_INDEX, sizeof(u32) * data->n_phys,
> + data->phy_indices))
> + return -EMSGSIZE;
> +
Can we add additional information here to allow mapping to what is
under /sys ? A PHY has an struct device, so has a name. So maybe that
can be included?
Andrew
Powered by blists - more mailing lists