Commit 3952af4d authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

bonding: add 802.3ad support for 100G speeds

Similar to other speeds, add 100G to bonding 802.3ad code.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c39d0454
...@@ -93,7 +93,8 @@ enum ad_link_speed_type { ...@@ -93,7 +93,8 @@ enum ad_link_speed_type {
AD_LINK_SPEED_10000MBPS, AD_LINK_SPEED_10000MBPS,
AD_LINK_SPEED_20000MBPS, AD_LINK_SPEED_20000MBPS,
AD_LINK_SPEED_40000MBPS, AD_LINK_SPEED_40000MBPS,
AD_LINK_SPEED_56000MBPS AD_LINK_SPEED_56000MBPS,
AD_LINK_SPEED_100000MBPS,
}; };
/* compare MAC addresses */ /* compare MAC addresses */
...@@ -258,6 +259,7 @@ static inline int __check_agg_selection_timer(struct port *port) ...@@ -258,6 +259,7 @@ static inline int __check_agg_selection_timer(struct port *port)
* %AD_LINK_SPEED_20000MBPS * %AD_LINK_SPEED_20000MBPS
* %AD_LINK_SPEED_40000MBPS * %AD_LINK_SPEED_40000MBPS
* %AD_LINK_SPEED_56000MBPS * %AD_LINK_SPEED_56000MBPS
* %AD_LINK_SPEED_100000MBPS
*/ */
static u16 __get_link_speed(struct port *port) static u16 __get_link_speed(struct port *port)
{ {
...@@ -305,6 +307,10 @@ static u16 __get_link_speed(struct port *port) ...@@ -305,6 +307,10 @@ static u16 __get_link_speed(struct port *port)
speed = AD_LINK_SPEED_56000MBPS; speed = AD_LINK_SPEED_56000MBPS;
break; break;
case SPEED_100000:
speed = AD_LINK_SPEED_100000MBPS;
break;
default: default:
/* unknown speed value from ethtool. shouldn't happen */ /* unknown speed value from ethtool. shouldn't happen */
speed = 0; speed = 0;
...@@ -681,6 +687,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator) ...@@ -681,6 +687,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator)
case AD_LINK_SPEED_56000MBPS: case AD_LINK_SPEED_56000MBPS:
bandwidth = aggregator->num_of_ports * 56000; bandwidth = aggregator->num_of_ports * 56000;
break; break;
case AD_LINK_SPEED_100000MBPS:
bandwidth = aggregator->num_of_ports * 100000;
break;
default: default:
bandwidth = 0; /* to silence the compiler */ 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