Skip to content

Commit

Permalink
bonding: add 802.3ad support for 25G speeds
Browse files Browse the repository at this point in the history
Cut-n-paste enablement of 802.3ad bonding on 25G NICs, which currently
report 0 as their bandwidth.

CC: Jay Vosburgh <[email protected]>
CC: Veaceslav Falico <[email protected]>
CC: Andy Gospodarek <[email protected]>
CC: [email protected]
Signed-off-by: Jarod Wilson <[email protected]>
Acked-by: Andy Gospodarek <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jarodwilson authored and davem330 committed Mar 17, 2017
1 parent be7164c commit 19ddde1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ enum ad_link_speed_type {
AD_LINK_SPEED_2500MBPS,
AD_LINK_SPEED_10000MBPS,
AD_LINK_SPEED_20000MBPS,
AD_LINK_SPEED_25000MBPS,
AD_LINK_SPEED_40000MBPS,
AD_LINK_SPEED_56000MBPS,
AD_LINK_SPEED_100000MBPS,
Expand Down Expand Up @@ -260,6 +261,7 @@ static inline int __check_agg_selection_timer(struct port *port)
* %AD_LINK_SPEED_2500MBPS,
* %AD_LINK_SPEED_10000MBPS
* %AD_LINK_SPEED_20000MBPS
* %AD_LINK_SPEED_25000MBPS
* %AD_LINK_SPEED_40000MBPS
* %AD_LINK_SPEED_56000MBPS
* %AD_LINK_SPEED_100000MBPS
Expand Down Expand Up @@ -302,6 +304,10 @@ static u16 __get_link_speed(struct port *port)
speed = AD_LINK_SPEED_20000MBPS;
break;

case SPEED_25000:
speed = AD_LINK_SPEED_25000MBPS;
break;

case SPEED_40000:
speed = AD_LINK_SPEED_40000MBPS;
break;
Expand Down Expand Up @@ -707,6 +713,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator)
case AD_LINK_SPEED_20000MBPS:
bandwidth = nports * 20000;
break;
case AD_LINK_SPEED_25000MBPS:
bandwidth = nports * 25000;
break;
case AD_LINK_SPEED_40000MBPS:
bandwidth = nports * 40000;
break;
Expand Down

0 comments on commit 19ddde1

Please sign in to comment.