net/hns3: fix flow director error message

There is a coverity defect related "Argument cannot be negative".

This patch fixes it by passing '-ret' to the function strerror() when
ret is negative.

Coverity issue: 349933
Fixes: fcba820d9b ("net/hns3: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
This commit is contained in:
Wei Hu (Xavier) 2020-06-09 16:44:14 +08:00 committed by Ferruh Yigit
parent 3b931ddb5e
commit 41b966ffb4

View File

@ -893,7 +893,7 @@ static int hns3_insert_fdir_filter(struct hns3_hw *hw,
if (ret < 0) {
rte_spinlock_unlock(&fdir_info->flows_lock);
hns3_err(hw, "Hash table full? err:%d(%s)!", ret,
strerror(ret));
strerror(-ret));
return ret;
}