bonding: 3ad: support for 200G/400G ports and more verbose warning
Subsystems (3)
v2 cover bonding: 3ad: support for 200G/400G ports and more verbose warning
From: Nikolay Aleksandrov <[email protected]>
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(-)
Signature · 1 line
2.29.2
PATCH v2 1/3 bonding: 3ad: add support for 200G speed
From: Nikolay Aleksandrov <[email protected]>
In order to be able to use 3ad mode with 200G devices we need to extend the supported speeds.
---
v2: no changes
drivers/net/bonding/bond_3ad.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/bonding/bond_3ad.c +9 -0
@@ -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 */ }
Signature · 1 line
2.29.2
PATCH v2 2/3 bonding: 3ad: add support for 400G speed
In reply to Nikolay AleksandrovFrom: Nikolay Aleksandrov <[email protected]>
In order to be able to use 3ad mode with 400G devices we need to extend the supported speeds.
---
v2: no changes
drivers/net/bonding/bond_3ad.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/bonding/bond_3ad.c +9 -0
@@ -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 */ }
Signature · 1 line
2.29.2
PATCH v2 3/3 bonding: 3ad: Print an error for unknown speeds
In reply to Nikolay AleksandrovFrom: Ido Schimmel <[email protected]>
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()
--- drivers/net/bonding/bond_3ad.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/bonding/bond_3ad.c +4 -4
@@ -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 ; }
Signature · 1 line
2.29.2
Quoted 18 lines · Nikolay Aleksandrov
From: Nikolay Aleksandrov <[email protected]>
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 usepr_err_onceinstead ofpr_warn_oncewhich would help future detection of unsupported speeds.v2: patch 03: use
pr_err_onceinstead ofWARN_ONCEThanks,
NikIdo Schimmel (1):
bonding: 3ad: Print an error for unknown speeds
Quoted 7 lines
Nikolay Aleksandrov (2):
bonding: 3ad: add support for 200G speed
bonding: 3ad: add support for 400G speeddrivers/net/bonding/bond_3ad.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-)
With this update the series looks good to me.
Quoted 17 lines · Nikolay Aleksandrov
From: Nikolay Aleksandrov <[email protected]>
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 usepr_err_onceinstead ofpr_warn_oncewhich would help future detection of unsupported speeds.v2: patch 03: use
pr_err_onceinstead ofWARN_ONCEThanks,
NikIdo Schimmel (1):
bonding: 3ad: Print an error for unknown speeds
Quoted 6 lines
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.
-J
---
-Jay Vosburgh, [email protected]
Le 10/02/2021 à 21:43, Nikolay Aleksandrov a écrit :
Quoted 17 lines
From: Nikolay Aleksandrov <[email protected]>
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 usepr_err_onceinstead ofpr_warn_oncewhich would help future detection of unsupported speeds.v2: patch 03: use
pr_err_onceinstead ofWARN_ONCEThanks,
NikIdo Schimmel (1):
bonding: 3ad: Print an error for unknown speeds
Quoted 7 lines
Nikolay Aleksandrov (2):
bonding: 3ad: add support for 200G speed
bonding: 3ad: add support for 400G speeddrivers/net/bonding/bond_3ad.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-)
This series was applied to netdev/net-next.git (refs/heads/master):
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
Quoted 10 lines · On Wed, 10 Feb 2021 22:43:30 +0200 you wrote:
From: Nikolay Aleksandrov <[email protected]>
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 usepr_err_onceinstead ofpr_warn_oncewhich 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