From: Christian Marangi <ansuelsmth@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
Kees Cook <keescook@chromium.org>,
Christian Marangi <ansuelsmth@gmail.com>,
Piergiorgio Beruto <piergiorgio.beruto@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [net-next PATCH 1/2] net: ethtool: add define for link speed mode number
Date: Wed, 13 Dec 2023 19:15:53 +0100 [thread overview]
Message-ID: <20231213181554.4741-2-ansuelsmth@gmail.com> (raw)
In-Reply-To: <20231213181554.4741-1-ansuelsmth@gmail.com>
Add define to reference the number of link speed mode defined in the
system.
This can be handy for generic parsing of the different link speed mode.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
include/uapi/linux/ethtool.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index f7fba0dc87e5..59f394a663ab 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1884,6 +1884,28 @@ enum ethtool_link_mode_bit_indices {
* Update drivers/net/phy/phy.c:phy_speed_to_str() and
* drivers/net/bonding/bond_3ad.c:__get_link_speed() when adding new values.
*/
+enum ethtool_link_speeds {
+ SPEED_10 = 0,
+ SPEED_100,
+ SPEED_1000,
+ SPEED_2500,
+ SPEED_5000,
+ SPEED_10000,
+ SPEED_14000,
+ SPEED_20000,
+ SPEED_25000,
+ SPEED_40000,
+ SPEED_50000,
+ SPEED_56000,
+ SPEED_100000,
+ SPEED_200000,
+ SPEED_400000,
+ SPEED_800000,
+
+ /* must be last entry */
+ __LINK_SPEEDS_NUM,
+};
+
#define SPEED_10 10
#define SPEED_100 100
#define SPEED_1000 1000
--
2.40.1
next prev parent reply other threads:[~2023-12-13 18:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-13 18:15 [net-next PATCH 0/2] net: add define to describe link speed modes Christian Marangi
2023-12-13 18:15 ` Christian Marangi [this message]
2023-12-13 20:10 ` [net-next PATCH 1/2] net: ethtool: add define for link speed mode number Russell King (Oracle)
2023-12-13 20:15 ` Christian Marangi
2023-12-13 20:23 ` Russell King (Oracle)
2023-12-14 7:35 ` kernel test robot
2023-12-13 18:15 ` [net-next PATCH 2/2] net: phy: leds: use new define for link speed modes number Christian Marangi
2023-12-13 20:18 ` Russell King (Oracle)
2023-12-13 20:34 ` Christian Marangi
2023-12-13 23:05 ` [net-next PATCH 0/2] net: add define to describe link speed modes Andrew Lunn
2023-12-13 23:10 ` Christian Marangi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231213181554.4741-2-ansuelsmth@gmail.com \
--to=ansuelsmth@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mailhol.vincent@wanadoo.fr \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=piergiorgio.beruto@gmail.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).