[dpdk-stable] patch 'net: fix Intel prepare function for IP checksum offload' has been queued to stable release 18.08.1
Kevin Traynor
ktraynor at redhat.com
Tue Nov 20 20:12:52 CET 2018
Hi,
FYI, your patch has been queued to stable release 18.08.1
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/23/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.
Thanks.
Kevin Traynor
---
>From 1f1265e78ee179831a0d34c5afb5498cc1987064 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard at 6wind.com>
Date: Wed, 19 Sep 2018 16:42:08 +0200
Subject: [PATCH] net: fix Intel prepare function for IP checksum offload
[ upstream commit ae0207d4b5048a6af9bc30e0956d30461b813148 ]
Current Intel tx prepare function does not properly handle the
case where only IP checksum is requested, without requesting
any L4 checksum or TSO: IP checksum is not properly reset to 0
and output packet may contain invalid IP checksum.
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Signed-off-by: Didier Pallard <didier.pallard at 6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
---
lib/librte_net/rte_net.h | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h
index b6ab6e1d5..e59760a0a 100644
--- a/lib/librte_net/rte_net.h
+++ b/lib/librte_net/rte_net.h
@@ -123,12 +123,14 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
inner_l3_offset += m->outer_l2_len + m->outer_l3_len;
+ if (ol_flags & PKT_TX_IPV4) {
+ ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,
+ inner_l3_offset);
+
+ if (ol_flags & PKT_TX_IP_CKSUM)
+ ipv4_hdr->hdr_checksum = 0;
+ }
+
if ((ol_flags & PKT_TX_UDP_CKSUM) == PKT_TX_UDP_CKSUM) {
if (ol_flags & PKT_TX_IPV4) {
- ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,
- inner_l3_offset);
-
- if (ol_flags & PKT_TX_IP_CKSUM)
- ipv4_hdr->hdr_checksum = 0;
-
udp_hdr = (struct udp_hdr *)((char *)ipv4_hdr +
m->l3_len);
@@ -147,10 +149,4 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
(ol_flags & PKT_TX_TCP_SEG)) {
if (ol_flags & PKT_TX_IPV4) {
- ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,
- inner_l3_offset);
-
- if (ol_flags & PKT_TX_IP_CKSUM)
- ipv4_hdr->hdr_checksum = 0;
-
/* non-TSO tcp or TSO */
tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr +
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-11-20 17:53:08.946846359 +0000
+++ 0062-net-fix-Intel-prepare-function-for-IP-checksum-offlo.patch 2018-11-20 17:53:07.000000000 +0000
@@ -1,15 +1,16 @@
-From ae0207d4b5048a6af9bc30e0956d30461b813148 Mon Sep 17 00:00:00 2001
+From 1f1265e78ee179831a0d34c5afb5498cc1987064 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard at 6wind.com>
Date: Wed, 19 Sep 2018 16:42:08 +0200
Subject: [PATCH] net: fix Intel prepare function for IP checksum offload
+[ upstream commit ae0207d4b5048a6af9bc30e0956d30461b813148 ]
+
Current Intel tx prepare function does not properly handle the
case where only IP checksum is requested, without requesting
any L4 checksum or TSO: IP checksum is not properly reset to 0
and output packet may contain invalid IP checksum.
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
-Cc: stable at dpdk.org
Signed-off-by: Didier Pallard <didier.pallard at 6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
More information about the stable
mailing list