From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 85837F94 for ; Wed, 12 Oct 2016 08:44:13 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 11 Oct 2016 23:44:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,332,1473145200"; d="scan'208";a="1063682205" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga002.jf.intel.com with ESMTP; 11 Oct 2016 23:44:10 -0700 Date: Wed, 12 Oct 2016 14:44:24 +0800 From: Yuanhan Liu To: John Daley Cc: dpdk stable , Nelson Escobar Message-ID: <57fddbc8.JLVgVK+HglY0RkAC%yuanhan.liu@linux.intel.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [dpdk-stable] patch 'net/enic: fix bad L4 checksum flag on ICMP packets' has been queued to stable release 16.07.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 06:44:14 -0000 Hi, FYI, your patch has been queued to stable release 16.07.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 this Friday. So please shutout if anyone has objections. Thanks. --yliu --- >>From 41d8d3289205984e88ab4518652c199c91a6fb83 Mon Sep 17 00:00:00 2001 From: John Daley Date: Wed, 17 Aug 2016 15:15:26 -0700 Subject: [PATCH] net/enic: fix bad L4 checksum flag on ICMP packets [ upstream commit e7a29e46d1e8781feb1f8df1126e47a143d6b507 ] The bad L4 checksum flag was set on IP packets which were not also TCP or UDP packets. This includes ICMP, IGMP and OSPF packets. L4 ptypes were being treated as bits instead of values within the L4 mask causing the code to check L4 checksum in the completion queue and incorrectly set the L4 bad checksum flag. Fixes: 947d860c821f ("enic: improve Rx performance") Reviewed-by: Nelson Escobar Signed-off-by: John Daley --- drivers/net/enic/enic_rxtx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 50f0b28..ad59613 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -212,9 +212,12 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf) /* checksum flags */ if (!enic_cq_rx_desc_csum_not_calc(cqrd) && (mbuf->packet_type & RTE_PTYPE_L3_IPV4)) { + uint32_t l4_flags = mbuf->packet_type & RTE_PTYPE_L4_MASK; + if (unlikely(!enic_cq_rx_desc_ipv4_csum_ok(cqrd))) pkt_flags |= PKT_RX_IP_CKSUM_BAD; - if (mbuf->packet_type & (RTE_PTYPE_L4_UDP | RTE_PTYPE_L4_TCP)) { + if (l4_flags == RTE_PTYPE_L4_UDP || + l4_flags == RTE_PTYPE_L4_TCP) { if (unlikely(!enic_cq_rx_desc_tcp_udp_csum_ok(cqrd))) pkt_flags |= PKT_RX_L4_CKSUM_BAD; } -- 1.9.0