From: Paolo Abeni <pabeni@redhat.com>
To: Willem de Bruijn <willemb@google.com>
Cc: virtio-comment@lists.linux.dev, maxime.coquelin@redhat.com,
Eelco Chaudron <echaudro@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Stefano Garzarella <sgarzare@redhat.com>
Subject: Re: [PATCH v6 1/2] virtio-net: define UDP tunnel segmentation offload feature
Date: Tue, 30 Jul 2024 09:38:21 +0200 [thread overview]
Message-ID: <46f6da7e-d20d-42b3-b23b-73237ae323fe@redhat.com> (raw)
In-Reply-To: <CA+FuTSc7hoJPuWSWwZCogzyUHcnD_2d5+ihFZZaKFAn7R==2UQ@mail.gmail.com>
On 7/29/24 23:36, Willem de Bruijn wrote:
> On Mon, Jul 29, 2024 at 5:04 PM Willem de Bruijn <willemb@google.com> wrote:
>>
>> On Mon, Jul 29, 2024 at 7:30 AM Paolo Abeni <pabeni@redhat.com> wrote:
>>>
>>> The VIRTIO_NET_HDR_GSO_UDP_TUNNEL is a gso_type flag allowing GSO over
>>> UDP tunnel. It can be negotiated on both the host and guest sides.
>>>
>>> One constraint addressed here is that the virtio side (either device or
>>> driver) receiving a UDP tunneled GSO packet must be able to reconstruct
>>> completely the inner and outer headers offset - to allow for later GSO.
>>>
>>> To accommodate such need, new fields are introduced in the virtio_net
>>> header: outer_th_offset, inner_protocol_type and inner_nh_offset.
>>> They map directly to the corresponding header information. The inner
>>> transport header is implied by the (inner) checksum offload.
>>>
>>> Those fields are required because a virtio device H/W implementation
>>> performing segmentation for UDP tunneled packet will need to touch
>>> the outer transport protocol (for the UDP length filed), the
>>> inner network protocol (for the total length field, in the IPv4
>>> case).
>>>
>>> Note that segmentation will additionally need to touch
>>> the outer network protocol and the inner transport protocol. The first
>>> is implied/easily found with trivial parsing, the latter is identified
>>> by the existing csum_start field.
>>>
>>> Note that there is no concept of UDP tunnel type negotiation (e.g.
>>> vxlan, geneve, vxlan-gpe, etc.), as a virtio device H/W implementation
>>> can perform segmentation for every possible UDP-tunnel given the
>>> specified new fields.
>>> In the reverse direction, if a virtio device H/W implementation receives
>>> some traffic for an unknown or unsupported UDP tunnel, it will simply
>>> not aggregate the wire packet in GSO one.
>>>
>>> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
>
>>> +
>>> +\begin{note}
>>> +The valid complete checksum of the outer UDP header of individual segments
>>> +can be computed by the driver prior to segmentation only if the GSO packet
>>> +size is a multiple of \field{gso_size}.
>>> +\end{note}
>>
>> Might be helpful to explain why. E.g., ", because then all segments
>> have the same size and thus all data included in the outer UDP
>> checksum is the same for every segment. These pre-computed segment
>> length and checksum fields are different from those of the GSO
>> packet."
>
> Does this part belong in patch 2/2?
Possibly is a bit border-line.
IMHO it could belong to this patch, too. The idea is to specify one of
the scenarios what will not require checksum offload.
Thanks,
Paolo
next prev parent reply other threads:[~2024-07-30 7:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-29 11:30 [PATCH v6 0/2] virtio-net: define UDP tunnel offload Paolo Abeni
2024-07-29 11:30 ` [PATCH v6 1/2] virtio-net: define UDP tunnel segmentation offload feature Paolo Abeni
2024-07-29 21:04 ` Willem de Bruijn
2024-07-29 21:36 ` Willem de Bruijn
2024-07-30 7:38 ` Paolo Abeni [this message]
2024-07-30 7:33 ` Paolo Abeni
2024-07-31 4:10 ` Jason Wang
2024-07-31 9:02 ` Paolo Abeni
2024-07-31 11:17 ` Paolo Abeni
2024-08-01 3:14 ` Jason Wang
2024-07-31 14:25 ` Willem de Bruijn
2024-07-31 17:32 ` Paolo Abeni
2024-07-31 18:21 ` Willem de Bruijn
2024-08-01 3:19 ` Jason Wang
2024-08-01 15:34 ` Paolo Abeni
2024-08-01 16:04 ` Willem de Bruijn
2024-08-01 16:26 ` Paolo Abeni
2024-08-01 18:04 ` Willem de Bruijn
2024-08-02 3:30 ` Jason Wang
2024-08-01 2:24 ` Jason Wang
2024-07-31 1:57 ` Jason Wang
2024-07-31 8:43 ` Paolo Abeni
2024-07-31 9:16 ` Paolo Abeni
2024-08-01 3:01 ` Jason Wang
2024-07-29 11:30 ` [PATCH v6 2/2] virtio-net: define UDP tunnel checksum " Paolo Abeni
2024-07-29 21:35 ` Willem de Bruijn
2024-07-30 7:52 ` Paolo Abeni
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=46f6da7e-d20d-42b3-b23b-73237ae323fe@redhat.com \
--to=pabeni@redhat.com \
--cc=echaudro@redhat.com \
--cc=jasowang@redhat.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