Commit 9c2db446 authored by David S. Miller's avatar David S. Miller

Merge branch 'bond-3ad-200g-400g'

Nikolay Aleksandrov says:

====================
bonding: 3ad: support for 200G/400G ports and more verbose warning
xk
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
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6bda2f6f 5edf55ad
......@@ -73,6 +73,8 @@ enum ad_link_speed_type {
AD_LINK_SPEED_50000MBPS,
AD_LINK_SPEED_56000MBPS,
AD_LINK_SPEED_100000MBPS,
AD_LINK_SPEED_200000MBPS,
AD_LINK_SPEED_400000MBPS,
};
/* compare MAC addresses */
......@@ -245,6 +247,8 @@ 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
* %AD_LINK_SPEED_400000MBPS
*/
static u16 __get_link_speed(struct port *port)
{
......@@ -312,10 +316,18 @@ static u16 __get_link_speed(struct port *port)
speed = AD_LINK_SPEED_100000MBPS;
break;
case SPEED_200000:
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)
pr_warn_once("%s: (slave %s): unknown ethtool speed (%d) for port %d (set it to 0)\n",
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);
......@@ -733,6 +745,12 @@ 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;
case AD_LINK_SPEED_400000MBPS:
bandwidth = nports * 400000;
break;
default:
bandwidth = 0; /* to silence the compiler */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment