net/hns3: fix VF mailbox head field
authorChengwen Feng <fengchengwen@huawei.com>
Wed, 31 Mar 2021 10:01:41 +0000 (18:01 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 8 Apr 2021 16:57:09 +0000 (18:57 +0200)
commit38d5b71c27d6fd9324cbaeed972df382c2c7a34b
treeee91c664b2756d799d62f47f9ba64bddcf67ff65
parenta06c3b0e9f0a4807ee8ac145f58284ec49f2f33d
net/hns3: fix VF mailbox head field

Currently, the VF mailbox synchronization communication is based on
three fields: head/tail/lost, when head equals tail plus lost, it
means the response is received successfully.

The head field indicates the number of requests that are successfully
sent. If the request sending fails, it should not be updated.

This patch fix the above bug by roll back updates when the sending
fails.

Fixes: 463e748964f5 ("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>
drivers/net/hns3/hns3_mbx.c