net/hns3: fix some packet types
authorChengwen Feng <fengchengwen@huawei.com>
Sat, 10 Apr 2021 01:11:17 +0000 (09:11 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 13 Apr 2021 09:13:41 +0000 (11:13 +0200)
commit1f303606e81737da2e6ac49f4da915ec32b3bacb
treef308dff1955e044c1e63ce74d6c649134035066b
parentf9f24ecd794f88231110c823cdeff5d7ec9a4382
net/hns3: fix some packet types

Currently, the packet type calculated by
vlan/ovlan/l3id/l4id/ol3id/ol4id fields have the following problems:
1) Identify error when exist VLAN strip which will lead to the data
   buffer has non VLAN header but mbuf's ptype have L2_ETHER_VLAN flag.
2) Some packet identifies error, eg: hardware report it's RARP or
   unknown packet, but ptype will marked with L2_ETHER .

So driver will calculate packet type only by l3id/l4id/ol3id/ol4id
fields.

Fixes: 0e98d5e6d9c3 ("net/hns3: fix packet type report in Rx")
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_ethdev.h
drivers/net/hns3/hns3_rxtx.c
drivers/net/hns3/hns3_rxtx.h