]> git.droids-corp.org - dpdk.git/commit
net/hns3: fix link status capability query from VF
authorHuisong Li <lihuisong@huawei.com>
Sat, 11 Jun 2022 07:42:26 +0000 (15:42 +0800)
committerFerruh Yigit <ferruh.yigit@xilinx.com>
Fri, 24 Jun 2022 11:10:01 +0000 (13:10 +0200)
commita8e1bd096fa9a96e3f50c14e92017b7416536038
tree36c25c15f580ce9072389cc5fab744e10ed4ffd4
parent91c12c4a4a3cbfbf5b901703d63fb5e518d48658
net/hns3: fix link status capability query from VF

Currently, the VF LSC capability is obtained from PF driver in
the interrupt mailbox interrupt thread, it is asynchronous.
The VF driver waits for 500ms to get this capability in probe
process.

The primary process will receive a message and do probe in the
interrupt thread context when attach a device in the secondary
process. At this case, VF driver never obtains this capability
from PF.

The root cause is that 'vf->pf_push_lsc_cap' is not updated by
the handling mailbox thread until finishing probe. The reason
this update wouldn't be done is that the handling mailbox interrupt
thread and the probe alarm thread are both in epool thread, and
the probe alarm thread is before the mailbox interrupt thread.

Fixes: 9bc2289fe5ea ("net/hns3: refactor VF LSC event report")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
drivers/net/hns3/hns3_ethdev_vf.c