From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hangbin Liu Subject: Re: [PATCH net] bonding: discard lowest hash bit for 802.3ad layer3+4 Date: Mon, 6 Nov 2017 08:59:21 +0800 Message-ID: <20171106005921.GA13972@leo.usersys.redhat.com> References: <1509893773-28453-1-git-send-email-liuhangbin@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev , Paolo Abeni , "David S. Miller" To: Eric Dumazet Return-path: Received: from mail-pf0-f178.google.com ([209.85.192.178]:53068 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750750AbdKFA75 (ORCPT ); Sun, 5 Nov 2017 19:59:57 -0500 Received: by mail-pf0-f178.google.com with SMTP id e64so6474960pfk.9 for ; Sun, 05 Nov 2017 16:59:57 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Sun, Nov 05, 2017 at 01:38:47PM -0800, Eric Dumazet wrote: > > diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c > > index c99dc59..728fa08 100644 > > --- a/drivers/net/bonding/bond_main.c > > +++ b/drivers/net/bonding/bond_main.c > > @@ -3237,7 +3237,7 @@ u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb) > > > > if (bond->params.xmit_policy == BOND_XMIT_POLICY_ENCAP34 && > > skb->l4_hash) > > - return skb->hash; > > + return skb->hash >> 1; > > Why are you changing this part ? > > The l4 hash provided by local TCP stack does not use a pathological > XOR based on ports/addresses, > but a random value with pretty good entropy. > Oh, my bad. I only tested the patch works, but not carefully check the skb->hash when skb->l4_hash is 1. Will send a v2 patch to fix this. Regards Hangbin