All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] virtio-net: avoid conflicts between XDP and GUEST_CSUM
@ 2023-06-24 12:26 Heng Qi
  2023-06-24 12:26 ` [PATCH net-next v2 1/3] virtio-net: reprobe csum related fields for skb passed by XDP Heng Qi
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Heng Qi @ 2023-06-24 12:26 UTC (permalink / raw)
  To: netdev, bpf
  Cc: Michael S . Tsirkin, Jason Wang, Xuan Zhuo, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend

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

---
v1->v2:
  - Squash v1's patch [1/4] and patch [2/4] into v2's patch [1/3]. @Michael S. Tsirkin
  - Some minor modifications.

Heng Qi (3):
  virtio-net: reprobe csum related fields for skb passed by XDP
  virtio-net: support coexistence of XDP and GUEST_CSUM
  virtio-net: remove GUEST_CSUM check for XDP loading

 drivers/net/virtio_net.c | 181 +++++++++++++++++++++++++++++++++++----
 1 file changed, 166 insertions(+), 15 deletions(-)

-- 
2.19.1.6.gb485710b


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-06-26  3:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-24 12:26 [PATCH net-next v2 0/3] virtio-net: avoid conflicts between XDP and GUEST_CSUM Heng Qi
2023-06-24 12:26 ` [PATCH net-next v2 1/3] virtio-net: reprobe csum related fields for skb passed by XDP Heng Qi
2023-06-24 19:28   ` Simon Horman
2023-06-25  2:17     ` Heng Qi
2023-06-25 21:53       ` Michael S. Tsirkin
2023-06-25  6:44   ` Jason Wang
2023-06-25  7:27     ` Heng Qi
2023-06-26  2:09       ` Jason Wang
2023-06-26  3:34         ` Heng Qi
2023-06-24 12:26 ` [PATCH net-next v2 2/3] virtio-net: support coexistence of XDP and GUEST_CSUM Heng Qi
2023-06-24 12:26 ` [PATCH net-next v2 3/3] virtio-net: remove GUEST_CSUM check for XDP Heng Qi

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.