[dpdk-stable] patch 'net: fix inner L2 length in packet type parser' has been queued to LTS release 16.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Oct 30 16:34:05 CET 2017


FYI, your patch has been queued to LTS release 16.11.4

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/01/17. So please
shout if anyone has objections.


Kind regards,
Luca Boccassi

>From 7ec2f419540e7e70f38053d941426af94e7b1703 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz at 6wind.com>
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 <olivier.matz at 6wind.com>
 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 a8c7aff9c..a3ca04032 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))

More information about the stable mailing list