net/hns3: add runtime config for mailbox limit time
authorChengchang Tang <tangchengchang@huawei.com>
Fri, 22 Oct 2021 01:38:40 +0000 (09:38 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 22 Oct 2021 02:11:43 +0000 (04:11 +0200)
commit2fc3e696a7f1925b20664b9de15f2430b9b68208
tree82f0da8a4dca0ef94b3c4fe782ab73c2292f2961
parent5984037501c144ee2535ed57e27029554aa97dd7
net/hns3: add runtime config for mailbox limit time

Current, the max waiting time for MBX response is 500ms, but in
some scenarios, it is not enough. Since it depends on the response
of the kernel mode driver, and its response time is related to the
scheduling of the system. In this special scenario, most of the
cores are isolated, and only a few cores are used for system
scheduling. When a large number of services are started, the
scheduling of the system will be very busy, and the reply of the
mbx message will time out, which will cause our PMD initialization
to fail.

This patch add a runtime config to set the max wait time. For the
above scenes, users can adjust the waiting time to a suitable value
by themselves.

Fixes: 463e748964f5 ("net/hns3: support mailbox")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
doc/guides/nics/hns3.rst
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/hns3_ethdev.h
drivers/net/hns3/hns3_ethdev_vf.c
drivers/net/hns3/hns3_mbx.c
drivers/net/hns3/hns3_mbx.h