From: Heng Qi <hengqi@linux.alibaba.com>
To: netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>
Subject: [PATCH net-next 0/4] virtio-net: avoid XDP and _F_GUEST_CSUM
Date: Mon, 19 Jun 2023 18:57:34 +0800 [thread overview]
Message-ID: <20230619105738.117733-1-hengqi@linux.alibaba.com> (raw)
virtio-net needs to clear the VIRTIO_NET_F_GUEST_CSUM feature when
loading XDP. The main reason for doing this is because
VIRTIO_NET_F_GUEST_CSUM allows to receive packets marked as
VIRTIO_NET_HDR_F_NEEDS_CSUM. Such packets are not compatible with
XDP programs, because we cannot guarantee that the csum_{start, offset}
fields are correct after XDP modifies the packets.
There is also an existing problem, in the same host vm-vm (eg
[vm]<->[ovs vhost-user]<->[vm]) scenario, loading XDP will cause packet loss.
To solve the above problems, we have discussed in the [1] proposal, and
now try to solve it through the method of reprobing fields suggested
by Jason.
[1] https://lists.oasis-open.org/archives/virtio-dev/202305/msg00318.html
Heng Qi (4):
virtio-net: a helper for probing the pseudo-header checksum
virtio-net: reprobe csum related fields for skb passed by XDP
virtio-net: virtio-net: support coexistence of XDP and _F_GUEST_CSUM
virtio-net: remove F_GUEST_CSUM check for XDP loading
drivers/net/virtio_net.c | 173 +++++++++++++++++++++++++++++++++++----
1 file changed, 158 insertions(+), 15 deletions(-)
--
2.19.1.6.gb485710b
next reply other threads:[~2023-06-19 10:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 10:57 Heng Qi [this message]
2023-06-19 10:57 ` [PATCH net-next 1/4] virtio-net: a helper for probing the pseudo-header checksum Heng Qi
2023-06-19 12:30 ` kernel test robot
2023-06-19 12:30 ` kernel test robot
2023-06-19 10:57 ` [PATCH net-next 2/4] virtio-net: reprobe csum related fields for skb passed by XDP Heng Qi
2023-06-19 11:27 ` Michael S. Tsirkin
2023-06-19 12:29 ` Heng Qi
2023-06-19 13:32 ` kernel test robot
2023-06-19 10:57 ` [PATCH net-next 3/4] virtio-net: support coexistence of XDP and _F_GUEST_CSUM Heng Qi
2023-06-19 11:26 ` Michael S. Tsirkin
2023-06-19 12:31 ` Heng Qi
2023-06-20 3:24 ` Heng Qi
2023-06-20 10:50 ` Michael S. Tsirkin
2023-06-20 11:01 ` Heng Qi
2023-06-20 12:10 ` Michael S. Tsirkin
2023-06-20 14:15 ` Heng Qi
2023-06-19 10:57 ` [PATCH net-next 4/4] virtio-net: remove F_GUEST_CSUM check for XDP loading Heng Qi
2023-06-19 11:16 ` Michael S. Tsirkin
2023-06-19 12:41 ` Heng Qi
2023-06-19 14:33 ` Michael S. Tsirkin
2023-06-19 15:43 ` Heng Qi
2023-06-19 18:36 ` Michael S. Tsirkin
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=20230619105738.117733-1-hengqi@linux.alibaba.com \
--to=hengqi@linux.alibaba.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=jasowang@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=xuanzhuo@linux.alibaba.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;
as well as URLs for NNTP newsgroup(s).