net/hns3: refactor PF LSC event report
authorChengwen Feng <fengchengwen@huawei.com>
Fri, 9 Apr 2021 04:45:22 +0000 (12:45 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 13 Apr 2021 00:44:20 +0000 (02:44 +0200)
commit3b37cbe6179aeebc02b5e5cf3e39dfb2d5e69a01
treed49faea90710ada3aded8d9090e5123e63324c55
parent9bc2289fe5ea771f62412fce41c22d9ed7c31e67
net/hns3: refactor PF LSC event report

Currently, PF driver will report lsc when it detects the link status
change, it's not a generic implementation.

We refactor PF lsc event report by following scheme:
1. PF driver marks RTE_PCI_DRV_INTR_LSC in rte_pci_driver by default.
2. In the init stage, PF driver will detect whether firmware supports
   lsc interrupt or not, driver will clear RTE_ETH_DEV_INTR_LSC flag if
   firmware doesn't support lsc interrupt.
3. PF driver will report lsc event only when dev_conf.intr_conf.lsc is
   set.

Note: If the firmware supports lsc interrupt, we also keep periodic
polling to deal with the interrupt loss.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
doc/guides/nics/features/hns3.ini
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/hns3_ethdev.h
drivers/net/hns3/hns3_mbx.c