[dpdk-stable] patch 'net/virtio: check raw checksum failure' has been queued to LTS release 18.11.11

Kevin Traynor ktraynor at redhat.com
Thu Nov 5 13:40:06 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/10/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/2f9caa3cdcfc8d4e9465429e92befb6753ef2e1e

Thanks.

Kevin.

---
>From 2f9caa3cdcfc8d4e9465429e92befb6753ef2e1e Mon Sep 17 00:00:00 2001
From: Chas Williams <3chas3 at gmail.com>
Date: Thu, 1 Oct 2020 06:22:45 -0400
Subject: [PATCH] net/virtio: check raw checksum failure

[ upstream commit dd6d6704f5b83e42af6ef3674a54ce7fb80d0254 ]

rte_raw_cksum_mbuf can fail, so we should check to see if it
has. If so, return with an error.

Fixes: 96cb6711939e ("net/virtio: support Rx checksum offload")

Signed-off-by: Chas Williams <3chas3 at gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/virtio/virtio_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 8ce5c33940..ccf03fc774 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -844,7 +844,8 @@ virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
 			uint16_t csum = 0, off;
 
-			rte_raw_cksum_mbuf(m, hdr->csum_start,
+			if (rte_raw_cksum_mbuf(m, hdr->csum_start,
 				rte_pktmbuf_pkt_len(m) - hdr->csum_start,
-				&csum);
+				&csum) < 0)
+				return -EINVAL;
 			if (likely(csum != 0xffff))
 				csum = ~csum;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-05 12:38:55.563353252 +0000
+++ 0059-net-virtio-check-raw-checksum-failure.patch	2020-11-05 12:38:54.258896034 +0000
@@ -1 +1 @@
-From dd6d6704f5b83e42af6ef3674a54ce7fb80d0254 Mon Sep 17 00:00:00 2001
+From 2f9caa3cdcfc8d4e9465429e92befb6753ef2e1e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dd6d6704f5b83e42af6ef3674a54ce7fb80d0254 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -15,3 +16,2 @@
- drivers/net/virtio/virtio_rxtx.c            | 5 +++--
- drivers/net/virtio/virtio_rxtx_packed_avx.c | 5 +++--
- 2 files changed, 6 insertions(+), 4 deletions(-)
+ drivers/net/virtio/virtio_rxtx.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
@@ -20 +20 @@
-index 88c03bf40e..77934e8c58 100644
+index 8ce5c33940..ccf03fc774 100644
@@ -23 +23 @@
-@@ -911,7 +911,8 @@ virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
+@@ -844,7 +844,8 @@ virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
@@ -32,15 +31,0 @@
- 			if (likely(csum != 0xffff))
- 				csum = ~csum;
-diff --git a/drivers/net/virtio/virtio_rxtx_packed_avx.c b/drivers/net/virtio/virtio_rxtx_packed_avx.c
-index ce035b5747..9bc62719ee 100644
---- a/drivers/net/virtio/virtio_rxtx_packed_avx.c
-+++ b/drivers/net/virtio/virtio_rxtx_packed_avx.c
-@@ -337,7 +337,8 @@ virtio_vec_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
- 			uint16_t csum = 0, off;
- 
--			rte_raw_cksum_mbuf(m, hdr->csum_start,
-+			if (rte_raw_cksum_mbuf(m, hdr->csum_start,
- 				rte_pktmbuf_pkt_len(m) - hdr->csum_start,
--				&csum);
-+				&csum) < 0)
-+				return -1;



More information about the stable mailing list