From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by dpdk.org (Postfix) with ESMTP id 707D37D62 for ; Fri, 25 Aug 2017 18:08:26 +0200 (CEST) Received: by mail-wr0-f175.google.com with SMTP id o76so681454wrb.5 for ; Fri, 25 Aug 2017 09:08:26 -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=pC7K1RU2oTMGISTZzgvoydIoxykD0uKoLoINi2ewsq0yh4RQASwTcJojpqT8jTiK9R ET8O919IBLRCKGV7jsJlfo459Jl1ggX79bYNMJVmQCTCljEzO63XH3AkkHAw0/1kY/TH VH5q2z+pYRWHWlKN80/NtHEWwsrrf3+BeV33kzPv9VA53UM2pk6UjknNk7q4D6LHZnpS ipsC8pBnQii+IPo2HLvL51I0jCSaMz3mC6eW2cRO4v7QT7fUKcZnzgJn8oaKy3x4KwSF oKNyXs3EVol1yJoW3EX0kEh9UNgjdZXLS4Z1uKRxjEJ9773iY3dt9pWo1Rpp0nPBnFyX iJ6g== 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=ILU57w9sz28vaNpwKmsYXNtBR6z33JDOn+3V/h5nLzVW3RVUCuJjUB1t9P7MrTbFU5 l6KWhLE5VQn8aINret9MO9VnY1rlM3gz5iX/Zd0Ay3QWtVwERE1CSdC8hBpK3EoBnsjA Hi0PSPLCEn8XCrvAkbo9duEet12fhaaQgkYO2WpuuufYiNmuOMO5MyD194k/Sym31vXS dQ3yePhvMlgjWx6e4zAiWhuODmn31A3DJF50udIPOo5CBuLKksYJntSo5OyDpjjDvxBB nrbaf0RRMlhD4JpVTaibYQy2JQRDIuj2gdPTny5T22SKi1nEWN/O2iqAbV0+Y4AEpJIS dZHw== X-Gm-Message-State: AHYfb5i0dYi0+8uN5CT2OODOdHYNmAIwcHyfuByfyLjir76GrSb9OXQY PZW0T011bwEYBuKj8wE= X-Received: by 10.223.199.212 with SMTP id y20mr6028817wrg.279.1503677305741; Fri, 25 Aug 2017 09:08:25 -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 h190sm1351661wmd.4.2017.08.25.09.08.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Aug 2017 09:08:24 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Fri, 25 Aug 2017 18:07:23 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 3/6] 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: Fri, 25 Aug 2017 16:08:26 -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