From: Matan Azrad <matan@mellanox.com>
To: dev@dpdk.org
Cc: Ferruh Yigit <ferruh.yigit@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 2/3] net/vdev_netvsc: add check for specifying by 1 way
Date: Tue, 10 Apr 2018 13:32:07 +0000 [thread overview]
Message-ID: <1523367128-32317-3-git-send-email-matan@mellanox.com> (raw)
In-Reply-To: <1523367128-32317-1-git-send-email-matan@mellanox.com>
There are now 2 ways to specify a netvsc device by the EAL command
line - either by the interface name or by the MAC address.
The user should not specify a netvsc device using more than 1 way,
Thus, if a device is specified in more than 1 way, the driver stops
to probe it.
Validate it in the driver initialization.
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/vdev_netvsc/vdev_netvsc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index d2c41a5..018ffae 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -702,6 +702,11 @@ static LIST_HEAD(, vdev_netvsc_ctx) vdev_netvsc_ctx_list =
rte_kvargs_free(kvargs);
return 0;
}
+ if (specified > 1) {
+ DRV_LOG(ERR, "More than one way used to specify the netvsc"
+ " device.");
+ goto error;
+ }
rte_eal_alarm_cancel(vdev_netvsc_alarm, NULL);
/* Gather interfaces. */
ret = vdev_netvsc_foreach_iface(vdev_netvsc_netvsc_probe, name, kvargs,
--
1.9.5
next prev parent reply other threads:[~2018-04-10 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1523367128-32317-1-git-send-email-matan@mellanox.com>
2018-04-10 13:32 ` [dpdk-stable] [PATCH 1/3] net/vdev_netvsc: remove specified devices IP check Matan Azrad
2018-04-10 13:32 ` Matan Azrad [this message]
2018-04-10 13:32 ` [dpdk-stable] [PATCH 3/3] net/vdev_netvsc: prefer netvsc devices in scan Matan Azrad
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=1523367128-32317-3-git-send-email-matan@mellanox.com \
--to=matan@mellanox.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=stable@dpdk.org \
/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).