[dpdk-stable] patch 'net/virtio: check raw checksum failure' has been queued to stable release 19.11.6
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Wed Oct 28 11:44:55 CET 2020
Hi,
FYI, your patch has been queued to stable release 19.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/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.
Thanks.
Luca Boccassi
---
>From 35ce81d79f5c941fe93658a46e3019558b9f8ce1 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 060410577a..5211736d29 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -1184,9 +1184,10 @@ 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;
off = hdr->csum_offset + hdr->csum_start;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-10-28 10:35:15.962601219 +0000
+++ 0136-net-virtio-check-raw-checksum-failure.patch 2020-10-28 10:35:11.708833026 +0000
@@ -1,26 +1,26 @@
-From dd6d6704f5b83e42af6ef3674a54ce7fb80d0254 Mon Sep 17 00:00:00 2001
+From 35ce81d79f5c941fe93658a46e3019558b9f8ce1 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")
-Cc: stable at dpdk.org
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 +++--
- 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(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
-index 88c03bf40e..77934e8c58 100644
+index 060410577a..5211736d29 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
-@@ -910,9 +910,10 @@ virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
+@@ -1184,9 +1184,10 @@ virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
*/
uint16_t csum = 0, off;
@@ -33,23 +33,6 @@
if (likely(csum != 0xffff))
csum = ~csum;
off = hdr->csum_offset + hdr->csum_start;
-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
-@@ -336,9 +336,10 @@ 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;
- if (likely(csum != 0xffff))
- csum = ~csum;
- off = hdr->csum_offset + hdr->csum_start;
--
2.20.1
More information about the stable
mailing list