Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-01-17 12:02:21 +0100
committerJiri Slaby <jslaby@suse.cz>2019-01-18 15:30:19 +0100
commit101bc14ad1c36e9e0b8763a095af93a38083d14c (patch)
treef8495ebe02aafb9a5e3f7ab884eafa4759ec0ba3
parent5b23d92fbb823fb61fece2e24e8d6949f743b454 (diff)
virtio-net: fail XDP set if guest csum is negotiated
(networking-stable-18_12_03).
-rw-r--r--patches.suse/virtio-net-fail-XDP-set-if-guest-csum-is-negotiated.patch37
-rw-r--r--series.conf1
2 files changed, 38 insertions, 0 deletions
diff --git a/patches.suse/virtio-net-fail-XDP-set-if-guest-csum-is-negotiated.patch b/patches.suse/virtio-net-fail-XDP-set-if-guest-csum-is-negotiated.patch
new file mode 100644
index 0000000000..bbc4411255
--- /dev/null
+++ b/patches.suse/virtio-net-fail-XDP-set-if-guest-csum-is-negotiated.patch
@@ -0,0 +1,37 @@
+From: Jason Wang <jasowang@redhat.com>
+Date: Thu, 22 Nov 2018 14:36:31 +0800
+Subject: virtio-net: fail XDP set if guest csum is negotiated
+Git-commit: 18ba58e1c234ea1a2d9835ac8c1735d965ce4640
+Patch-mainline: v4.20-rc4
+References: networking-stable-18_12_03
+
+We don't support partial csumed packet since its metadata will be lost
+or incorrect during XDP processing. So fail the XDP set if guest_csum
+feature is negotiated.
+
+Fixes: f600b6905015 ("virtio_net: Add XDP support")
+Reported-by: Jesper Dangaard Brouer <brouer@redhat.com>
+Cc: Jesper Dangaard Brouer <brouer@redhat.com>
+Cc: Pavel Popa <pashinho1990@gmail.com>
+Cc: David Ahern <dsahern@gmail.com>
+Signed-off-by: Jason Wang <jasowang@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/net/virtio_net.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/virtio_net.c
++++ b/drivers/net/virtio_net.c
+@@ -1891,8 +1891,9 @@ static int virtnet_xdp_set(struct net_de
+ if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO4) ||
+ virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO6) ||
+ virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_ECN) ||
+- virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_UFO)) {
+- NL_SET_ERR_MSG_MOD(extack, "Can't set XDP while host is implementing LRO, disable LRO first");
++ virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_UFO) ||
++ virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) {
++ NL_SET_ERR_MSG_MOD(extack, "Can't set XDP while host is implementing LRO/CSUM, disable LRO/CSUM first");
+ return -EOPNOTSUPP;
+ }
+
diff --git a/series.conf b/series.conf
index 085b4276e3..2f6f778828 100644
--- a/series.conf
+++ b/series.conf
@@ -19387,6 +19387,7 @@
patches.suse/net-thunderx-set-xdp_prog-to-NULL-if-bpf_prog_add-fa.patch
patches.drivers/ibmvnic-Fix-RX-queue-buffer-cleanup.patch
patches.drivers/ibmvnic-Update-driver-queues-after-change-in-ring-si.patch
+ patches.suse/virtio-net-fail-XDP-set-if-guest-csum-is-negotiated.patch
patches.fixes/team-no-need-to-do-team_notify_peers-or-team_mcast_r.patch
patches.drivers/HID-input-Ignore-battery-reported-by-Symbol-DS4308.patch
patches.drivers/HID-uhid-forbid-UHID_CREATE-under-KERNEL_DS-or-eleva.patch