All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Jianguo Wu <wujianguo106@163.com>,
	mptcp@lists.linux.dev, "Westphal, Florian" <fwestpha@redhat.com>,
	Mat Martineau <mathew.j.martineau@linux.intel.com>
Subject: Re: [PATCH v2 1/4] mptcp: fix warning in __skb_flow_dissect() when do syn cookie for subflow join
Date: Fri, 11 Jun 2021 15:07:41 +0200	[thread overview]
Message-ID: <20210611130741.GS20020@breakpoint.cc> (raw)
In-Reply-To: <15a6b1e5c726b57359d08318545b83311f6e5f3f.camel@redhat.com>

Paolo Abeni <pabeni@redhat.com> wrote:
> On Thu, 2021-06-10 at 17:28 +0800, Jianguo Wu wrote:
> > From: Jianguo Wu <wujianguo@chinatelecom.cn>
> > 
> > I got the following warning message while doing the test:
> > 
> The above codes uses spaces instead of tabs. More importantly you can
> directly use inet6_ehashfn(), since such function is already visible.
> 
> I'm unsure if we could directly use inet_ehashfn() here: it will
> require making such function visible, and could affect TCP performances
> (in a very minor way) as the compiler may refuse to inline such
> function once that is not 'static'
> 
> @Florian, @Mat, WDYT?!?

I think this is all massive over-engineering.
Probably its enough to do

  th->seq % ARRAY_SIZE(join_entries);

... without any hashing.

I'd suggest to go for

jhash_3words(th->seq, net_hash_mix(net), th->sport << 16| th->dport, &secret)

and ignore network headers altogether.

      reply	other threads:[~2021-06-11 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10  9:28 [PATCH v2 1/4] mptcp: fix warning in __skb_flow_dissect() when do syn cookie for subflow join Jianguo Wu
2021-06-10 10:19 ` Paolo Abeni
2021-06-11 13:07   ` Florian Westphal [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=20210611130741.GS20020@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=fwestpha@redhat.com \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=wujianguo106@163.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.