From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stephen@networkplumber.org>
Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com
 [209.85.160.68]) by dpdk.org (Postfix) with ESMTP id 5077C1B21C
 for <stable@dpdk.org>; Mon, 21 May 2018 18:52:17 +0200 (CEST)
Received: by mail-pl0-f68.google.com with SMTP id v24-v6so9141744plo.3
 for <stable@dpdk.org>; Mon, 21 May 2018 09:52:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=sAb+vYrlWcHNfR+IePrWPSL5HUnaxCQH1GspbZ1kkhM=;
 b=ASMqGRUD/oC1Rk5+bOcUqOd3YMAqQiYPYfH36U2M8zAI/TdbPflvFF2snXC58JLVde
 8RK2Ll2lLjtx3BBS/p+eCJynTl7ZqUciIQhq3buU2M3cIoy4rDmG37hVqVX0bpO8h94V
 qEwMZaCIOtk1CoQ+SInIiYUTxu54ybT8D9RweSQCvoQkEB7qRPUgzJh8oKbbiPf1t1VD
 0yfnmkeLmE8ET47jJRLz0SuSs47XSt3+wan2XQSturtBFo5luGTTz9pLa1Q4uIrSoPUh
 i/J2thzpJ+sR3mECLTeA54P5QG68nRQo9eKPttnJKVTg5KYfUaBvOzQyhK6VF806R/5P
 a7sA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=sAb+vYrlWcHNfR+IePrWPSL5HUnaxCQH1GspbZ1kkhM=;
 b=aWAc7tR8CyNYMotNQSBXDANY+pQ5P4ZEPRLQZVZXnV+/PJrx+o9e36teFqIF94laeT
 2vn9GdJkPBHdN0nGnzf6AejQ8NCVOYpbWETIuGvp3QEputsaj1XyRnGuk+CQvUokjhfY
 H502PUbMQ5o8BfJq7bxp7lZqbhy4VSNXD3elpmNrYbcNv3AlsA6e3D33X8AVa7T4z7XE
 T6UUkNGa06PFNlyIoHa+7jTEO7QwM8uxTSqU0QHF6baEqe2uzxCIUQKBFhnVgwmf6AqG
 PWKKFVY2xBPlRcaJ0g0agwgh9bon/oHbKqeg0Z9NzUCs/L3N4qlH7W7GTe3I/Nhb95Wj
 GzcA==
X-Gm-Message-State: ALKqPwdwafXbSHH2htafLP8ZqKO3UqzOtlO+Ctbi2rlt1KRCQPY/fG4G
 imCHlRBx8HhrHeiAD7jntzF81A==
X-Google-Smtp-Source: AB8JxZrZPZmE/hMck1V2+ajDanJJBswH+PTBqMJJWroKqSHUfeQ9ODej2DMCW5fckTWMeqMP4+NHPA==
X-Received: by 2002:a17:902:3f81:: with SMTP id
 a1-v6mr20847941pld.29.1526921536459; 
 Mon, 21 May 2018 09:52:16 -0700 (PDT)
Received: from xeon-e3 (204-195-35-107.wavecable.com. [204.195.35.107])
 by smtp.gmail.com with ESMTPSA id d62-v6sm20886589pga.29.2018.05.21.09.52.16
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 21 May 2018 09:52:16 -0700 (PDT)
Date: Mon, 21 May 2018 09:52:14 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Matan Azrad <matan@mellanox.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, stable@dpdk.org
Message-ID: <20180521095214.2959d2c1@xeon-e3>
In-Reply-To: <1526919810-24303-1-git-send-email-matan@mellanox.com>
References: <1526919810-24303-1-git-send-email-matan@mellanox.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/vdev_netvsc: fix automatic
	probing
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 21 May 2018 16:52:17 -0000

On Mon, 21 May 2018 16:23:30 +0000
Matan Azrad <matan@mellanox.com> wrote:

> The vdev_netvsc driver allows an automatic probe in Hyper-V VM systems
> unless it was already specified by the EAL command line.
> 
> The detection of a specified NetVSC device is wrongly done by comparing
> the vdev_netvsc driver name to all the vdev devices names, including
> the suffix device index. Thus, if the user specifies the vdev_netvsc
> device by adding an index to the device name, the comparison fails.
> Consequently, the vdev_netvsc driver may automatically probe NetVSC
> devices, despite the NetVSC device that was specified by the EAL command
> line.
> 
> Compare the vdev_netvsc driver name to the devices names without the
> index.
> 
> Fixes: 56252de779a6 ("net/vdev_netvsc: add automatic probing")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  drivers/net/vdev_netvsc/vdev_netvsc.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
> index de2bd14..48717f2 100644
> --- a/drivers/net/vdev_netvsc/vdev_netvsc.c
> +++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
> @@ -39,6 +39,7 @@
>  
>  #define VDEV_NETVSC_DRIVER net_vdev_netvsc
>  #define VDEV_NETVSC_DRIVER_NAME RTE_STR(VDEV_NETVSC_DRIVER)
> +#define VDEV_NETVSC_DRIVER_NAME_LEN 15

Looks correct, why did you not just use IFNAMSIZ which is commonly used
across much of the network code?