Olivier Matz d80016310b net/bnxt: fix packet type
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 <olivier.matz@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-02-08 18:42:14 +01:00
..
2018-01-29 10:04:28 +01:00
2018-01-29 10:04:28 +01:00
2018-02-08 18:42:14 +01:00
2018-01-29 10:04:28 +01:00
2018-01-22 01:26:49 +01:00
2018-01-29 10:04:28 +01:00
2018-01-29 10:04:28 +01:00
2017-10-26 23:17:31 +02:00
2018-01-29 10:04:28 +01:00
2018-01-22 01:26:49 +01:00