[PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning

STALE2002d

Revision v2 of 2 in this series.

8 messages, 5 authors, 2021-02-11 · open the first message on its own page

[PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: 2021-02-10 20:44:43

From: Nikolay Aleksandrov <redacted>

Hi,
We'd like to have proper 200G and 400G support with 3ad bond mode, so we
need to add new definitions for them in order to have separate oper keys,
aggregated bandwidth and proper operation (patches 01 and 02). In
patch 03 Ido changes the code to use pr_err_once instead of
pr_warn_once which would help future detection of unsupported speeds.

v2: patch 03: use pr_err_once instead of WARN_ONCE

Thanks,
 Nik

Ido Schimmel (1):
  bonding: 3ad: Print an error for unknown speeds

Nikolay Aleksandrov (2):
  bonding: 3ad: add support for 200G speed
  bonding: 3ad: add support for 400G speed

 drivers/net/bonding/bond_3ad.c | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

-- 
2.29.2

[PATCH net-next v2 1/3] bonding: 3ad: add support for 200G speed

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: 2021-02-10 20:45:14

From: Nikolay Aleksandrov <redacted>

In order to be able to use 3ad mode with 200G devices we need to extend
the supported speeds.

Signed-off-by: Nikolay Aleksandrov <redacted>
---
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 aa001b16765a..390e877419f3 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -73,6 +73,7 @@ enum ad_link_speed_type {
 	AD_LINK_SPEED_50000MBPS,
 	AD_LINK_SPEED_56000MBPS,
 	AD_LINK_SPEED_100000MBPS,
+	AD_LINK_SPEED_200000MBPS,
 };
 
 /* compare MAC addresses */
@@ -245,6 +246,7 @@ static inline int __check_agg_selection_timer(struct port *port)
  *     %AD_LINK_SPEED_50000MBPS
  *     %AD_LINK_SPEED_56000MBPS
  *     %AD_LINK_SPEED_100000MBPS
+ *     %AD_LINK_SPEED_200000MBPS
  */
 static u16 __get_link_speed(struct port *port)
 {
@@ -312,6 +314,10 @@ static u16 __get_link_speed(struct port *port)
 			speed = AD_LINK_SPEED_100000MBPS;
 			break;
 
+		case SPEED_200000:
+			speed = AD_LINK_SPEED_200000MBPS;
+			break;
+
 		default:
 			/* unknown speed value from ethtool. shouldn't happen */
 			if (slave->speed != SPEED_UNKNOWN)
@@ -733,6 +739,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator)
 		case AD_LINK_SPEED_100000MBPS:
 			bandwidth = nports * 100000;
 			break;
+		case AD_LINK_SPEED_200000MBPS:
+			bandwidth = nports * 200000;
+			break;
 		default:
 			bandwidth = 0; /* to silence the compiler */
 		}
-- 
2.29.2

[PATCH net-next v2 2/3] bonding: 3ad: add support for 400G speed

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: 2021-02-10 20:45:14

From: Nikolay Aleksandrov <redacted>

In order to be able to use 3ad mode with 400G devices we need to extend
the supported speeds.

Signed-off-by: Nikolay Aleksandrov <redacted>
---
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

[PATCH net-next v2 3/3] bonding: 3ad: Print an error for unknown speeds

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: 2021-02-10 20:45:14

From: Ido Schimmel <idosch@nvidia.com>

The bond driver needs to be patched to support new ethtool speeds.
Currently it emits a single warning [1] when it encounters an unknown
speed. As evident by the two previous patches, this is not explicit
enough. Instead, promote it to an error.

[1]
bond10: (slave swp1): unknown ethtool speed (200000) for port 1 (set it to 0)

v2:
* Use pr_err_once() instead of WARN_ONCE()

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Nikolay Aleksandrov <redacted>
---
 drivers/net/bonding/bond_3ad.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 2e670f68626d..6908822d9773 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -327,10 +327,10 @@ static u16 __get_link_speed(struct port *port)
 		default:
 			/* unknown speed value from ethtool. shouldn't happen */
 			if (slave->speed != SPEED_UNKNOWN)
-				pr_warn_once("%s: (slave %s): unknown ethtool speed (%d) for port %d (set it to 0)\n",
-					     slave->bond->dev->name,
-					     slave->dev->name, slave->speed,
-					     port->actor_port_number);
+				pr_err_once("%s: (slave %s): unknown ethtool speed (%d) for port %d (set it to 0)\n",
+					    slave->bond->dev->name,
+					    slave->dev->name, slave->speed,
+					    port->actor_port_number);
 			speed = 0;
 			break;
 		}
-- 
2.29.2

Re: [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning

From: Alexander Duyck <hidden>
Date: 2021-02-10 21:06:41

On Wed, Feb 10, 2021 at 12:43 PM Nikolay Aleksandrov
[off-list ref] wrote:
From: Nikolay Aleksandrov <redacted>

Hi,
We'd like to have proper 200G and 400G support with 3ad bond mode, so we
need to add new definitions for them in order to have separate oper keys,
aggregated bandwidth and proper operation (patches 01 and 02). In
patch 03 Ido changes the code to use pr_err_once instead of
pr_warn_once which would help future detection of unsupported speeds.

v2: patch 03: use pr_err_once instead of WARN_ONCE

Thanks,
 Nik

Ido Schimmel (1):
  bonding: 3ad: Print an error for unknown speeds

Nikolay Aleksandrov (2):
  bonding: 3ad: add support for 200G speed
  bonding: 3ad: add support for 400G speed

 drivers/net/bonding/bond_3ad.c | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)
With this update the series looks good to me.

Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>

Re: [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning

From: Jay Vosburgh <hidden>
Date: 2021-02-11 02:07:41

Nikolay Aleksandrov [off-list ref] wrote:
From: Nikolay Aleksandrov <redacted>

Hi,
We'd like to have proper 200G and 400G support with 3ad bond mode, so we
need to add new definitions for them in order to have separate oper keys,
aggregated bandwidth and proper operation (patches 01 and 02). In
patch 03 Ido changes the code to use pr_err_once instead of
pr_warn_once which would help future detection of unsupported speeds.

v2: patch 03: use pr_err_once instead of WARN_ONCE

Thanks,
Nik

Ido Schimmel (1):
 bonding: 3ad: Print an error for unknown speeds

Nikolay Aleksandrov (2):
 bonding: 3ad: add support for 200G speed
 bonding: 3ad: add support for 400G speed

drivers/net/bonding/bond_3ad.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
	Patches 1 and 2 could have been one patch, I suppose, but not
really a big deal.  I'm in agreement about pr_err_once instead of
WARN_ONCE.

Acked-by: Jay Vosburgh <redacted>

	-J

---
	-Jay Vosburgh, jay.vosburgh@canonical.com

Re: [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning

From: Nicolas Dichtel <hidden>
Date: 2021-02-11 10:28:29

Le 10/02/2021 à 21:43, Nikolay Aleksandrov a écrit :
From: Nikolay Aleksandrov <redacted>

Hi,
We'd like to have proper 200G and 400G support with 3ad bond mode, so we
need to add new definitions for them in order to have separate oper keys,
aggregated bandwidth and proper operation (patches 01 and 02). In
patch 03 Ido changes the code to use pr_err_once instead of
pr_warn_once which would help future detection of unsupported speeds.

v2: patch 03: use pr_err_once instead of WARN_ONCE

Thanks,
 Nik

Ido Schimmel (1):
  bonding: 3ad: Print an error for unknown speeds

Nikolay Aleksandrov (2):
  bonding: 3ad: add support for 200G speed
  bonding: 3ad: add support for 400G speed

 drivers/net/bonding/bond_3ad.c | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)
Acked-by: Nicolas Dichtel <redacted>

Re: [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-02-11 22:41:42

Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Wed, 10 Feb 2021 22:43:30 +0200 you wrote:
From: Nikolay Aleksandrov <redacted>

Hi,
We'd like to have proper 200G and 400G support with 3ad bond mode, so we
need to add new definitions for them in order to have separate oper keys,
aggregated bandwidth and proper operation (patches 01 and 02). In
patch 03 Ido changes the code to use pr_err_once instead of
pr_warn_once which would help future detection of unsupported speeds.

[...]
Here is the summary with links:
  - [net-next,v2,1/3] bonding: 3ad: add support for 200G speed
    https://git.kernel.org/netdev/net-next/c/ab73447c38e4
  - [net-next,v2,2/3] bonding: 3ad: add support for 400G speed
    https://git.kernel.org/netdev/net-next/c/138e3b3cc0bb
  - [net-next,v2,3/3] bonding: 3ad: Print an error for unknown speeds
    https://git.kernel.org/netdev/net-next/c/5edf55ad95b5

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help