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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1405317926-27221-1-git-send-email-Jianhua.Xie@freescale.com>
Date:	Mon, 14 Jul 2014 14:05:26 +0800
From:	Xie Jianhua <Jianhua.Xie@...escale.com>
To:	<netdev@...r.kernel.org>
CC:	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>,
	Pan Jiafei <Jiafei.Pan@...escale.com>
Subject: [PATCH net] bonding: enhance L2 hash helper with packet type

From: Jianhua Xie <jianhua.xie@...escale.com>

Current L2 hash helper calculates destination eth addr and
source ether addr as L2 hash factors. This patch is adding
packet type ID field into hash factors, which can help to
distribute different types of packets like IPv4/IPv6 packets
to different slave devices while only BOND_XMIT_POLICY_LAYER2
is applied.

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>
CC: Pan Jiafei <Jiafei.Pan@...escale.com>

Signed-off-by: Jianhua Xie <jianhua.xie@...escale.com>
---
 drivers/net/bonding/bond_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 3a451b6..4a72c2f 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3002,7 +3002,7 @@ static inline u32 bond_eth_hash(struct sk_buff *skb)
 	struct ethhdr *data = (struct ethhdr *)skb->data;
 
 	if (skb_headlen(skb) >= offsetof(struct ethhdr, h_proto))
-		return data->h_dest[5] ^ data->h_source[5];
+		return data->h_dest[5] ^ data->h_source[5] ^ data->h_proto;
 
 	return 0;
 }
-- 
1.8.5

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ