lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <1415274772-8029-4-git-send-email-Jianhua.Xie@freescale.com> Date: Thu, 6 Nov 2014 19:52:50 +0800 From: Xie Jianhua <Jianhua.Xie@...escale.com> To: <netdev@...r.kernel.org> CC: Jianhua Xie <jianhua.xie@...escale.com>, Jianhua Xie <Jianhua.Xie@...escale.com>, Jay Vosburgh <j.vosburgh@...il.com>, "Veaceslav Falico" <vfalico@...il.com>, Andy Gospodarek <andy@...yhouse.net>, "David S. Miller" <davem@...emloft.net> Subject: [PATCH RFC net-next 3/5] bonding: Introduce 20Gbps AD link speed From: Jianhua Xie <Jianhua.Xie@...escale.com> This patch inserts 20Gbps bitmask, fixes aggregated bandwidth calculation based on 20Gbps slave links. CC: Jay Vosburgh <j.vosburgh@...il.com> CC: Veaceslav Falico <vfalico@...il.com> CC: Andy Gospodarek <andy@...yhouse.net> CC: David S. Miller <davem@...emloft.net> Signed-off-by: Jianhua Xie <jianhua.xie@...escale.com> --- drivers/net/bonding/bond_3ad.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 250232e..a1acc0e 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -89,6 +89,7 @@ #define AD_LINK_SPEED_BITMASK_1000MBPS 0x8 #define AD_LINK_SPEED_BITMASK_2500MBPS 0x10 #define AD_LINK_SPEED_BITMASK_10000MBPS 0x20 +#define AD_LINK_SPEED_BITMASK_20000MBPS 0x40 /* compare MAC addresses */ #define MAC_ADDRESS_EQUAL(A, B) \ @@ -248,6 +249,7 @@ static inline int __check_agg_selection_timer(struct port *port) * %AD_LINK_SPEED_BITMASK_1000MBPS, * %AD_LINK_SPEED_BITMASK_2500MBPS, * %AD_LINK_SPEED_BITMASK_10000MBPS + * %AD_LINK_SPEED_BITMASK_20000MBPS */ static u16 __get_link_speed(struct port *port) { @@ -283,6 +285,10 @@ static u16 __get_link_speed(struct port *port) speed = AD_LINK_SPEED_BITMASK_10000MBPS; break; + case SPEED_20000: + speed = AD_LINK_SPEED_BITMASK_20000MBPS; + break; + default: /* unknown speed value from ethtool. shouldn't happen */ speed = 0; @@ -649,6 +655,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator) case AD_LINK_SPEED_BITMASK_10000MBPS: bandwidth = aggregator->num_of_ports * 10000; break; + case AD_LINK_SPEED_BITMASK_20000MBPS: + bandwidth = aggregator->num_of_ports * 20000; + break; default: bandwidth = 0; /* to silence the compiler */ } -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists