net/hns3: fix Rx queue search with broadcast packet
Currently, there is a certain probability of a type of RAS errors when
receiving broadcast packets. This type of RAS errors are parsed as
rx_q_search_miss error by hns3 PF PMD driver, the related log as below:
0000:bd:00.0 hns3_find_highest_level(): PPP_MFP_ABNORMAL_INT_ST2
rx_q_search_miss found [error status=0x20000000]
When receiving broadcast packet, network engine select which functions
need to accept it according to the function's promisc_bcast_en bit
configuration. And then search TQP_MAP configuration to select which
hardware queues the packet should enter, if can't find the target
hardware queue, network engine will trigger rx_q_search_miss RAS error.
The root cause as below:
1. VF's promisc_bcast_en bit configuration is not cleared by FLR reset,
and the configuration has been set in the previous application.
2. There is one bug in setting TQP_MAP configuration in the
initialization of PF device: when tqp is allocated to VF, it is still
marked as PF. This issue will affect the correctness of the TQP_MAP
configuration.
This patch fixes it with the following modification.
1. Clear all VFs promisc_bcast_en bit in the initialization of PF
device.
2. Fix the issue to ensure the correct TQP_MAP configuration.
Fixes:
d51867db65c1 ("net/hns3: add initialization")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>