Re: [dpdk-dev] [PATCH] net/bnxt: fix packet type

2018-02-07 Thread Olivier Matz
Hi, On Tue, Feb 06, 2018 at 03:23:34PM -0800, Ajit Khaparde wrote: > On Tue, Feb 6, 2018 at 9:07 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 (

Re: [dpdk-dev] [PATCH] net/bnxt: fix packet type

2018-02-06 Thread Ajit Khaparde
On Tue, Feb 6, 2018 at 9:07 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 ins

[dpdk-dev] [PATCH] net/bnxt: fix packet type

2018-02-06 Thread Olivier Matz
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 lay