From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id F103F2D13 for ; Thu, 1 Feb 2018 10:49:02 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A938A20C1F; Thu, 1 Feb 2018 04:49:02 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 01 Feb 2018 04:49:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ikfBK2PiazRntxPxk mNeQX6/UfmNxb+cnjLMLHt+g+4=; b=OaHMXuAdDCbCpOFTc4f3t/wiRHtXNSSBk OD5baVa3WTjGUqD36MHMBLbMvh4bCbcnxink4qpfY06bw9HAcdZJBH/4phm3D0Xh r1Z4282PD356Wvgmvz9Cf+8EnEYeyvebyzSHXL0BegFlXtz82ggfKeag0Pk4Tb9T 70VwphpZ3TrZz/z+9ImeePECS7ZIdfOg9oBWTfTb94GrW4w8vlpDj/3ZwSvgw0A/ oOSyQnNZKteFoBTnICPvZHTT+s27n+vv357m2CmGLoTR4dg3soxHJucBQyElH/R+ thqp52aMts0M5UsoxnZW+QwUcUB73BP9Q/AzQgdxwhcrvyYSWq6ZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=ikfBK2PiazRntxPxkmNeQX6/UfmNxb+cnjLMLHt+g+4=; b=WMAgHNMi 4KLtk6QiAV3vGtcuL3j9d7HBjPHHH1ESTQReNuVYHhq9Q9SFpmEaqDeodNWz0ovS lwipSJz9n7IDXWxOjHjsz2yAxtOtzbu1u0Y3ekePYYV++dEJ0wLUk8OiSSR4bOP+ sZkxRUUe9p0ft66/ivuElfGQZTTbX19lPZ62CnqDvZR5pzUgNTGgLcna24o/3NCI 7hIl6T3ovkqhncPshYOVSgHlSpi+aEPcZn9xqmlM+SBoCjMjJUS3P5jj7a7HIkWN EvQ/Eiz1IQqsiQzp+YqZx7ynS38TIeK/QnT9eRpMLvu+LQfzEtKBsFmQ7riVqeC5 kbOj9LLbP6+zkA== X-ME-Sender: Received: from yliu-mob.mtl.com (unknown [115.150.27.200]) by mail.messagingengine.com (Postfix) with ESMTPA id 8D822240DE; Thu, 1 Feb 2018 04:49:00 -0500 (EST) From: Yuanhan Liu To: Rafal Kozik Cc: Matthew Smith , Michal Krawczyk , dpdk stable Date: Thu, 1 Feb 2018 17:47:36 +0800 Message-Id: <1517478479-12417-22-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517478479-12417-1-git-send-email-yliu@fridaylinux.org> References: <1517478479-12417-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/ena: do not set Tx L4 offloads in Rx path' has been queued to LTS release 17.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 09:49:03 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.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 02/03/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 2cdcc8be44f3fdd05f0cb0bba92efdfaba02b723 Mon Sep 17 00:00:00 2001 From: Rafal Kozik 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 Signed-off-by: Rafal Kozik Signed-off-by: Michal Krawczyk --- 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 22db895..aa24ef3 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -260,16 +260,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; @@ -277,6 +278,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.7.4