numam-dpdk/drivers
Chengwen Feng dbbbad23e3 net/hns3: fix VF handling LSC event in secondary process
VF will build two queues (csq: command send queue, crq: command receive
queue) with firmware, the crq may contain the following messages:
1) mailbox response message which was the ack of mailbox sync request.
2) PF's link status change message which may send by PF at anytime;

Currently, any threads in the primary and secondary processes could
send mailbox sync request, so it will need to process the crq messages
in there own thread context.

If the crq hold two messages: a) PF's link status change message, b)
mailbox response message when secondary process deals with the crq
messages, it will lead to report lsc event in secondary process
because it uses the policy of processing all pending messages at once.

We use the following scheme to solve it:
1) threads in secondary process could only process specifics messages
   (eg. mailbox response message) in crq, if the message processed, its
   opcode will rewrite with zero, then the intr thread in primary
   process will not process again.
2) threads other than intr thread in the primary process use the same
   processing logic as the threads in secondary process.
3) intr thread in the primary process could process all messages.

Fixes: 76a3836b98 ("net/hns3: fix setting default MAC address in bonding of VF")
Fixes: 463e748964 ("net/hns3: support mailbox")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2021-04-14 19:45:27 +02:00
..
baseband bbdev: add explicit enum for code block mode 2021-04-16 12:43:33 +02:00
bus eal: make OS shims internal 2021-04-15 01:56:20 +02:00
common common/iavf: add protocol header for IP fragment 2021-04-13 11:31:25 +02:00
compress compress/mlx5: support timestamp format 2021-03-16 10:05:39 +01:00
crypto drivers: add missing includes 2021-04-14 11:23:13 +02:00
event drivers: add missing includes 2021-04-14 11:23:13 +02:00
mempool mempool/cnxk: add cn10k batch dequeue 2021-04-09 08:32:24 +02:00
net net/hns3: fix VF handling LSC event in secondary process 2021-04-14 19:45:27 +02:00
raw raw/octeontx2_dma: assign PCI device in DPI VF 2021-04-15 10:33:52 +02:00
regex common/mlx5: align log prefix across drivers 2021-04-07 09:43:32 +02:00
vdpa drivers: align log names 2021-04-08 18:32:31 +02:00
meson.build config: enable/disable drivers in Arm builds 2021-04-15 22:34:37 +02:00