[dpdk-stable] patch 'net/vdev_netvsc: add check for specifying by 1 way' has been queued to stable release 18.02.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Apr 30 16:53:53 CEST 2018


Hi,

FYI, your patch has been queued to stable release 18.02.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/02/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From a97393ad0f10745e633867555df356b570861fe8 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan at mellanox.com>
Date: Tue, 10 Apr 2018 13:32:07 +0000
Subject: [PATCH] net/vdev_netvsc: add check for specifying by 1 way

[ upstream commit 118d2f8096a528b46e1fa5fe2104cf7140278d94 ]

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.

Signed-off-by: Matan Azrad <matan at 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 d2c41a577..018ffae5d 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -702,6 +702,11 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
 			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,
-- 
2.14.2



More information about the stable mailing list