public inbox for virtio-comment@lists.linux.dev
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: virtio-comment@lists.linux.dev, maxime.coquelin@redhat.com,
	Eelco Chaudron <echaudro@redhat.com>,
	Stefano Garzarella <sgarzare@redhat.com>,
	Willem de Bruijn <willemb@google.com>,
	kshankar@marvell.com
Subject: Re: [PATCH v9 0/2] virtio-net: define UDP tunnel offload
Date: Wed, 9 Oct 2024 10:08:35 +0200	[thread overview]
Message-ID: <d7accb9e-4978-400e-8675-8188d02dfda4@redhat.com> (raw)
In-Reply-To: <CACGkMEsV9jrsAHLZn2gJWeb7+R0W360n7fjg6E3QiA4CZgaUvg@mail.gmail.com>

On 10/9/24 09:24, Jason Wang wrote:
> On Sat, Oct 5, 2024 at 12:53 AM Paolo Abeni <pabeni@redhat.com> wrote:
>>
>> On 10/4/24 10:13, Paolo Abeni wrote:
>>> Note that such while the mentioned PoC is based on the previous
>>> iteration of this change, it already deals with all the delta introduced
>>> here except the refined DATA_VALID handling. I'll try to update the PoC
>>> WRT that ASAP.
>>
>> The updated PoC dealing with DATA_VALID according to the spec change is
>> avail here:
>>
>> https://github.com/pabeni/linux-devel/commits/virtio_tunnel_gso_v9/
>> https://github.com/pabeni/qemu/commits/virtio_tunnel_gso_v9/
>>
>> It's slighly less untested than the previous iteration, as the
>> CHECKSUM_COMPLETE/DATA_VALID code path is explicitly covered allowing
>> the user-space to configure the tun device to set DATA_VALID on the
>> xmitted virtio hdr.
>>
>> @Jason, please LMK is something additional is needed to reach the board
>> voting.
> 
> It should work at a first glance. But the tnl_offset and new ioctl
> seems a little odd. Any reason we can't deduce it from the features?

The tun device does not know the complete layout of the virtio_net_hdr. 
It knows only the total size but is not aware i.e. if the 
VIRTIO_NET_F_MRG_RXBUF or the VIRTIO_NET_F_HASH_REPORT are negotiated.

To support UDP tunnel GSO offload, The tun device must be able to parse 
correctly the UDP tunnel fields, so it must know at least the tun fields 
offset inside the virtio_net_hdr structure.

The new ioctl is added to pass such additional data. A possible 
alternative would be piggybacking the mentioned 'tunnel offset' inside 
the offload 'long'. I avoid such option because it felt quite hackish, 
but it you feel that as preferrable it's still doable.

Another option would let the user-space know to tun all the relevant 
negotiated features, but that look quite more invasive (I would avoid 
such option at least for a PoC).

> I'm asking since the design needs to work with hardware implementation
> as well. So any channel outside virtio (e.g the TUNSETTNLOFFLOAD) may
> not work.

I've no idea about the above. My uneducated guess is that H/W 
implementation will still need a S/W interface, and such interface could 
implement the new ioctl(). In any case I guess a new SW and/or firmware 
revision will be needed to support UDP tunnel GSO offload on virtio H/W 
impl.

/P


  reply	other threads:[~2024-10-09  8:09 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04  8:13 [PATCH v9 0/2] virtio-net: define UDP tunnel offload Paolo Abeni
2024-10-04  8:13 ` [PATCH v9 1/2] virtio-net: define UDP tunnel segmentation offload feature Paolo Abeni
2024-10-09  7:18   ` Jason Wang
2024-10-09  8:37     ` Paolo Abeni
2024-10-10  3:17       ` Jason Wang
2024-10-10  7:40         ` Paolo Abeni
2024-10-11  2:08           ` Jason Wang
2024-10-11  7:50             ` Paolo Abeni
2024-10-14  7:20             ` Paolo Abeni
2024-10-17  6:47               ` Jason Wang
2024-10-17 15:34                 ` Paolo Abeni
2024-10-18  4:26                   ` Jason Wang
2024-10-18 10:10                     ` Paolo Abeni
2024-10-20 22:28                       ` Willem de Bruijn
2024-10-21 15:47                         ` Paolo Abeni
2024-10-22  7:54                           ` Jason Wang
2024-10-23 20:57                             ` Willem de Bruijn
2024-10-25  8:41                               ` Jason Wang
2024-10-21  6:54                       ` Jason Wang
2024-10-21 16:27                         ` Paolo Abeni
2024-10-22  7:42                           ` Jason Wang
2024-10-22 16:56                             ` Paolo Abeni
2024-10-25  8:28                               ` Jason Wang
2024-10-25 11:50                                 ` Paolo Abeni
2024-10-25 13:28                                   ` Willem de Bruijn
2024-10-25 14:35                                     ` Paolo Abeni
2024-10-25 15:47                                       ` Willem de Bruijn
2024-10-28  3:27                                   ` Jason Wang
2024-10-28 12:08                                     ` Paolo Abeni
2024-10-28 12:26                                       ` Willem de Bruijn
2024-10-28 14:23                                         ` Paolo Abeni
2024-10-29  7:32                                         ` Jason Wang
2024-10-04  8:13 ` [PATCH v9 2/2] virtio-net: define UDP tunnel checksum " Paolo Abeni
2024-10-09  7:18   ` Jason Wang
2024-10-09  9:39     ` Paolo Abeni
2024-10-10  4:22       ` Jason Wang
2024-10-04 16:53 ` [PATCH v9 0/2] virtio-net: define UDP tunnel offload Paolo Abeni
2024-10-09  7:24   ` Jason Wang
2024-10-09  8:08     ` Paolo Abeni [this message]
2024-10-10  2:29       ` Jason Wang

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=d7accb9e-4978-400e-8675-8188d02dfda4@redhat.com \
    --to=pabeni@redhat.com \
    --cc=echaudro@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kshankar@marvell.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=virtio-comment@lists.linux.dev \
    --cc=willemb@google.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