netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 1/3] bonding: fix 802.3ad support for 5G and 50G speeds
@ 2017-06-08  9:18 Nicolas Dichtel
  2017-06-08  9:18 ` [PATCH net 2/3] bonding: fix 802.3ad support for 14G speed Nicolas Dichtel
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Nicolas Dichtel @ 2017-06-08  9:18 UTC (permalink / raw)
  To: davem
  Cc: netdev, j.vosburgh, vfalico, andy, thibaut.collet, linville,
	Nicolas Dichtel

From: Thibaut Collet <thibaut.collet@6wind.com>

This patch adds [5|50] Gbps enum definition, and fixes
aggregated bandwidth calculation based on above slave links.

Fixes: c9a70d43461d ("net-next: ethtool: Added port speed macros.")
Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 drivers/net/bonding/bond_3ad.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index b44a6aeb346d..d1b09be63ba4 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -90,10 +90,12 @@ enum ad_link_speed_type {
 	AD_LINK_SPEED_100MBPS,
 	AD_LINK_SPEED_1000MBPS,
 	AD_LINK_SPEED_2500MBPS,
+	AD_LINK_SPEED_5000MBPS,
 	AD_LINK_SPEED_10000MBPS,
 	AD_LINK_SPEED_20000MBPS,
 	AD_LINK_SPEED_25000MBPS,
 	AD_LINK_SPEED_40000MBPS,
+	AD_LINK_SPEED_50000MBPS,
 	AD_LINK_SPEED_56000MBPS,
 	AD_LINK_SPEED_100000MBPS,
 };
@@ -259,10 +261,12 @@ static inline int __check_agg_selection_timer(struct port *port)
  *     %AD_LINK_SPEED_100MBPS,
  *     %AD_LINK_SPEED_1000MBPS,
  *     %AD_LINK_SPEED_2500MBPS,
+ *     %AD_LINK_SPEED_5000MBPS,
  *     %AD_LINK_SPEED_10000MBPS
  *     %AD_LINK_SPEED_20000MBPS
  *     %AD_LINK_SPEED_25000MBPS
  *     %AD_LINK_SPEED_40000MBPS
+ *     %AD_LINK_SPEED_50000MBPS
  *     %AD_LINK_SPEED_56000MBPS
  *     %AD_LINK_SPEED_100000MBPS
  */
@@ -296,6 +300,10 @@ static u16 __get_link_speed(struct port *port)
 			speed = AD_LINK_SPEED_2500MBPS;
 			break;
 
+		case SPEED_5000:
+			speed = AD_LINK_SPEED_5000MBPS;
+			break;
+
 		case SPEED_10000:
 			speed = AD_LINK_SPEED_10000MBPS;
 			break;
@@ -312,6 +320,10 @@ static u16 __get_link_speed(struct port *port)
 			speed = AD_LINK_SPEED_40000MBPS;
 			break;
 
+		case SPEED_50000:
+			speed = AD_LINK_SPEED_50000MBPS;
+			break;
+
 		case SPEED_56000:
 			speed = AD_LINK_SPEED_56000MBPS;
 			break;
@@ -707,6 +719,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator)
 		case AD_LINK_SPEED_2500MBPS:
 			bandwidth = nports * 2500;
 			break;
+		case AD_LINK_SPEED_5000MBPS:
+			bandwidth = nports * 5000;
+			break;
 		case AD_LINK_SPEED_10000MBPS:
 			bandwidth = nports * 10000;
 			break;
@@ -719,6 +734,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator)
 		case AD_LINK_SPEED_40000MBPS:
 			bandwidth = nports * 40000;
 			break;
+		case AD_LINK_SPEED_50000MBPS:
+			bandwidth = nports * 50000;
+			break;
 		case AD_LINK_SPEED_56000MBPS:
 			bandwidth = nports * 56000;
 			break;
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2017-06-10 20:07 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-08  9:18 [PATCH net 1/3] bonding: fix 802.3ad support for 5G and 50G speeds Nicolas Dichtel
2017-06-08  9:18 ` [PATCH net 2/3] bonding: fix 802.3ad support for 14G speed Nicolas Dichtel
2017-06-08 12:55   ` Andy Gospodarek
2017-06-08 16:48   ` Andrew Lunn
2017-06-09 13:34     ` [PATCH net-next] bonding: warn user when 802.3ad speed is unknown Nicolas Dichtel
2017-06-09 14:23       ` Andrew Lunn
2017-06-09 14:39         ` Nicolas Dichtel
2017-06-09 14:51           ` Andy Gospodarek
2017-06-09 14:59           ` Andrew Lunn
2017-06-09 15:58             ` [PATCH net-next v2] " Nicolas Dichtel
2017-06-10 20:07               ` David Miller
2017-06-10 20:01       ` [PATCH net-next] " David Miller
2017-06-08 20:06   ` [PATCH net 2/3] bonding: fix 802.3ad support for 14G speed David Miller
2017-06-09  0:05   ` Joe Perches
2017-06-09 13:45     ` [PATCH net] net: phy: add missing SPEED_14000 Nicolas Dichtel
2017-06-08  9:18 ` [PATCH net 3/3] ethtool.h: remind to update 802.3ad when adding new speeds Nicolas Dichtel
2017-06-08 12:56   ` Andy Gospodarek
2017-06-08 20:06   ` David Miller
2017-06-08 12:55 ` [PATCH net 1/3] bonding: fix 802.3ad support for 5G and 50G speeds Andy Gospodarek
2017-06-08 20:05 ` David Miller

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).