From: Jason Wang <jasowang@redhat.com> To: Yuri Benditovich <yuri.benditovich@daynix.com> Cc: "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, "Michael S . Tsirkin" <mst@redhat.com>, Network Development <netdev@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, virtualization <virtualization@lists.linux-foundation.org>, Yan Vugenfirer <yan@daynix.com> Subject: Re: [PATCH 1/4] virtio-net: add definitions for host USO feature Date: Wed, 12 May 2021 09:21:31 +0800 [thread overview] Message-ID: <b6ccd865-deec-47e1-df19-c10fd8ee107f@redhat.com> (raw) In-Reply-To: <CAOEp5OfAEb4=C7GK_EJvJnoTTk-ebdg0RygShPwbn3O67ucQ2Q@mail.gmail.com> 在 2021/5/11 下午5:21, Yuri Benditovich 写道: > On Tue, May 11, 2021 at 11:24 AM Jason Wang <jasowang@redhat.com> wrote: >> On Tue, May 11, 2021 at 4:12 PM Yuri Benditovich >> <yuri.benditovich@daynix.com> wrote: >>> On Tue, May 11, 2021 at 9:47 AM Jason Wang <jasowang@redhat.com> wrote: >>>> >>>> 在 2021/5/11 下午12:42, Yuri Benditovich 写道: >>>>> Define feature bit and GSO type according to the VIRTIO >>>>> specification. >>>>> >>>>> Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> >>>>> --- >>>>> include/uapi/linux/virtio_net.h | 2 ++ >>>>> 1 file changed, 2 insertions(+) >>>>> >>>>> diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h >>>>> index 3f55a4215f11..a556ac735d7f 100644 >>>>> --- a/include/uapi/linux/virtio_net.h >>>>> +++ b/include/uapi/linux/virtio_net.h >>>>> @@ -57,6 +57,7 @@ >>>>> * Steering */ >>>>> #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ >>>>> >>>>> +#define VIRTIO_NET_F_HOST_USO 56 /* Host can handle USO packets */ >>> This is the virtio-net feature >> Right, I miss this part. >> >>>>> #define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */ >>>>> #define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */ >>>>> #define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */ >>>>> @@ -130,6 +131,7 @@ struct virtio_net_hdr_v1 { >>>>> #define VIRTIO_NET_HDR_GSO_TCPV4 1 /* GSO frame, IPv4 TCP (TSO) */ >>>>> #define VIRTIO_NET_HDR_GSO_UDP 3 /* GSO frame, IPv4 UDP (UFO) */ >>>>> #define VIRTIO_NET_HDR_GSO_TCPV6 4 /* GSO frame, IPv6 TCP */ >>>>> +#define VIRTIO_NET_HDR_GSO_UDP_L4 5 /* GSO frame, IPv4 UDP (USO) */ >>> This is respective GSO type >>> >>>> >>>> This is the gso_type not the feature actually. >>>> >>>> I wonder what's the reason for not >>>> >>>> 1) introducing a dedicated virtio-net feature bit for this >>>> (VIRTIO_NET_F_GUEST_GSO_UDP_L4. >>> This series is not for GUEST's feature, it is only for host feature. >>> >>>> 2) toggle the NETIF_F_GSO_UDP_L4 feature for tuntap based on the >>>> negotiated feature. >>> The NETIF_F_GSO_UDP_L4 would be required for the guest RX path. >>> The guest TX path does not require any flags to be propagated, it only >>> allows the guest to transmit large UDP packets and have them >>> automatically splitted. >>> (This is similar to HOST_UFO but does packet segmentation instead of >>> fragmentation. GUEST_UFO indeed requires a respective NETIF flag, as >>> it is unclear whether the guest is capable of receiving such packets). >> So I think it's better to implement TX/RX in the same series unless >> there's something missed: >> >> For Guest TX, NETIF_F_GSO_UDP_L4 needs to be enabled in the guest >> virtio-net only when VIRTIO_NET_F_HOST_USO is negotiated. > I understand that this is what should be done when this feature will > be added to Linux virtio-net driver. > But at the moment we do not have enough resources to work on it. > Currently we have a clear use case and ability to test in on Windows guest. > Respective QEMU changes are pending for kernel patches, current > reference is https://github.com/daynix/qemu/tree/uso This looks fine but as replied in another thread. We can test both TX and RX with Linux guests simply: We can just use 2 VMs, and let one VM send GSO_UDP_L4 packet to another, then both tx and rx in both guest (virtio-net) and host (virtio-net) are tested? Thanks > >> For guest RX, NETIF_F_GSO_UDP_L4 needs to be enabled on the host >> tuntap only when VIRTIO_NET_F_GUEST_USO is neogiated. > Currently we are not able to use guest RX UDP GSO. > In order to do that we at least should be able to build our Windows > drivers with the most updated driver development kit (2004+). > At the moment we can't, this task is in a plan but can take several > months. So we do not have a test/use case with Windows VM. > > >> Thanks >> >>>> Thanks >>>> >>>> >>>>> #define VIRTIO_NET_HDR_GSO_ECN 0x80 /* TCP has ECN set */ >>>>> __u8 gso_type; >>>>> __virtio16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */
WARNING: multiple messages have this Message-ID (diff)
From: Jason Wang <jasowang@redhat.com> To: Yuri Benditovich <yuri.benditovich@daynix.com> Cc: "Michael S . Tsirkin" <mst@redhat.com>, Network Development <netdev@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, virtualization <virtualization@lists.linux-foundation.org>, Yan Vugenfirer <yan@daynix.com>, Jakub Kicinski <kuba@kernel.org>, "David S. Miller" <davem@davemloft.net> Subject: Re: [PATCH 1/4] virtio-net: add definitions for host USO feature Date: Wed, 12 May 2021 09:21:31 +0800 [thread overview] Message-ID: <b6ccd865-deec-47e1-df19-c10fd8ee107f@redhat.com> (raw) In-Reply-To: <CAOEp5OfAEb4=C7GK_EJvJnoTTk-ebdg0RygShPwbn3O67ucQ2Q@mail.gmail.com> 在 2021/5/11 下午5:21, Yuri Benditovich 写道: > On Tue, May 11, 2021 at 11:24 AM Jason Wang <jasowang@redhat.com> wrote: >> On Tue, May 11, 2021 at 4:12 PM Yuri Benditovich >> <yuri.benditovich@daynix.com> wrote: >>> On Tue, May 11, 2021 at 9:47 AM Jason Wang <jasowang@redhat.com> wrote: >>>> >>>> 在 2021/5/11 下午12:42, Yuri Benditovich 写道: >>>>> Define feature bit and GSO type according to the VIRTIO >>>>> specification. >>>>> >>>>> Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> >>>>> --- >>>>> include/uapi/linux/virtio_net.h | 2 ++ >>>>> 1 file changed, 2 insertions(+) >>>>> >>>>> diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h >>>>> index 3f55a4215f11..a556ac735d7f 100644 >>>>> --- a/include/uapi/linux/virtio_net.h >>>>> +++ b/include/uapi/linux/virtio_net.h >>>>> @@ -57,6 +57,7 @@ >>>>> * Steering */ >>>>> #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ >>>>> >>>>> +#define VIRTIO_NET_F_HOST_USO 56 /* Host can handle USO packets */ >>> This is the virtio-net feature >> Right, I miss this part. >> >>>>> #define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */ >>>>> #define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */ >>>>> #define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */ >>>>> @@ -130,6 +131,7 @@ struct virtio_net_hdr_v1 { >>>>> #define VIRTIO_NET_HDR_GSO_TCPV4 1 /* GSO frame, IPv4 TCP (TSO) */ >>>>> #define VIRTIO_NET_HDR_GSO_UDP 3 /* GSO frame, IPv4 UDP (UFO) */ >>>>> #define VIRTIO_NET_HDR_GSO_TCPV6 4 /* GSO frame, IPv6 TCP */ >>>>> +#define VIRTIO_NET_HDR_GSO_UDP_L4 5 /* GSO frame, IPv4 UDP (USO) */ >>> This is respective GSO type >>> >>>> >>>> This is the gso_type not the feature actually. >>>> >>>> I wonder what's the reason for not >>>> >>>> 1) introducing a dedicated virtio-net feature bit for this >>>> (VIRTIO_NET_F_GUEST_GSO_UDP_L4. >>> This series is not for GUEST's feature, it is only for host feature. >>> >>>> 2) toggle the NETIF_F_GSO_UDP_L4 feature for tuntap based on the >>>> negotiated feature. >>> The NETIF_F_GSO_UDP_L4 would be required for the guest RX path. >>> The guest TX path does not require any flags to be propagated, it only >>> allows the guest to transmit large UDP packets and have them >>> automatically splitted. >>> (This is similar to HOST_UFO but does packet segmentation instead of >>> fragmentation. GUEST_UFO indeed requires a respective NETIF flag, as >>> it is unclear whether the guest is capable of receiving such packets). >> So I think it's better to implement TX/RX in the same series unless >> there's something missed: >> >> For Guest TX, NETIF_F_GSO_UDP_L4 needs to be enabled in the guest >> virtio-net only when VIRTIO_NET_F_HOST_USO is negotiated. > I understand that this is what should be done when this feature will > be added to Linux virtio-net driver. > But at the moment we do not have enough resources to work on it. > Currently we have a clear use case and ability to test in on Windows guest. > Respective QEMU changes are pending for kernel patches, current > reference is https://github.com/daynix/qemu/tree/uso This looks fine but as replied in another thread. We can test both TX and RX with Linux guests simply: We can just use 2 VMs, and let one VM send GSO_UDP_L4 packet to another, then both tx and rx in both guest (virtio-net) and host (virtio-net) are tested? Thanks > >> For guest RX, NETIF_F_GSO_UDP_L4 needs to be enabled on the host >> tuntap only when VIRTIO_NET_F_GUEST_USO is neogiated. > Currently we are not able to use guest RX UDP GSO. > In order to do that we at least should be able to build our Windows > drivers with the most updated driver development kit (2004+). > At the moment we can't, this task is in a plan but can take several > months. So we do not have a test/use case with Windows VM. > > >> Thanks >> >>>> Thanks >>>> >>>> >>>>> #define VIRTIO_NET_HDR_GSO_ECN 0x80 /* TCP has ECN set */ >>>>> __u8 gso_type; >>>>> __virtio16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2021-05-12 1:21 UTC|newest] Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-11 4:42 [PATCH 0/4] Add host USO support to TUN device Yuri Benditovich 2021-05-11 4:42 ` Yuri Benditovich 2021-05-11 4:42 ` [PATCH 1/4] virtio-net: add definitions for host USO feature Yuri Benditovich 2021-05-11 4:42 ` Yuri Benditovich 2021-05-11 6:47 ` Jason Wang 2021-05-11 6:47 ` Jason Wang 2021-05-11 8:12 ` Yuri Benditovich 2021-05-11 8:12 ` Yuri Benditovich 2021-05-11 8:24 ` Jason Wang 2021-05-11 8:24 ` Jason Wang 2021-05-11 9:21 ` Yuri Benditovich 2021-05-11 9:21 ` Yuri Benditovich 2021-05-12 1:21 ` Jason Wang [this message] 2021-05-12 1:21 ` Jason Wang 2021-05-11 4:42 ` [PATCH 2/4] virtio-net: add support of UDP segmentation (USO) on the host Yuri Benditovich 2021-05-11 4:42 ` Yuri Benditovich 2021-05-11 6:47 ` Jason Wang 2021-05-11 6:47 ` Jason Wang 2021-05-11 8:23 ` Yuri Benditovich 2021-05-11 8:23 ` Yuri Benditovich 2021-05-11 8:31 ` Jason Wang 2021-05-11 8:31 ` Jason Wang 2021-05-11 17:47 ` Willem de Bruijn 2021-05-11 17:47 ` Willem de Bruijn 2021-05-12 6:09 ` Yuri Benditovich 2021-05-12 6:09 ` Yuri Benditovich 2021-05-12 14:32 ` Willem de Bruijn 2021-05-12 14:32 ` Willem de Bruijn 2021-05-12 18:56 ` Yuri Benditovich 2021-05-12 18:56 ` Yuri Benditovich 2021-05-12 19:53 ` Willem de Bruijn 2021-05-12 19:53 ` Willem de Bruijn 2021-05-11 4:42 ` [PATCH 3/4] tun: define feature bit for USO support Yuri Benditovich 2021-05-11 4:42 ` Yuri Benditovich 2021-05-11 4:42 ` [PATCH 4/4] tun: indicate support for USO feature Yuri Benditovich 2021-05-11 4:42 ` Yuri Benditovich 2021-05-11 6:50 ` Jason Wang 2021-05-11 6:50 ` Jason Wang 2021-05-11 8:33 ` Yuri Benditovich 2021-05-11 8:33 ` Yuri Benditovich 2021-05-11 19:06 ` Yuri Benditovich 2021-05-11 19:06 ` Yuri Benditovich 2021-05-12 1:33 ` Jason Wang 2021-05-12 1:33 ` Jason Wang 2021-05-12 5:24 ` Yuri Benditovich 2021-05-12 5:24 ` Yuri Benditovich [not found] ` <CACGkMEsZBCzV+d_eLj1aYT+pkS5m1QAy7q8rUkNsdV0C8aL8tQ@mail.gmail.com> [not found] ` <CAOEp5OeSankfA6urXLW_fquSMrZ+WYXDtKNacort1UwR=WgxqA@mail.gmail.com> [not found] ` <CACGkMEt3bZrdqbWtWjSkXvv5v8iCHiN8hkD3T602RZnb6nPd9A@mail.gmail.com> [not found] ` <CAOEp5Odw=eaQWZCXr+U8PipPtO1Avjw-t3gEdKyvNYxuNa5TfQ@mail.gmail.com> [not found] ` <CACGkMEuqXaJxGqC+CLoq7k4XDu+W3E3Kk3WvG-D6tnn2K4ZPNA@mail.gmail.com> [not found] ` <CAOEp5OfB62SQzxMj_GkVD4EM=Z+xf43TPoTZwMbPPa3BsX2ooA@mail.gmail.com> 2021-05-13 7:04 ` Jason Wang 2021-05-13 7:04 ` Jason Wang 2021-05-13 8:14 ` Yuri Benditovich 2021-05-13 8:14 ` Yuri Benditovich 2021-05-13 20:43 ` Willem de Bruijn 2021-05-13 20:43 ` Willem de Bruijn 2021-05-14 5:48 ` Yuri Benditovich 2021-05-14 5:48 ` Yuri Benditovich 2021-05-13 20:34 ` Willem de Bruijn 2021-05-13 20:34 ` Willem de Bruijn 2021-05-14 7:16 ` Jason Wang 2021-05-14 7:16 ` Jason Wang 2021-05-14 7:38 ` Yuri Benditovich 2021-05-14 7:38 ` Yuri Benditovich 2021-05-14 12:41 ` Willem de Bruijn 2021-05-14 12:41 ` Willem de Bruijn
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=b6ccd865-deec-47e1-df19-c10fd8ee107f@redhat.com \ --to=jasowang@redhat.com \ --cc=davem@davemloft.net \ --cc=kuba@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mst@redhat.com \ --cc=netdev@vger.kernel.org \ --cc=virtualization@lists.linux-foundation.org \ --cc=yan@daynix.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: linkBe 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.