netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning
@ 2021-02-10 20:43 Nikolay Aleksandrov
  2021-02-10 20:43 ` [PATCH net-next v2 1/3] bonding: 3ad: add support for 200G speed Nikolay Aleksandrov
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Nikolay Aleksandrov @ 2021-02-10 20:43 UTC (permalink / raw)
  To: netdev
  Cc: roopa, andy, j.vosburgh, vfalico, kuba, davem, alexander.duyck,
	idosch, Nikolay Aleksandrov

From: Nikolay Aleksandrov <nikolay@nvidia.com>

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


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

* [PATCH net-next v2 1/3] bonding: 3ad: add support for 200G speed
  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 ` Nikolay Aleksandrov
  2021-02-10 20:43 ` [PATCH net-next v2 2/3] bonding: 3ad: add support for 400G speed Nikolay Aleksandrov
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nikolay Aleksandrov @ 2021-02-10 20:43 UTC (permalink / raw)
  To: netdev
  Cc: roopa, andy, j.vosburgh, vfalico, kuba, davem, alexander.duyck,
	idosch, Nikolay Aleksandrov

From: Nikolay Aleksandrov <nikolay@nvidia.com>

In order to be able to use 3ad mode with 200G 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 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


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

* [PATCH net-next v2 2/3] bonding: 3ad: add support for 400G speed
  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
  2021-02-10 20:43 ` [PATCH net-next v2 3/3] bonding: 3ad: Print an error for unknown speeds Nikolay Aleksandrov
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nikolay Aleksandrov @ 2021-02-10 20:43 UTC (permalink / raw)
  To: netdev
  Cc: roopa, andy, j.vosburgh, vfalico, kuba, davem, alexander.duyck,
	idosch, Nikolay Aleksandrov

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


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

* [PATCH net-next v2 3/3] bonding: 3ad: Print an error for unknown speeds
  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 ` [PATCH net-next v2 2/3] bonding: 3ad: add support for 400G speed Nikolay Aleksandrov
@ 2021-02-10 20:43 ` 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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nikolay Aleksandrov @ 2021-02-10 20:43 UTC (permalink / raw)
  To: netdev
  Cc: roopa, andy, j.vosburgh, vfalico, kuba, davem, alexander.duyck,
	idosch, Nikolay Aleksandrov

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 <nikolay@nvidia.com>
---
 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


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

* Re: [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning
  2021-02-10 20:43 [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning Nikolay Aleksandrov
                   ` (2 preceding siblings ...)
  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 ` Alexander Duyck
  2021-02-11  2:06 ` Jay Vosburgh
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Alexander Duyck @ 2021-02-10 21:05 UTC (permalink / raw)
  To: Nikolay Aleksandrov
  Cc: Netdev, roopa, Andy Gospodarek, Jay Vosburgh, Veaceslav Falico,
	Jakub Kicinski, David Miller, idosch, Nikolay Aleksandrov

On Wed, Feb 10, 2021 at 12:43 PM Nikolay Aleksandrov
<razor@blackwall.org> wrote:
>
> From: Nikolay Aleksandrov <nikolay@nvidia.com>
>
> 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>

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

* Re: [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning
  2021-02-10 20:43 [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning Nikolay Aleksandrov
                   ` (3 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: Jay Vosburgh @ 2021-02-11  2:06 UTC (permalink / raw)
  To: Nikolay Aleksandrov
  Cc: netdev, roopa, andy, vfalico, kuba, davem, alexander.duyck,
	idosch, Nikolay Aleksandrov

Nikolay Aleksandrov <razor@blackwall.org> wrote:

>From: Nikolay Aleksandrov <nikolay@nvidia.com>
>
>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 <jay.vosburgh@canonical.com>

	-J

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

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

* Re: [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning
  2021-02-10 20:43 [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning Nikolay Aleksandrov
                   ` (4 preceding siblings ...)
  2021-02-11  2:06 ` Jay Vosburgh
@ 2021-02-11 10:25 ` Nicolas Dichtel
  2021-02-11 22:40 ` patchwork-bot+netdevbpf
  6 siblings, 0 replies; 8+ messages in thread
From: Nicolas Dichtel @ 2021-02-11 10:25 UTC (permalink / raw)
  To: Nikolay Aleksandrov, netdev
  Cc: roopa, andy, j.vosburgh, vfalico, kuba, davem, alexander.duyck,
	idosch, Nikolay Aleksandrov

Le 10/02/2021 à 21:43, Nikolay Aleksandrov a écrit :
> From: Nikolay Aleksandrov <nikolay@nvidia.com>
> 
> 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 <nicolas.dichtel@6wind.com>

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

* Re: [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning
  2021-02-10 20:43 [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning Nikolay Aleksandrov
                   ` (5 preceding siblings ...)
  2021-02-11 10:25 ` Nicolas Dichtel
@ 2021-02-11 22:40 ` patchwork-bot+netdevbpf
  6 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-11 22:40 UTC (permalink / raw)
  To: Nikolay Aleksandrov
  Cc: netdev, roopa, andy, j.vosburgh, vfalico, kuba, davem,
	alexander.duyck, idosch, nikolay

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 <nikolay@nvidia.com>
> 
> 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



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

end of thread, other threads:[~2021-02-11 22:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH net-next v2 2/3] bonding: 3ad: add support for 400G speed Nikolay Aleksandrov
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

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