From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 1AFEA1B1BE for ; Wed, 24 Jan 2018 16:40:05 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BEBD222374; Wed, 24 Jan 2018 10:40:04 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:40:04 -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=fm1; bh=kVNESGzk/HLVscnMQ aURC2svKhT5JjB7mzyGl8gfSOo=; b=RHUl2NMCvPzPyyxEy2dbt5YLcxJPC+yus t7DViw9xUqCLD2j8MbP0U2WwyEacnywneVO7MR/Vx3hz5F8Y4OSONVKpvGuwmWth 7yqQlJBNtJXL7laMDh3XXTi87LoQVHosoWkILRJkkMjCPxNcXWE30tWlaIEM5SIX AdvOW+hlFjlnDkMKK/Igh7LczI4OKXLLJCvYN48HG1Es9EettDbDZUukn+zqhiYs kMhVf8ANrdViEApzmkdj2yfD/hNg1ASmuNj5Pu987HRVvYlRayDCuXiaP0VCCPvS XP9neEjuCAiIxH5wryL++H5139p6HHu7NkA0AQcstADhd2BKcuPtQ== 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=kVNESGzk/HLVscnMQaURC2svKhT5JjB7mzyGl8gfSOo=; b=r6sF9gYZ coUxNOzgNew02R+6BBQC6RBu+Jz6vEfI6orrGiasBhy9q2VJgluN8yQQvMhiTHAS 1fGQzncghr6N9wn8j5E3Loz81+xLCUeviqyp6ViTlj3AokTrKvL21CxqcDdgDv3M FAkgD05U33wLjxkK0hFTLqypDiWLUKHhE/yPiDl8MER5Ha1fJV8B2K5zihhIsJWh Qpe4M5oRjfHSxNr16cRQi9vpgcIe3mzkPDCxrI+cda7ZA9W6LIz3fDBC20o0FeV9 gjxJE76iYb4kYvr6JG9Ti6IzsrjWiX5VYLCGIS6O4xg2wmec8/93bfeo6nJbFdUa sI26DexAF93GsA== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id CF6F47E1A2; Wed, 24 Jan 2018 10:40:02 -0500 (EST) From: Yuanhan Liu To: Hyong Youb Kim Cc: John Daley , dpdk stable Date: Wed, 24 Jan 2018 23:32:42 +0800 Message-Id: <1516808026-25523-94-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/enic: fix L4 Rx ptype comparison' 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: Wed, 24 Jan 2018 15:40:05 -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 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 0130f02f20bd755d30a577e20db008194bc9798a Mon Sep 17 00:00:00 2001 From: Hyong Youb Kim Date: Wed, 10 Jan 2018 01:17:04 -0800 Subject: [PATCH] net/enic: fix L4 Rx ptype comparison [ upstream commit 5dbff3af25a4a68980992f5040246e1d7f20b4cd ] For non-UDP/TCP packets, enic may wrongly set PKT_RX_L4_CKSUM_BAD in ol_flags. The comparison that checks if a packet is UDP or TCP assumes that RTE_PTYPE_L4 values are bit flags, but they are not. For example, the following evaluates to true because NONFRAG is 0x600 and UDP is 0x200, and causes the current code to think the packet is UDP. !!(RTE_PTYPE_L4_NONFRAG & RTE_PTYPE_L4_UDP) So, fix this by comparing the packet type against UDP and TCP individually. Fixes: 453d15059b58 ("net/enic: use new Rx checksum flags") Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- drivers/net/enic/enic_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index a3663d5..831c90a 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -285,7 +285,8 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf) else pkt_flags |= PKT_RX_IP_CKSUM_BAD; - if (l4_flags & (RTE_PTYPE_L4_UDP | RTE_PTYPE_L4_TCP)) { + if (l4_flags == RTE_PTYPE_L4_UDP || + l4_flags == RTE_PTYPE_L4_TCP) { if (enic_cq_rx_desc_tcp_udp_csum_ok(cqrd)) pkt_flags |= PKT_RX_L4_CKSUM_GOOD; else -- 2.7.4