From: Gaetan Rivet <gaetan.rivet@6wind.com>
To: dev@dpdk.org
Cc: Matan Azrad <matan@mellanox.com>, Gaetan Rivet <gaetan.rivet@6wind.com>
Subject: [dpdk-dev] [PATCH v2] net/failsafe: fix strerror call in sub-eal
Date: Thu, 1 Feb 2018 11:59:30 +0100 [thread overview]
Message-ID: <20180201105930.12686-1-gaetan.rivet@6wind.com> (raw)
In-Reply-To: <20180201101801.10295-1-gaetan.rivet@6wind.com>
Ownership API returns a negative value, strerror expects a valid errno
value, thus positive.
Coverity issue: 260401
Fixes: dcd0c9c32b8d ("net/failsafe: use ownership mechanism for slaves")
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
v2: Fix coverity reference syntax in commit log.
drivers/net/failsafe/failsafe_eal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index 8946bf6fe..c3d673125 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -79,9 +79,9 @@ fs_bus_init(struct rte_eth_dev *dev)
" %d named %s", i, da->name);
}
ret = rte_eth_dev_owner_set(pid, &PRIV(dev)->my_owner);
- if (ret) {
+ if (ret < 0) {
INFO("sub_device %d owner set failed (%s),"
- " will try again later", i, strerror(ret));
+ " will try again later", i, strerror(-ret));
continue;
} else if (strncmp(rte_eth_devices[pid].device->name, da->name,
strlen(da->name)) != 0) {
--
2.11.0
next prev parent reply other threads:[~2018-02-01 11:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 10:18 [dpdk-dev] [PATCH v1] " Gaetan Rivet
2018-02-01 10:59 ` Gaetan Rivet [this message]
2018-02-05 15:05 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180201105930.12686-1-gaetan.rivet@6wind.com \
--to=gaetan.rivet@6wind.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).