From: Eric Dumazet <eric.dumazet@gmail.com>
To: Nikolay Aleksandrov <nikolay@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, andy@greyhouse.net,
fubar@us.ibm.com, vfalico@redhat.com
Subject: Re: [PATCH net-next v3 2/3] bonding: modify the old and add new xmit hash policies
Date: Thu, 26 Sep 2013 09:02:31 -0700 [thread overview]
Message-ID: <1380211351.3165.189.camel@edumazet-glaptop> (raw)
In-Reply-To: <1380204582-27144-3-git-send-email-nikolay@redhat.com>
On Thu, 2013-09-26 at 16:09 +0200, Nikolay Aleksandrov wrote:
> This patch adds two new hash policy modes which use skb_flow_dissect:
> 3 - Encapsulated layer 2+3
> 4 - Encapsulated layer 3+4
> There should be a good improvement for tunnel users in those modes.
> It also changes the old hash functions to:
> hash ^= (__force u32)flow.dst ^ (__force u32)flow.src;
> hash ^= (hash >> 16);
> hash ^= (hash >> 8);
>
> Where hash will be initialized either to L2 hash, that is
> SRCMAC[5] XOR DSTMAC[5], or to flow->ports which should be extracted
> from the upper layer. Flow's dst and src are also extracted based on the
> xmit policy either directly from the buffer or by using skb_flow_dissect,
> but in both cases if the protocol is IPv6 then dst and src are obtained by
> ipv6_addr_hash() on the real addresses. In case of a non-dissectable
> packet, the algorithms fall back to L2 hashing.
> The bond_set_mode_ops() function is now obsolete and thus deleted
> because it was used only to set the proper hash policy. Also we trim a
> pointer from struct bonding because we no longer need to keep the hash
> function, now there's only a single hash function - bond_xmit_hash that
> works based on bond->params.xmit_policy.
>
> The hash function and skb_flow_dissect were suggested by Eric Dumazet.
> The layer names were suggested by Andy Gospodarek, because I suck at
> semantics.
>
> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
> ---
> v2: fix a bug in bond_flow_dissect which might've caused the use of
> uninitalized flow_keys and make use of skb_flow_get_ports
> v3: no change
> One line is intentionally left at 82 chars since it's the whole function
> and IMO looks better that way.
>
> drivers/net/bonding/bond_3ad.c | 2 +-
> drivers/net/bonding/bond_main.c | 197 ++++++++++++++-------------------------
> drivers/net/bonding/bond_sysfs.c | 2 -
> drivers/net/bonding/bonding.h | 3 +-
> include/uapi/linux/if_bonding.h | 2 +
> 5 files changed, 72 insertions(+), 134 deletions(-)
I love this patch, thanks for following up on this one.
Reviewed-by: Eric Dumazet <edumazet@google.com>
next prev parent reply other threads:[~2013-09-26 16:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 14:09 [PATCH net-next v3 0/3] bonding: modify the current and add new hash functions Nikolay Aleksandrov
2013-09-26 14:09 ` [PATCH net-next v3 1/3] flow_dissector: factor out the ports extraction in skb_flow_get_ports Nikolay Aleksandrov
2013-09-26 14:36 ` Veaceslav Falico
2013-09-26 15:27 ` [PATCH] Eric Dumazet
2013-09-26 15:40 ` [PATCH] Nikolay Aleksandrov
2013-09-26 15:44 ` [PATCH] Nikolay Aleksandrov
2013-09-26 15:53 ` [PATCH] Eric Dumazet
2013-09-26 15:44 ` [PATCH] net: flow_dissector: fix thoff for IPPROTO_AH Eric Dumazet
2013-09-26 15:48 ` Nikolay Aleksandrov
2013-09-26 16:05 ` Eric Dumazet
2013-09-26 16:03 ` Nikolay Aleksandrov
2013-09-26 16:03 ` Daniel Borkmann
2013-09-30 19:34 ` David Miller
2013-09-26 14:09 ` [PATCH net-next v3 2/3] bonding: modify the old and add new xmit hash policies Nikolay Aleksandrov
2013-09-26 14:34 ` Veaceslav Falico
2013-09-26 16:02 ` Eric Dumazet [this message]
2013-09-26 14:09 ` [PATCH net-next v3 3/3] bonding: document the new xmit policy modes and update the changed ones Nikolay Aleksandrov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380211351.3165.189.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@redhat.com \
--cc=vfalico@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox