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 1/2] virtio-net: define UDP tunnel segmentation offload feature
Date: Mon, 14 Oct 2024 09:20:36 +0200	[thread overview]
Message-ID: <10bc51b2-efbe-4f33-a1b3-827de4d0cd10@redhat.com> (raw)
In-Reply-To: <CACGkMEu5GWZrYVRN==F=vrRQQGnxj_WqX86YZ+diqC3s3m2m_A@mail.gmail.com>

On 10/11/24 04:08, Jason Wang wrote:
> I wonder why not just introduce new fields for the inner, like what
> has beed done in the linux sk_buff implementation? I know I propose
> this before, but now I think it can help to reduce the complexity and
> more aligned with the for non GSO tunneling.
> 
> ...
>          union {
>                  __be16          inner_protocol;
>                  __u8            inner_ipproto;
>          };
> ...
>          __u16                   inner_transport_header;
>          __u16                   inner_network_header;
>          __u16                   inner_mac_header;
> 
>          __be16                  protocol;
>          __u16                   transport_header;
>          __u16                   network_header;
> ...

As the discussion touches many different points, please allow me 
wrap-up, in order of increasing conflictuality:

1) there are a few points clarification requests which are actually not 
needed, because the asked text is already there in the spec.

2) the DATA_VALID handling proposed in v9 is bad, let me scratch it for now.

3) you feel the handling of csum_start/csum_offset is confusing and 
would prefer adding new fields for the inner headers.

Let's try to set this most critical point first. Adding new fields for 
the inner headers has several dis-advantages:

- we will need to add more new fields WRT to the current proposal. Using 
csum_start/csum_offset for the outer we will need:

   inner_nh
   inner_th
   inner_offset

instead of just outer_th, inner_nh

- AFAICS, due to align reason, the above will require an additional 
<unused> field.

- the implementation will not be able to reuse the existing code, 
leading to duplication and/or hacks.

- will discard most of the discussions on this topics done in the past 
several revisions

I understand that one of the argument in favor of using new fields for 
the inner headers is to align with the current linux kernel handling of 
tunnel related fields. Please note that the existence of skb->inner_* 
fields is quite blamed, I suggest avoiding taking them as a reference.

AFAICS the main argument against the layout I proposed is the 
inconsistent usage of csum_start that will refer to the inner header for 
GSO over udp-tunnel packets and to the outer header in when the device 
does not expose the GSO over UDP tunnel support.

I argue that dubbing such behavior as inconsistent is a matter of 
interpretation: in both case the csum_start field refers to the 
innermost header that the device is able to parse.

Finally, the specification change to describe the new field usage I 
propose is quite minimal and almost don't touch the existing definition: 
it's difficult for alternative specification being simpler - especially 
when such alternative specification will need more new fields to be 
described.

Cheers,

Paolo


  parent reply	other threads:[~2024-10-14  7:20 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 [this message]
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
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=10bc51b2-efbe-4f33-a1b3-827de4d0cd10@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