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
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(+)
@@ -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*/staticu16__get_link_speed(structport*port){
@@ -312,6 +314,10 @@ static u16 __get_link_speed(struct port *port)speed=AD_LINK_SPEED_100000MBPS;break;+caseSPEED_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)caseAD_LINK_SPEED_100000MBPS:bandwidth=nports*100000;break;+caseAD_LINK_SPEED_200000MBPS:+bandwidth=nports*200000;+break;default:bandwidth=0;/* to silence the compiler */}
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(+)
@@ -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*/staticu16__get_link_speed(structport*port){
@@ -318,6 +320,10 @@ static u16 __get_link_speed(struct port *port)speed=AD_LINK_SPEED_200000MBPS;break;+caseSPEED_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)caseAD_LINK_SPEED_200000MBPS:bandwidth=nports*200000;break;+caseAD_LINK_SPEED_400000MBPS:+bandwidth=nports*400000;+break;default:bandwidth=0;/* to silence the compiler */}
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(-)
@@ -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;}
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>
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
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(-)
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.
[...]