net/hns3: fix firmware exceptions by concurrent commands
There are two scenarios that command queue uninit performed
concurrently with the firmware command: asynchronous command
and timeout command.
For asynchronous command, if a large number of functions send
commands, these commands may need to be queued to wait for
firmware processing. If a function is uninited suddenly, CMDQ
clearing and firmware processing may be performed concurrently.
For timeout command, if the command failed due to busy scheduling
of firmware, this command will be processed in the next scheduling.
And this may lead to concurrency.
The preceding concurrency may lead to a firmware exceptions.
This patch add a waiting time to ensure the firmware complete the
processing of left over command when PMD uninit.
Fixes:
737f30e1c3ab ("net/hns3: support command interface with firmware")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>