netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Suryaputra <ssuryaextr@gmail.com>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] ipv4: Support multipath hashing on inner IP pkts for GRE tunnel
Date: Thu, 13 Jun 2019 11:32:26 -0400	[thread overview]
Message-ID: <20190613153226.GA4250@ubuntu> (raw)
In-Reply-To: <076bc564-7c97-f591-6b4c-2e540db4cb87@cumulusnetworks.com>

On Tue, Jun 11, 2019 at 10:29:56AM +0300, Nikolay Aleksandrov wrote:
> 
> Have you considered using the flow dissector and doing something similar to the bonding ?
> It does a full flow dissect via skb_flow_dissect_flow_keys() and uses whatever headers
> it needs, but that will support any tunneling protocol which the flow dissector
> recognizes and will be improved upon automatically by people adding to it.
> Also would avoid doing dissection by yourself.
> 
> The bond commit which added that was:
>  32819dc18348 ("bonding: modify the old and add new xmit hash policies")
> 

I didn't consider it and should. Thanks for pointing me to that
direction. It's simpler.

> >  /* if skb is set it will be used and fl4 can be NULL */
> >  int fib_multipath_hash(const struct net *net, const struct flowi4 *fl4,
> >  		       const struct sk_buff *skb, struct flow_keys *flkeys)
> > @@ -1828,12 +1876,13 @@ int fib_multipath_hash(const struct net *net, const struct flowi4 *fl4,
> >  	struct flow_keys hash_keys;
> >  	u32 mhash;
> >  
> > +	memset(&hash_keys, 0, sizeof(hash_keys));
> > +
> 
> This was an optimization, it was done on purpose to avoid doing anything when we
> have L3+4 configured (1) and the skb has its hash already calculated.
> 
Will revert to the original lines.

Thanks.

      reply	other threads:[~2019-06-13 15:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11  0:31 [PATCH net-next] ipv4: Support multipath hashing on inner IP pkts for GRE tunnel Stephen Suryaputra
2019-06-11  7:29 ` Nikolay Aleksandrov
2019-06-13 15:32   ` Stephen Suryaputra [this message]

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=20190613153226.GA4250@ubuntu \
    --to=ssuryaextr@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.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;
as well as URLs for NNTP newsgroup(s).