From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 334A3F64 for ; Mon, 30 Apr 2018 16:07:10 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id t11so13435120wmt.0 for ; Mon, 30 Apr 2018 07:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HEAlgdV6RlkVOHzF91NijJfrGRkcbMRvEJ78iEiGHEE=; b=JctY9G6Eg7pzjQNVfPlUQ2h+2YVKCj7p9ZhzGLHm3xG+mufl4SxGoMfLUL9PFTNlQS ZffXea1m90xGwp2OC/xy+DIEZFRMT950k8SbPKlsOo0vIqq1Awtzh8QU0b05XmLDFwGF FIQA5UF5mEi9GlmzgOPTbUMn3KYWYRberb1133cTat9+1AbdjSJtEk7RyhQ7OFRWH2ZE MbKd96n+GWATKw4VBme0YZ4q6X4UPtraj9yu2aMiJBgKJTkEW5F8c3i6Y+Ind/OAyGt1 RM5UruBgk6V9/iQu3K6cU57xr01Et9dHwvC23kOjbMKHHwCh+1scYT3YIXqYQTqfoXfJ YR9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HEAlgdV6RlkVOHzF91NijJfrGRkcbMRvEJ78iEiGHEE=; b=HHzr76Xv+Plts6lw0CLfmfgJAaZRmbDgHZJxv+XvxfWtdNEpZZ/hdwMhiq/WQm99EN 8/n1Lwbl0N49JkGJvI2DiFiDzXrCzg/63Bsz6mgw/GZNlXy97JVr3Ls/xuMb9IJgWpO2 b8RNZd5h2fqFSNMou+7x3R0nzKSSY9Sl6JRCBdHjpQUXgd3p2RMLr/tckf7IndrUb3D9 nGvG0KT03pUQLk2i0AR4HQa/hIjYshtNFF/M8X/i7Pmog7c6hWtYIN+WZen4bG0A/XSD hC0NcAGXJ32vo9+xV2G82aldrhJIpymRI9NZD5Ez7lHcTARCJ5NS2lj908MvlPOCKsQk Mt8A== X-Gm-Message-State: ALQs6tCmihhMlcG+Un49V+x2ZkFYHuN7bd0oAsdvuopGWcW18UiX1nOw SzzZOu8qIW+lX0LecaY7/uk= X-Google-Smtp-Source: AB8JxZomCPJf3j1+c7l/EcvvhOszCFrBWY9ocKHYnnp1Gydd3daf/kyiDiYPmI3bW+ZnB3rb+PwW4A== X-Received: by 10.28.91.209 with SMTP id p200mr7035861wmb.11.1525097229792; Mon, 30 Apr 2018 07:07:09 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id a14-v6sm4544519wra.84.2018.04.30.07.07.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:07:08 -0700 (PDT) From: luca.boccassi@gmail.com To: Nachiketa Prachanda Cc: Jianfeng Tan , dpdk stable Date: Mon, 30 Apr 2018 15:03:06 +0100 Message-Id: <20180430140606.4615-28-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'bus/vdev: fix finding device by name' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:07:10 -0000 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 0a6f1afc5c160f2b7610b7704c96909dea25ecd9 Mon Sep 17 00:00:00 2001 From: Nachiketa Prachanda Date: Mon, 12 Mar 2018 09:54:00 -0700 Subject: [PATCH] bus/vdev: fix finding device by name [ upstream commit fada6963ce735048b2d40f215ff110cb2f4cb6a4 ] Use strcmp to compare device names as the strncmp in original code causes find_vdev to return -EEXIST for names that are prefix of another. The creation of interfaces fails unpredictably based on the order of their creation. An easy way hit this bug is to create eth_vhost1 after eth_vhost11. Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct") Signed-off-by: Nachiketa Prachanda Acked-by: Jianfeng Tan --- drivers/bus/vdev/vdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index e4bc72463..7eae319cb 100644 --- a/drivers/bus/vdev/vdev.c +++ b/drivers/bus/vdev/vdev.c @@ -188,7 +188,7 @@ find_vdev(const char *name) TAILQ_FOREACH(dev, &vdev_device_list, next) { const char *devname = rte_vdev_device_name(dev); - if (!strncmp(devname, name, strlen(name))) + if (!strcmp(devname, name)) return dev; } -- 2.14.2