From: Ferruh Yigit Subject: Re: [dpdk-stable] [PATCH v2] net/bnxt: fix packet type Date: Thu, 8 Feb 2018 13:30:43 +0000 Message-ID: References: <20180206170758.1148-1-olivier.matz@6wind.com> <20180208082417.22626-1-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: stable@dpdk.org To: Olivier Matz , dev@dpdk.org, Ajit Khaparde , Somnath Kotur Return-path: In-Reply-To: <20180208082417.22626-1-olivier.matz@6wind.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2/8/2018 8:24 AM, Olivier Matz wrote: > The hw flags are not read correctly: the defines > RX_PKT_CMPL_FLAGS_ITYPE_* are not bits but values, so the should not be > tested with if (value & X) but with if ((value & MASK) == X). > This was resulting in a wrong packet type. > > For instance, an IPv4/ICMP packet was returning a value of 7 for > the layer 4, which is undefined. > > This patch rework the way packet types are processed, to ensure > that only valid packet types will be advertised. > > Fixes: 3d2a6644eb05 ("net/bnxt: support getting ptypes") > Cc: stable@dpdk.org > > Signed-off-by: Olivier Matz > Acked-by: Ajit Khaparde Applied to dpdk-next-net/master, thanks.