From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 487ADA498 for ; Wed, 21 Mar 2018 06:41:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2018 22:41:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,338,1517904000"; d="scan'208";a="43926805" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.67.64.69]) ([10.67.64.69]) by orsmga002.jf.intel.com with ESMTP; 20 Mar 2018 22:41:45 -0700 To: Gaetan Rivet , dev@dpdk.org References: From: "Tan, Jianfeng" Message-ID: <869d9034-c7b8-4c03-347c-712784714959@intel.com> Date: Wed, 21 Mar 2018 13:41:44 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: Wed, 21 Mar 2018 05:41:47 -0000 On 3/21/2018 7:20 AM, Gaetan Rivet wrote: > This list should not be operated upon by drivers. > Use the public API to achieve the same functionalities. > > Signed-off-by: Gaetan Rivet Acked-by: Jianfeng Tan Thanks, Jianfeng > --- > 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)