[dpdk-stable] patch 'net/ena: do not set Tx L4 offloads in Rx path' has been queued to LTS release 16.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Feb 7 17:46:38 CET 2018


Hi,

FYI, your patch has been queued to LTS release 16.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 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 4eb2722d0fe6d4222c543948e357eff6da85d22d Mon Sep 17 00:00:00 2001
From: Rafal Kozik <rk at semihalf.com>
Date: Thu, 25 Jan 2018 16:27:43 +0100
Subject: [PATCH] net/ena: do not set Tx L4 offloads in Rx path

[ upstream commit fd617795679019c7aea5ab1e8c85db02cf53f169 ]

Information about received packet type detected by NIC should be
stored in packet_type field of rte_mbuf. TX L4 offload flags should
not be set in RX path. Only fields that could be set in of_flags
during packet receiving are information if L4 and L3 checksum is
correct.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Reported-by: Matthew Smith <mgsmith at netgate.com>
Signed-off-by: Rafal Kozik <rk at semihalf.com>
Signed-off-by: Michal Krawczyk <mk at semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 6efe0c3c6..63c423627 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -248,16 +248,17 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
 				       struct ena_com_rx_ctx *ena_rx_ctx)
 {
 	uint64_t ol_flags = 0;
+	uint32_t packet_type = 0;
 
 	if (ena_rx_ctx->l4_proto == ENA_ETH_IO_L4_PROTO_TCP)
-		ol_flags |= PKT_TX_TCP_CKSUM;
+		packet_type |= RTE_PTYPE_L4_TCP;
 	else if (ena_rx_ctx->l4_proto == ENA_ETH_IO_L4_PROTO_UDP)
-		ol_flags |= PKT_TX_UDP_CKSUM;
+		packet_type |= RTE_PTYPE_L4_UDP;
 
 	if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV4)
-		ol_flags |= PKT_TX_IPV4;
+		packet_type |= RTE_PTYPE_L3_IPV4;
 	else if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV6)
-		ol_flags |= PKT_TX_IPV6;
+		packet_type |= RTE_PTYPE_L3_IPV6;
 
 	if (unlikely(ena_rx_ctx->l4_csum_err))
 		ol_flags |= PKT_RX_L4_CKSUM_BAD;
@@ -265,6 +266,7 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
 		ol_flags |= PKT_RX_IP_CKSUM_BAD;
 
 	mbuf->ol_flags = ol_flags;
+	mbuf->packet_type = packet_type;
 }
 
 static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,
-- 
2.14.2



More information about the stable mailing list