numam-dpdk/drivers/net/hns3
Wei Hu (Xavier) fc9b57ff57 net/hns3: fix inserted VLAN tag position in Tx
Based on hns3 network engine, in order to configure hardware VLAN insert
offload in Tx direction, PMD driver reads the VLAN tags from the
vlan_tci_outer and vlan_tci of the structure rte_mbuf, fills them into
the Tx Buffer Descriptor and sets the related offload flag for every
packet.

Currently, there are two VLAN related problems in the 'tx_pkt_burst' ops
implementation function:
1) When setting the related offload flag, PMD driver inserts the VLAN
   tag into the position that close to L3 header. So, when upper
   application sends a packet with a VLAN tag in the data buffer, the
   VLAN offloaded by hardware will be added to the wrong position. It is
   supposed to add the VLAN tag from the rte_mbuf to the position close
   to the MAC header in the packet when using VLAN insertion.

   And when PF PVID is enabled by calling the API function named
   rte_eth_dev_set_vlan_pvid or VF PVID is enabled by hns3 PF kernel
   ether driver, the VLAN tag from the structure rte_mbuf to enable the
   VLAN insertion should be filled into the position that close to L3
   header to avoid to be overwritten by the PVID which will always be
   inserted in the position that close to the MAC address.

2) When sending multiple segment packets, VLAN information is required
   to be filled into the first Tx Buffer descriptor. However, currently
   hns3 PMD driver incorrectly placed it in the last Tx Buffer
   Descriptor. This results in VLAN insert offload failure when sending
   multiple segment packets.

This patch fixed them by filling the VLAN information into the position
of the Tx Buffer Descriptor.

Fixes: bba6366983 ("net/hns3: support Rx/Tx and related operations")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2020-07-07 23:38:28 +02:00
..
hns3_cmd.c net/hns3: modify format for firmware version 2020-04-21 19:16:41 +02:00
hns3_cmd.h net/hns3: clear residual hardware configurations on init 2020-07-07 23:38:26 +02:00
hns3_dcb.c net/hns3: add error code to some logs 2020-05-05 15:54:26 +02:00
hns3_dcb.h net/hns3: support different numbers of Rx and Tx queues 2020-01-17 19:46:26 +01:00
hns3_ethdev_vf.c net/hns3: check multi-process action register result 2020-07-07 23:38:28 +02:00
hns3_ethdev.c net/hns3: check multi-process action register result 2020-07-07 23:38:28 +02:00
hns3_ethdev.h net/hns3: fix Rx buffer size 2020-07-07 23:38:26 +02:00
hns3_fdir.c net/hns3: fix unintended sign extension in fd operation 2020-06-16 19:21:07 +02:00
hns3_fdir.h net/hns3: support RSS 2019-10-07 15:00:56 +02:00
hns3_flow.c net/hns3: support symmetric RSS 2020-07-07 23:38:26 +02:00
hns3_intr.c net/hns3: ignore function return on reset error path 2020-06-16 19:21:07 +02:00
hns3_intr.h net/hns3: support device reset 2019-10-07 15:00:57 +02:00
hns3_logs.h net/hns3: register and add log interface 2019-10-07 15:00:56 +02:00
hns3_mbx.c net/hns3: support setting VF PVID by PF driver 2020-07-07 23:38:26 +02:00
hns3_mbx.h net/hns3: support setting VF PVID by PF driver 2020-07-07 23:38:26 +02:00
hns3_mp.c net/hns3: check multi-process action register result 2020-07-07 23:38:28 +02:00
hns3_mp.h net/hns3: check multi-process action register result 2020-07-07 23:38:28 +02:00
hns3_regs.c net/hns3: fix unintended sign extension in dump operation 2020-06-16 19:21:07 +02:00
hns3_regs.h net/hns3: fix Tx interrupt when enabling Rx interrupt 2020-03-18 10:21:42 +01:00
hns3_rss.c net/hns3: support symmetric RSS 2020-07-07 23:38:26 +02:00
hns3_rss.h net/hns3: support symmetric RSS 2020-07-07 23:38:26 +02:00
hns3_rxtx.c net/hns3: fix inserted VLAN tag position in Tx 2020-07-07 23:38:28 +02:00
hns3_rxtx.h net/hns3: fix Rx buffer size 2020-07-07 23:38:26 +02:00
hns3_stats.c net/hns3: fix return value when clearing statistics 2020-05-05 15:54:26 +02:00
hns3_stats.h net/hns3: get Rx/Tx queue fbd in xstats 2020-04-21 19:16:41 +02:00
Makefile build: disable experimental API check internally 2020-04-14 16:22:34 +02:00
meson.build build: disable experimental API check internally 2020-04-14 16:22:34 +02:00
rte_pmd_hns3_version.map build: align symbols with global ABI version 2019-11-20 23:05:39 +01:00