From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id D589823C for ; Tue, 24 Apr 2018 01:55:21 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id w3-v6so45729092wrg.2 for ; Mon, 23 Apr 2018 16:55:21 -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=sqwgRSXZrN/wMBZDPVD2H/szpwND94cW5nwE1tGPc0k=; b=WJOpghMxtmFR/qQE2vjehVEZhuGm4+vnKPXlPIWSFOt1hpiw2utAEFPahUPIu/WCob HQJPQ9/UgaaET8ekqP3CpO5c9Hk2ZzMG5nVJFa9bg3Omqmv+che2ae9CfJE/U4ojAl4g fnjt3yPlgG4OIre0+Slw2ZNhuJfPaTN8ZPrQABN44jFsxjJevbpQi/rPL0GhExPUJ48Q LH0CObWzqNkwPOVJkBX4azxNHykNuRSl0V6J7ERONCBNN0TtwAqorer+Ha7BhqnPJk0v tPF8xoFhzKjcRREFzk2rVCck31IL175N0TdxBfNVOCwsDV5XUx2jJ9DaEHoyYgWkL6KP Ls/g== 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=sqwgRSXZrN/wMBZDPVD2H/szpwND94cW5nwE1tGPc0k=; b=Ony+7Qxl6RtrvM6ed6Ul4AMSkCzMAVs4z0pfogwc5ForNSYeSOd7gL0txUVXpXGgmV bx+6mR21e3GBiEt7k3TVFpMfBj/NLXiTxJCR0a5HTJbocUoqZT4IcOyh11n1wV3NCuXn rYhl9/CGuwmhQAyFWnhWBBIe1EnVQbyHxR/KqY8YW7Mc8XY6F22/0k5H+7ZV2fFVMjc2 YhZ9IBDqGLdF8VOLswMs8f5Rwiob2H/sFlCXIuX0pKNC2BZBazUr+4LfAY6y00lsFv1f oNivUZ0T3PCilrMQGcHI+qqczdDBtIz1ULOqvsV1CrOEpFX6zSHAH13UsgOKwLbvrJ66 ZdPg== X-Gm-Message-State: ALQs6tAAE4n7HSRTa9Ztr6DfJbpdzqWMqWfgQi4aRAkQxGcZ/HhO70VD lUrrohdAD00OzMFHmsVNMcpQ2+cD X-Google-Smtp-Source: AIpwx49PS5mk9nb4nowAUKRcd/ncOEt787mH1Uq53QRSDG+eoRoHI5eDC0R5iVBz7b+PH/5AiCUiOg== X-Received: by 2002:adf:e092:: with SMTP id c18-v6mr16649035wri.70.1524527721243; Mon, 23 Apr 2018 16:55:21 -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 55-v6sm28922279wrw.52.2018.04.23.16.55.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 16:55:20 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Tue, 24 Apr 2018 01:54:48 +0200 Message-Id: <1aac53b32a519151fdec6c26e004658d8f0cc076.1524527213.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 06/10] devargs: make devargs list private 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: Mon, 23 Apr 2018 23:55:22 -0000 Initially, rte_devargs was meant to be populated once and sometimes accessed, then never emptied. With the new hotplug functionality having better standing, new usage appeared with repeated addition of devices and their subsequent removal. Exposing devargs_list pushed bus drivers and libraries to be careless and inconsistent in their memory management. Making it private will allow to rationalize this part of the EAL and ensure that fewer memory leaks occur during operations. Signed-off-by: Gaetan Rivet Acked-by: Thomas Monjalon --- doc/guides/rel_notes/deprecation.rst | 1 - lib/librte_eal/common/eal_common_devargs.c | 3 +++ lib/librte_eal/common/include/rte_devargs.h | 6 ------ lib/librte_eal/rte_eal_version.map | 1 - 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 1f814b4b1..2165fe4c6 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -16,7 +16,6 @@ Deprecation Notices - removal of ``name`` and ``args`` fields. - The enum ``rte_devtype`` was used to identify a bus and will disappear. - - The ``rte_devargs_list`` will be made private. - Functions previously deprecated will change or disappear: + ``rte_eal_devargs_add`` diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c index c6c5eabcf..a7f374cfa 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c @@ -18,6 +18,9 @@ #include #include "eal_private.h" +/** user device double-linked queue type definition */ +TAILQ_HEAD(rte_devargs_list, rte_devargs); + /** Global list of user devices */ struct rte_devargs_list devargs_list = TAILQ_HEAD_INITIALIZER(devargs_list); diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h index aba31481b..e48cc3cf2 100644 --- a/lib/librte_eal/common/include/rte_devargs.h +++ b/lib/librte_eal/common/include/rte_devargs.h @@ -59,12 +59,6 @@ struct rte_devargs { char *args; }; -/** user device double-linked queue type definition */ -TAILQ_HEAD(rte_devargs_list, rte_devargs); - -/** Global list of user devices */ -extern struct rte_devargs_list devargs_list; - /** * Parse a devargs string. * diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index 74c779068..4054fc111 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -2,7 +2,6 @@ DPDK_2.0 { global: __rte_panic; - devargs_list; eal_parse_sysfs_value; eal_timer_source; lcore_config; -- 2.11.0