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 CF0C1235 for ; Tue, 21 Nov 2017 14:19:39 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 81069208E5; Tue, 21 Nov 2017 08:19:39 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:19:39 -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=YAe21GmTxPJky1uTO sonm4VGuQ/Uyk5UIBHC7z/carE=; b=h9dPTNsupSAxAD9gM2NYYRpf+MspitTDM Qwy6O9L438ghXMRyncL3ZpldVcK599N5Y3qIKLd4zO6vvCiv8d7Hkh/gx6V0VQBV yUel3FaooH9ToJxZSFzoiVWpuIsWXiwrWLUA4cw9Oe8cxIscZzkz91E1vQj/wx9m Yr1ogJE1HoKLQ4sMoS+KITeBb2966upJVPv9XW18x8/UiPxucKj09jWlwsiHqOUN g4Swd4yK/lMPuS/XyPSARJt1qXlqextM8502mLZ9LBsyME9u17FW7Z6UaLxv5/JA kGF7KSB7UTcOpopQa+bYUp6niq5uVRTIwryWQBQzKVDLrePft5r6A== 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=YAe21GmTxPJky1uTOsonm4VGuQ/Uyk5UIBHC7z/carE=; b=kcpRMpos 06p/e35oqtMHkvipxTFai5kiw4ZRtLAG2MThy8vrrj0FHn3aIjbdplcQoaOXiIAv 5IgGTDBqSPZ0rqbEA0vegL3XV4AyoVBi3+ulnR2GDd1X8Z9MIKsstgjcrkGRRHul I2t1iqQypkDVBI/3heOi3LVQCeepoFJnH6U2DrF8KOmFE3Q5wW7w2R3R2mEndGlV rd432uRtehB9k+hpGbabfSFz5wiIWqVX0ONaSVVZfI8lRmjt5WvVC6mUe3g8phxz ImeXNlujlXzyAtIHCEAc1d+woONLaoeUXtbVpeSSm8+Gw8fmEZFZFdrqhyeWUHLL z5//hxwp9jQb9w== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 8DED3243B9; Tue, 21 Nov 2017 08:19:37 -0500 (EST) From: Yuanhan Liu To: Olivier Matz Cc: dpdk stable Date: Tue, 21 Nov 2017 21:15:47 +0800 Message-Id: <1511270333-31002-5-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net: fix inner L2 length in packet type parser' has been queued to stable release 17.08.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: Tue, 21 Nov 2017 13:19:40 -0000 Hi, FYI, your patch has been queued to stable release 17.08.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 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 6ec6abe018f5f1619fb9d2ba9eea936848fc2630 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Mon, 11 Sep 2017 16:57:22 +0200 Subject: [PATCH] net: fix inner L2 length in packet type parser [ upstream commit b081c1dd2ec64c4f3cc18723ccb7aa1601985bb0 ] The inner L2 length returned by rte_net_get_ptype() is not properly initialized. If the caller does not zero the header lengths structure, the inner_l2 field will be undefined. Fix it by initializing inner_l2 to 0 when parsing a inner layer. Fixes: 2c15c5377da2 ("net: support NVGRE in software packet type parser") Signed-off-by: Olivier Matz --- lib/librte_net/rte_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_net/rte_net.c b/lib/librte_net/rte_net.c index a8c7aff..a3ca040 100644 --- a/lib/librte_net/rte_net.c +++ b/lib/librte_net/rte_net.c @@ -396,6 +396,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m, if ((layers & RTE_PTYPE_INNER_L2_MASK) == 0) return pkt_type; + hdr_lens->inner_l2_len = 0; if (proto == rte_cpu_to_be_16(ETHER_TYPE_TEB)) { eh = rte_pktmbuf_read(m, off, sizeof(*eh), &eh_copy); if (unlikely(eh == NULL)) -- 2.7.4