All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Jon Kohler <jon@nutanix.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Nicolas Dichtel <nicolas.dichtel@6wind.com>,
	Jason Wang <jasowang@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] flow_dissector: save computed hash in __skb_get_hash_symmetric_net()
Date: Wed, 3 Dec 2025 10:35:56 +0200	[thread overview]
Message-ID: <aS_2bPm-ZC9ghGPD@shredder> (raw)
In-Reply-To: <B4079F8E-E823-4848-A3CE-81D319B1FC4F@nutanix.com>

On Tue, Dec 02, 2025 at 04:53:43PM +0000, Jon Kohler wrote:
> I thought about that, but the nice bit about doing it like I have it
> is that the flow keys / L4 hash bits are getting evaluated properly.
> 
> If we do it like you’ve suggested, we’re asserting that L4 hash is always
> true, right?

Yes, for some reason I thought that the flow dissector always sets it in
this case.

> How about another helper, that only tun consumes, which does all of these
> things, such that the code still stays clean on the flow dissector side
> and we don’t have to mess with any other callers?
> 
> That would be the middle ground between what you suggested and what I did
> 
> Thoughts?

Not sure. We already have __skb_get_hash_symmetric_net() and
__skb_get_hash_symmetric() and now we will have a third variant. In this
case, maybe adding a 'save_hash' argument is better. It also means that
the next time someone needs to calculate a symmetric hash they will
pause to think if it needs to be set in the skb. I believe that when
skb_get_hash() was replaced with __skb_get_hash_symmetric() in tun the
assumption was that the hash will be stored in the skb as with
skb_get_hash().

      reply	other threads:[~2025-12-03  8:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 18:19 [PATCH net-next] flow_dissector: save computed hash in __skb_get_hash_symmetric_net() Jon Kohler
2025-11-26  7:45 ` Ido Schimmel
2025-11-26 16:21   ` Jon Kohler
2025-11-27  8:24     ` Ido Schimmel
2025-12-02 16:53       ` Jon Kohler
2025-12-03  8:35         ` Ido Schimmel [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=aS_2bPm-ZC9ghGPD@shredder \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jasowang@redhat.com \
    --cc=jon@nutanix.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=pabeni@redhat.com \
    --cc=xiyou.wangcong@gmail.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.