[dpdk-stable] patch 'net/nfp: fix mbuf flags with checksum good' has been queued to LTS release 17.11.5
Yongseok Koh
yskoh at mellanox.com
Fri Nov 30 00:10:07 CET 2018
Hi,
FYI, your patch has been queued to LTS release 17.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/01/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.
Yongseok
---
>From 05ce1e29af1e5f2ece6876728103964dd29c0a9e Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero at netronome.com>
Date: Thu, 6 Sep 2018 17:02:56 +0100
Subject: [PATCH] net/nfp: fix mbuf flags with checksum good
[ upstream commit 0962b51d3c494b30602897731ef9d598e29b4f3b ]
If checksum offload enabled and hardware reports checksum as good,
update mbuf ol_flags with proper *_CKSUM_GOOD bits.
Fixes: b812daadad0d ("nfp: add Rx and Tx")
Signed-off-by: Alejandro Lucero <alejandro.lucero at netronome.com>
---
drivers/net/nfp/nfp_net.c | 15 +++++++--------
drivers/net/nfp/nfp_net_pmd.h | 2 ++
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 8ab28ddec..db6f3f465 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1822,21 +1822,20 @@ nfp_net_rx_cksum(struct nfp_net_rxq *rxq, struct nfp_net_rx_desc *rxd,
return;
/* If IPv4 and IP checksum error, fail */
- if ((rxd->rxd.flags & PCIE_DESC_RX_IP4_CSUM) &&
- !(rxd->rxd.flags & PCIE_DESC_RX_IP4_CSUM_OK))
+ if (unlikely((rxd->rxd.flags & PCIE_DESC_RX_IP4_CSUM) &&
+ !(rxd->rxd.flags & PCIE_DESC_RX_IP4_CSUM_OK)))
mb->ol_flags |= PKT_RX_IP_CKSUM_BAD;
+ else
+ mb->ol_flags |= PKT_RX_IP_CKSUM_GOOD;
/* If neither UDP nor TCP return */
if (!(rxd->rxd.flags & PCIE_DESC_RX_TCP_CSUM) &&
!(rxd->rxd.flags & PCIE_DESC_RX_UDP_CSUM))
return;
- if ((rxd->rxd.flags & PCIE_DESC_RX_TCP_CSUM) &&
- !(rxd->rxd.flags & PCIE_DESC_RX_TCP_CSUM_OK))
- mb->ol_flags |= PKT_RX_L4_CKSUM_BAD;
-
- if ((rxd->rxd.flags & PCIE_DESC_RX_UDP_CSUM) &&
- !(rxd->rxd.flags & PCIE_DESC_RX_UDP_CSUM_OK))
+ if (likely(rxd->rxd.flags & PCIE_DESC_RX_L4_CSUM_OK))
+ mb->ol_flags |= PKT_RX_L4_CKSUM_GOOD;
+ else
mb->ol_flags |= PKT_RX_L4_CKSUM_BAD;
}
diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
index 1ae0ea626..084dfe6b5 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
@@ -284,6 +284,8 @@ struct nfp_net_txq {
#define PCIE_DESC_RX_UDP_CSUM_OK (1 << 1)
#define PCIE_DESC_RX_VLAN (1 << 0)
+#define PCIE_DESC_RX_L4_CSUM_OK (PCIE_DESC_RX_TCP_CSUM_OK | \
+ PCIE_DESC_RX_UDP_CSUM_OK)
struct nfp_net_rx_desc {
union {
/* Freelist descriptor */
--
2.11.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-11-29 15:01:45.875136606 -0800
+++ 0013-net-nfp-fix-mbuf-flags-with-checksum-good.patch 2018-11-29 15:01:44.987962000 -0800
@@ -1,13 +1,14 @@
-From 0962b51d3c494b30602897731ef9d598e29b4f3b Mon Sep 17 00:00:00 2001
+From 05ce1e29af1e5f2ece6876728103964dd29c0a9e Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero at netronome.com>
Date: Thu, 6 Sep 2018 17:02:56 +0100
Subject: [PATCH] net/nfp: fix mbuf flags with checksum good
+[ upstream commit 0962b51d3c494b30602897731ef9d598e29b4f3b ]
+
If checksum offload enabled and hardware reports checksum as good,
update mbuf ol_flags with proper *_CKSUM_GOOD bits.
Fixes: b812daadad0d ("nfp: add Rx and Tx")
-Cc: stable at dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero at netronome.com>
---
@@ -16,10 +17,10 @@
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index 168088c6d..170b5d611 100644
+index 8ab28ddec..db6f3f465 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
-@@ -1779,21 +1779,20 @@ nfp_net_rx_cksum(struct nfp_net_rxq *rxq, struct nfp_net_rx_desc *rxd,
+@@ -1822,21 +1822,20 @@ nfp_net_rx_cksum(struct nfp_net_rxq *rxq, struct nfp_net_rx_desc *rxd,
return;
/* If IPv4 and IP checksum error, fail */
@@ -49,10 +50,10 @@
}
diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
-index c1b044eea..b01036df2 100644
+index 1ae0ea626..084dfe6b5 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
-@@ -293,6 +293,8 @@ struct nfp_net_txq {
+@@ -284,6 +284,8 @@ struct nfp_net_txq {
#define PCIE_DESC_RX_UDP_CSUM_OK (1 << 1)
#define PCIE_DESC_RX_VLAN (1 << 0)
More information about the stable
mailing list