From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 41CB15F2F for ; Wed, 21 Mar 2018 00:20:37 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id f125so6594766wme.4 for ; Tue, 20 Mar 2018 16:20:37 -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=HL1fjHqd25l8gFRplhJNCNRZOSdiheuxt/Abpvy3YuM=; b=F8/JFTvbCNnGF04YfZSFZ3pSkeULcqFeNP2OkTOzlcUO9RTMEM9h6+vfEsZNEG+eE2 fN4Xf4ScvAE2OEfblAPwv7W0kwHP16EpzHB9MQYp4LaGbVKDrgFRre3QdTUxiiPbHSkK Ep0lSfXkwwTitJ+QyBi7f9wrT0mj2vpxEKF77k4B922kGIN6n4OhaoAte7xMui2oXjCj ImwPAAOAZlbZi7i7LUsog8EpnCs4g4NRiRc+s0spLeKXU++9XKc2yYsiqY5I90n87mNH Uy/jBUlfs96V0Jml4Rl7kLEJCBO/dwAMBWZ8kXauu9eWJtH5iOjoyzGxODYsf822PsVP ZX3g== 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=HL1fjHqd25l8gFRplhJNCNRZOSdiheuxt/Abpvy3YuM=; b=GM7LWoFsrmKIcHLLlJdPzdaUYQSiUAXkUXy5xYRu5uoFGSrqwH2clYrhUMGIAzJDxd rppPvRvBl9whxRW73LBOhy6Tyxaa+RaOmrfQqqgD9ERXjcMMDwoOvc/kvnE+Dyb1/rGq LkY3fgo+B6E1tVMRYbMHJktCWwf6QsThuN94rSt2pI+mMms7CXvaA1lepF50Q2ccYOq8 Z9Irw02XNyneQ0wTIgjD31gK019AHiBSPebrH1m83MuVvL23e9PtgqWJ/NkhFNseOntj 80dXsDzR2J5gn381L4fwywDgm9kY7za44G/Sji1NniJQMVYUteMRAMDoLnRTnlVmY/YQ aY4g== X-Gm-Message-State: AElRT7GvL7lMiQ6wce+CDlk0FwhlNTY5HPmwZwihXRnMpMpkrqInkR0M q9OOnHbCDpx9n4v9Y84oYhE11tlu X-Google-Smtp-Source: AG47ELvANryzq9c009BSk0IMT6LV2A5lDkBoe20jwbxIWBECJAcy2Nx7yFQuNYc6D8UJqGeDkzq5DQ== X-Received: by 10.28.216.70 with SMTP id p67mr1081865wmg.36.1521588036673; Tue, 20 Mar 2018 16:20:36 -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 m135sm3983479wma.2.2018.03.20.16.20.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 16:20:35 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Wed, 21 Mar 2018 00:20:04 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v3 03/10] bus/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: Tue, 20 Mar 2018 23:20:37 -0000 This list should not be operated upon by drivers. Use the public API to achieve the same functionalities. Signed-off-by: Gaetan Rivet --- drivers/bus/vdev/Makefile | 1 + drivers/bus/vdev/vdev.c | 11 +++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/bus/vdev/Makefile b/drivers/bus/vdev/Makefile index 24d424a38..bd0bb8955 100644 --- a/drivers/bus/vdev/Makefile +++ b/drivers/bus/vdev/Makefile @@ -10,6 +10,7 @@ LIB = librte_bus_vdev.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # versioning export map EXPORT_MAP := rte_bus_vdev_version.map diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index e4bc72463..8ee264baf 100644 --- a/drivers/bus/vdev/vdev.c +++ b/drivers/bus/vdev/vdev.c @@ -256,7 +256,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; @@ -306,10 +306,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; } @@ -337,10 +335,7 @@ vdev_scan(void) rte_spinlock_unlock(&vdev_custom_scan_lock); /* 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.11.0