From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: roopa@nvidia.com, andy@greyhouse.net, j.vosburgh@gmail.com,
vfalico@gmail.com, kuba@kernel.org, davem@davemloft.net,
alexander.duyck@gmail.com, idosch@nvidia.com,
Nikolay Aleksandrov <nikolay@nvidia.com>
Subject: [PATCH net-next v2 2/3] bonding: 3ad: add support for 400G speed
Date: Wed, 10 Feb 2021 22:43:32 +0200 [thread overview]
Message-ID: <20210210204333.729603-3-razor@blackwall.org> (raw)
In-Reply-To: <20210210204333.729603-1-razor@blackwall.org>
From: Nikolay Aleksandrov <nikolay@nvidia.com>
In order to be able to use 3ad mode with 400G devices we need to extend
the supported speeds.
Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
---
v2: no changes
drivers/net/bonding/bond_3ad.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 390e877419f3..2e670f68626d 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -74,6 +74,7 @@ enum ad_link_speed_type {
AD_LINK_SPEED_56000MBPS,
AD_LINK_SPEED_100000MBPS,
AD_LINK_SPEED_200000MBPS,
+ AD_LINK_SPEED_400000MBPS,
};
/* compare MAC addresses */
@@ -247,6 +248,7 @@ static inline int __check_agg_selection_timer(struct port *port)
* %AD_LINK_SPEED_56000MBPS
* %AD_LINK_SPEED_100000MBPS
* %AD_LINK_SPEED_200000MBPS
+ * %AD_LINK_SPEED_400000MBPS
*/
static u16 __get_link_speed(struct port *port)
{
@@ -318,6 +320,10 @@ static u16 __get_link_speed(struct port *port)
speed = AD_LINK_SPEED_200000MBPS;
break;
+ case SPEED_400000:
+ speed = AD_LINK_SPEED_400000MBPS;
+ break;
+
default:
/* unknown speed value from ethtool. shouldn't happen */
if (slave->speed != SPEED_UNKNOWN)
@@ -742,6 +748,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator)
case AD_LINK_SPEED_200000MBPS:
bandwidth = nports * 200000;
break;
+ case AD_LINK_SPEED_400000MBPS:
+ bandwidth = nports * 400000;
+ break;
default:
bandwidth = 0; /* to silence the compiler */
}
--
2.29.2
next prev parent reply other threads:[~2021-02-10 20:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 20:43 [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning Nikolay Aleksandrov
2021-02-10 20:43 ` [PATCH net-next v2 1/3] bonding: 3ad: add support for 200G speed Nikolay Aleksandrov
2021-02-10 20:43 ` Nikolay Aleksandrov [this message]
2021-02-10 20:43 ` [PATCH net-next v2 3/3] bonding: 3ad: Print an error for unknown speeds Nikolay Aleksandrov
2021-02-10 21:05 ` [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning Alexander Duyck
2021-02-11 2:06 ` Jay Vosburgh
2021-02-11 10:25 ` Nicolas Dichtel
2021-02-11 22:40 ` patchwork-bot+netdevbpf
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=20210210204333.729603-3-razor@blackwall.org \
--to=razor@blackwall.org \
--cc=alexander.duyck@gmail.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=idosch@nvidia.com \
--cc=j.vosburgh@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@nvidia.com \
--cc=roopa@nvidia.com \
--cc=vfalico@gmail.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).