numam-dpdk/drivers/net/hns3
Chengchang Tang b4e4d7ac9f net/hns3: support setting VF PVID by PF driver
This patch adds support setting VF PVID by hns3 PF kernel ethdev driver
on the host by "ip link set <eth num> vf <vf id> vlan <vlan tag>"
command.

Because of the hardware constraints, the striped VLAN tag will always in
Rx descriptors which should has been dropped when PVID is enabled and
the PVID will overwrite the outer VLAN tag in Tx descriptor. So, hns3
PMD driver need to change the processing of VLAN tags in the process of
Tx and Rx according to whether PVID is enabled.
1) If the hns3 PF kernel ethdev driver sets the PVID for VF device
   before the initialization of the related VF device, hns3 VF PMD
   driver should get the PVID state from PF driver through mailbox and
   update the related state in txq and rxq maintained by hns3 VF driver
   to change the process of Tx and Rx.
2) If the hns3 PF kernel ethdev driver sets the PVID for VF device after
   initialization of the related VF device, the PF driver will notify VF
   driver to update the PVID state. The VF driver will update the PVID
   configuration state immediately to ensure that the VLAN process in Tx
   and Rx is correct. But in the window period of this state transition,
   packets loss or packets with wrong VLAN may occur.
3) Due to hardware limitations, we only support two-layer VLAN hardware
   offload in Tx direction based on hns3 network engine, so when PVID is
   enabled, QinQ insert is no longer supported. And when PVID is
   enabled, in the following two cases:
     i) packets with more than two VLAN tags.
     ii) packets with one VLAN tag while the hardware VLAN insert is
         enabled.
   The packets will be regarded as abnormal packets and discarded by
   hardware in Tx direction. For debugging purposes, a validation check
   for these types of packets is added to the '.tx_pkt_prepare' ops
   implementation function named hns3_prep_pkts to inform users that
   these packets will be discarded.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
2020-07-07 23:38:26 +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: modify format for firmware version 2020-04-21 19:16:41 +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: support setting VF PVID by PF driver 2020-07-07 23:38:26 +02:00
hns3_ethdev.c net/hns3: support setting VF PVID by PF driver 2020-07-07 23:38:26 +02:00
hns3_ethdev.h net/hns3: support setting VF PVID by PF driver 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: support multiple process 2019-10-07 15:00:57 +02:00
hns3_mp.h net/hns3: support multiple process 2019-10-07 15:00:57 +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: support setting VF PVID by PF driver 2020-07-07 23:38:26 +02:00
hns3_rxtx.h net/hns3: decrease non-nearby memory access in Rx 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