public inbox for virtio-dev@lists.linux.dev
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Heng Qi <hengqi@linux.alibaba.com>
Cc: virtio-dev@lists.oasis-open.org,
	virtio-comment@lists.oasis-open.org,
	Parav Pandit <parav@nvidia.com>, Jason Wang <jasowang@redhat.com>,
	Yuri Benditovich <yuri.benditovich@daynix.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Subject: Re: [virtio-dev] Re: [virtio-comment] Re: [virtio-dev] Re: [virtio-comment] [PATCH v13] virtio-net: support inner header hash
Date: Tue, 9 May 2023 11:15:13 -0400	[thread overview]
Message-ID: <20230509110941-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <e3930c64-b7eb-a01e-39c9-0fe718756185@linux.alibaba.com>

On Tue, May 09, 2023 at 10:22:19PM +0800, Heng Qi wrote:
> 
> 
> 在 2023/5/5 下午10:56, Michael S. Tsirkin 写道:
> > On Fri, May 05, 2023 at 09:51:15PM +0800, Heng Qi wrote:
> > > On Thu, Apr 27, 2023 at 01:13:29PM -0400, Michael S. Tsirkin wrote:
> > > > On Thu, Apr 27, 2023 at 10:28:29AM +0800, Heng Qi wrote:
> > > > > 
> > > > > 在 2023/4/26 下午10:48, Michael S. Tsirkin 写道:
> > > > > > On Wed, Apr 26, 2023 at 10:14:30PM +0800, Heng Qi wrote:
> > > > > > > This does not mean that every device needs to implement and support all of
> > > > > > > these, they can choose to support some protocols they want.
> > > > > > > 
> > > > > > > I add these because we have scale application scenarios for modern protocols
> > > > > > > VXLAN-GPE/GENEVE:
> > > > > > > 
> > > > > > > +\item In scenarios where the same flow passing through different tunnels is expected to be received in the same queue,
> > > > > > > +      warm caches, lessing locking, etc. are optimized to obtain receiving performance.
> > > > > > > 
> > > > > > > 
> > > > > > > Maybe the legacy GRE, VXLAN-GPE and GENEVE? But it has a little crossover.
> > > > > > > 
> > > > > > > Thanks.
> > > > > > But VXLAN-GPE/GENEVE can use source port for entropy.
> > > > > > 
> > > > > > 	It is recommended that the UDP source port number
> > > > > > 	 be calculated using a hash of fields from the inner packet
> > > > > > 
> > > > > > That is best because
> > > > > > it allows end to end control and is protocol agnostic.
> > > > > Yes. I agree with this, I don't think we have an argument on this point
> > > > > right now.:)
> > > > > 
> > > > > For VXLAN-GPE/GENEVE or other modern tunneling protocols, we have to deal
> > > > > with
> > > > > scenarios where the same flow passes through different tunnels.
> > > > > 
> > > > > Having them hashed to the same rx queue, is hard to do via outer headers.
> > > > > > All that is missing is symmetric Toepliz and all is well?
> > > > > The scenarios above or in the commit log also require inner headers.
> > > > Hmm I am not sure I get it 100%.
> > > > Could you show an example with inner header hash in the port #,
> > > > hash is symmetric, and you still have trouble?
> > > > 
> > > > 
> > > > It kinds of sounds like not enough entropy is not the problem
> > > > at this point.
> > > Sorry for the late reply. :)
> > > 
> > > For modern tunneling protocols, yes.
> > > 
> > > > You now want to drop everything from the header
> > > > except the UDP source port. Is that a fair summary?
> > > > 
> > > For example, for the same flow passing through different VXLAN tunnels,
> > > packets in this flow have the same inner header and different outer
> > > headers. Sometimes these packets of the flow need to be hashed to the
> > > same rxq, then we can use the inner header as the hash input.
> > > 
> > > Thanks!
> > So, they will have the same source port yes?
> 
> Yes. The outer source port can be calculated using the 5-tuple of the
> original packet,
> and the outer ports are the same but the outer IPs are different after
> different directions of the same flow pass through different tunnels.
> > Any way to use that
> 
> We use it in monitoring, firewall and other scenarios.
> 
> > so we don't depend on a specific protocol?
> 
> Yes, selected tunneling protocols can be used in this scenario like this.
> 
> Thanks.
> 

No, the question was - can we generalize this somehow then?
For example, a flag to ignore source IP when hashing?
Or maybe just for UDP packets?

-- 
MST


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  reply	other threads:[~2023-05-09 15:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23  7:35 [virtio-dev] [PATCH v13] virtio-net: support inner header hash Heng Qi
2023-04-25 20:28 ` [virtio-dev] " Parav Pandit
2023-04-25 21:06   ` [virtio-dev] Re: [virtio-comment] " Michael S. Tsirkin
2023-04-25 21:39     ` [virtio-dev] " Parav Pandit
2023-04-26  4:12       ` [virtio-dev] " Michael S. Tsirkin
2023-04-26  4:27         ` [virtio-dev] " Parav Pandit
2023-04-26  5:02           ` [virtio-dev] " Michael S. Tsirkin
2023-04-26 13:42   ` [virtio-dev] " Heng Qi
2023-04-26 13:47     ` [virtio-dev] " Parav Pandit
2023-04-26 14:03       ` [virtio-dev] Re: [virtio-comment] " Heng Qi
2023-04-26 14:24         ` [virtio-dev] " Parav Pandit
2023-04-26 14:57           ` [virtio-dev] " Michael S. Tsirkin
2023-04-26 15:20             ` [virtio-dev] " Parav Pandit
2023-04-27  2:19           ` Heng Qi
2023-04-25 21:03 ` [virtio-dev] Re: [virtio-comment] " Michael S. Tsirkin
2023-04-26 14:14   ` Heng Qi
2023-04-26 14:48     ` Michael S. Tsirkin
2023-04-27  2:28       ` Heng Qi
2023-04-27 17:13         ` Michael S. Tsirkin
2023-05-05 13:51           ` [virtio-dev] Re: [virtio-comment] " Heng Qi
2023-05-05 14:56             ` Michael S. Tsirkin
2023-05-09 14:22               ` Heng Qi
2023-05-09 15:15                 ` Michael S. Tsirkin [this message]
2023-05-10  9:15                   ` [virtio-dev] Re: [virtio-comment] " Heng Qi
2023-05-11  6:22                     ` Michael S. Tsirkin
2023-05-12  6:00                       ` Heng Qi
2023-05-12  6:54                         ` Michael S. Tsirkin
2023-05-12  7:23                           ` Heng Qi
2023-05-12 11:27                             ` Michael S. Tsirkin
2023-05-15  6:51                               ` Heng Qi

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=20230509110941-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=parav@nvidia.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=xuanzhuo@linux.alibaba.com \
    --cc=yuri.benditovich@daynix.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