[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210209103209.482770-3-razor@blackwall.org>
Date: Tue, 9 Feb 2021 12:32:08 +0200
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: netdev@...r.kernel.org
Cc: roopa@...dia.com, idosch@...dia.com, andy@...yhouse.net,
j.vosburgh@...il.com, vfalico@...il.com, kuba@...nel.org,
davem@...emloft.net, Nikolay Aleksandrov <nikolay@...dia.com>
Subject: [PATCH net-next 2/3] bonding: 3ad: add support for 400G speed
From: Nikolay Aleksandrov <nikolay@...dia.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@...dia.com>
Signed-off-by: Ido Schimmel <idosch@...dia.com>
---
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
Powered by blists - more mailing lists