net/hns3: fix timing in mailbox
authorChengchang Tang <tangchengchang@huawei.com>
Tue, 13 Apr 2021 11:50:03 +0000 (19:50 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 14 Apr 2021 17:45:27 +0000 (19:45 +0200)
commitd566bfcff0c7bfe167f6c520d4fd5b0104130af6
tree0fa47489b9176c24b915719126090d03aa96ffc2
parentdbbbad23e380773b37872df2195c4529fd93ca6f
net/hns3: fix timing in mailbox

Currently, when processing MBX messages, the system timestamp is obtained
to determine whether timeout occurs. However, the gettimeofday function
is not monotonically increasing. Therefore, this may lead to incorrect
judgment or difficulty exiting the loop. And actually, in this scenario,
it is not necessary to obtain the timestamp.

This patch deletes the call to the gettimeofday function during MBX
message processing.

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>
drivers/net/hns3/hns3_mbx.c