From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 456F71B19F for ; Thu, 12 Oct 2017 10:21:47 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id i124so10777824wmf.3 for ; Thu, 12 Oct 2017 01:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=ubv/U1EnIkGoRPh6KjOZaifVKn9tdBWoMXhCdYRPR64=; b=eCYQpmcycexkmwffpNy5Fa7a5fK/eZUULfZh41lpU676aGHplTtR2iHvRnS8Dg2V/X mvv5vNh2ZJbo1QDee9JLar8AhmeKwGkM/MoIYkBl0Mj0p9znd9VjyVQCH4MVGQV23fOk fTPzI2i+QNcopBQ2+mwysxZoxagLj8s9hCfb3ZVvBvbPdKhA5Mf5ieq6OY99lRVpGZ6Y 8lpCU3E8ERFm2ZfG8wKvLJ7EM0Squ0l/dOtfg/dy+8lU7WlBz/CdDrr6HqPpJ8BO74Qs fO6db+Y1X2KrsTqImiTqtoTpwiIde1x2G/lgNPiXMyljrXUKtY6IdFjj9TeVWumEkDq8 lvJA== 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:in-reply-to:references; bh=ubv/U1EnIkGoRPh6KjOZaifVKn9tdBWoMXhCdYRPR64=; b=A3WSfliId8DoMUOOkefj6t0J3a9SwnJ+/Jf2oJO0EeBeqv2H6CVyxnfy5WQ07164cM z9dm2D6WVaDluL+g1OPaANVfyxppcjcg7VxoEPCq9012SzYAa3aAzsYHaDxH7KiDxp6D 76jHNw2E7QBR5uG/c8Mc7Mrmm4eSW1SDBbafLn2lrhl0SYtqYVw+7WYoCjAloI2PrRPT QWmSsoSomhiIenog/NWDNlU7rvmCWdEsh0mQSeBTmYUmchwEUI7hiwo2Ipyil1jb13b0 h+2hZn6YoukMIPomF/6RMYWct3eGDPK8u19in9UbbVfCBRDbEd2a9yR9iluvT4gQ5i1d 0l0g== X-Gm-Message-State: AMCzsaVYeAUTJ0Q13VgHkJwYPnOxbxhshxFwCYWZQT+tBAQKjH2BG5pY tYIg5YeeH9pKmbEKha/vXSA3cUV/ X-Google-Smtp-Source: AOwi7QB39Qpi5Xxo0iMUAFdhwmwwO+B/xNyWuQRLWefhvcgXJkch4tSGq6bt3615EBSaG0Iq7EYcVg== X-Received: by 10.223.164.2 with SMTP id d2mr1507892wra.103.1507796506607; Thu, 12 Oct 2017 01:21:46 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 200sm19424728wmu.44.2017.10.12.01.21.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Oct 2017 01:21:45 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 12 Oct 2017 10:21:12 +0200 Message-Id: <68e7bf01380af1591b7df637477f0171f8d66ff4.1507796100.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 05/18] vdev: do not reference devargs list X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Oct 2017 08:21:47 -0000 This list should not be operated upon by drivers. Use the public API to achieve the same functionalities. Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_vdev.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index f7e547a..a7410a6 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -192,7 +192,7 @@ rte_vdev_init(const char *name, const char *args) goto fail; } - TAILQ_INSERT_TAIL(&devargs_list, devargs, next); + rte_eal_devargs_insert(devargs); TAILQ_INSERT_TAIL(&vdev_device_list, dev, next); return 0; @@ -242,10 +242,8 @@ rte_vdev_uninit(const char *name) TAILQ_REMOVE(&vdev_device_list, dev, next); - TAILQ_REMOVE(&devargs_list, devargs, next); + rte_eal_devargs_remove(devargs->bus->name, devargs->name); - free(devargs->args); - free(devargs); free(dev); return 0; } @@ -257,10 +255,7 @@ vdev_scan(void) struct rte_devargs *devargs; /* for virtual devices we scan the devargs_list populated via cmdline */ - TAILQ_FOREACH(devargs, &devargs_list, next) { - - if (devargs->bus != &rte_vdev_bus) - continue; + RTE_EAL_DEVARGS_FOREACH("vdev", devargs) { dev = find_vdev(devargs->name); if (dev) -- 2.1.4