From: Wei Hu (Xavier) Date: Tue, 9 Jun 2020 08:44:14 +0000 (+0800) Subject: net/hns3: fix flow director error message X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=41b966ffb4f70792d8cd851173eab15bca183a7c;p=dpdk.git 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: fcba820d9b9e ("net/hns3: support flow director") Cc: stable@dpdk.org Signed-off-by: Wei Hu (Xavier) --- diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index 4c5928ffcc..7bc5bf831c 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -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; }