From patchwork Thu Oct 26 10:06:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABtan_Rivet?= X-Patchwork-Id: 30954 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 205581BAFA; Thu, 26 Oct 2017 12:07:01 +0200 (CEST) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 33F951BA8D for ; Thu, 26 Oct 2017 12:06:46 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id r68so7134182wmr.3 for ; Thu, 26 Oct 2017 03:06:46 -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=nGdY724WN3YsoJqqhHmemEFsZjNO+SMyXvY9f5RHchM=; b=gz4F8XK2jX04OXO7OTgkoELlw1jq9qbnO2LGNb4LvAs31UfEPx5e9HkjLQzEVqdEko qR0FkBZOC/+S7E4q/j/ON4/joKBXjwxQtHLATOuHXSIvCIXUGsJkOjHxoIoMA6/UPWUN fUe9CramXDCdh+BY2cCJBSri9GnmxWIR0DAASUe4HN09yCjKAtWhl5Lv3PCdhmjDj/TS 1JzEyoIdUecTwZdTYlHTg+LlLE2q1Rt2W21RyzC4PB6HgixJFUZd1O2lhbwuHn+3mFAW ZPWUpeJsv3Gb/Cw/lDFsGr4U1JpUSpLWHEfk9qw3T0JXprKof4ol/fmw6qVxIIXTvabS BzJg== 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=nGdY724WN3YsoJqqhHmemEFsZjNO+SMyXvY9f5RHchM=; b=J++kTISsejJhO/1U7Lhtyrcpt5bvQ6ftC7jX/vYbXrRWAqMnJn/UVjaZi0bIKKoVlb +wVwpIz0Y+F7aet3+MAVAH/TYMYfr4yGwT3Fx1ICvT2W1gsPm+KsDCTIX2XjUPP37R1q S6Wsut+Z0cPyhv67usaZdWT+CHPwcm+C6Ld2gcewHPgsgBng5wmXNNSD4b4XQuL+sbnc xzApDIwZ9lgEwIXF+4IShb3wS9baceFgYa59SZqAETBowXU+yTJn7N3nktNG18qw3xS4 SxxXV2EA+indxfGUwrY/r9cg4itv4E/5vn7/1K3wJnRyrAZpsCpWpmgAtjjHyqHneqUm FQqg== X-Gm-Message-State: AMCzsaWvQQpqqr4/pztbwol6acH2cXCaC8ohJf4XlUirPNimYpuW97Jl ghJpUHBDf3y/37zlgz3P/mJrH12B X-Google-Smtp-Source: ABhQp+TNI2eadsvtI8Q0CWBKWuv77VJD2JcKFkcwDAM4rhB0qsWjAvu265k74Bgpo+j1PwVj1+HnGw== X-Received: by 10.80.207.195 with SMTP id i3mr27628138edk.55.1509012405500; Thu, 26 Oct 2017 03:06:45 -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 u12sm3339619edk.45.2017.10.26.03.06.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Oct 2017 03:06:44 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 26 Oct 2017 12:06:00 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v8 15/25] pci: make specialized parsing functions 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Do not expose the minute implementations of PCI parsing. This leaves only the all-purpose rte_pci_addr_parse, which is simpler to use. Signed-off-by: Gaetan Rivet --- doc/guides/rel_notes/deprecation.rst | 6 ++---- lib/librte_eal/common/eal_common_pci.c | 4 ++-- lib/librte_eal/common/include/rte_pci.h | 29 ----------------------------- lib/librte_eal/rte_eal_version.map | 2 -- 4 files changed, 4 insertions(+), 37 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 277c78d..d995346 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -64,8 +64,6 @@ Deprecation Notices * pci: Several exposed functions are misnamed. The following functions are deprecated starting from v17.11 and are replaced: - - ``eal_parse_pci_BDF`` replaced by ``rte_pci_bdf_parse`` - - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_dbdf_parse`` + - ``eal_parse_pci_BDF`` replaced by ``rte_pci_addr_parse`` + - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse`` - ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp`` - - The functions are only renamed. Their behavior is not affected. diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index d01b0f9..70729d2 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -105,7 +105,7 @@ get_u8_pciaddr_field(const char *in, void *_u8, char dlm) } -int +static int rte_pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr) { const char *in = input; @@ -129,7 +129,7 @@ eal_parse_pci_BDF(const char *input, struct rte_pci_addr *dev_addr) return rte_pci_bdf_parse(input, dev_addr); } -int +static int rte_pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr) { const char *in = input; diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 11ba442..11ade4d 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -241,21 +241,6 @@ struct mapped_pci_resource { TAILQ_HEAD(mapped_pci_res_list, mapped_pci_resource); /** - * Utility function to produce a PCI Bus-Device-Function value - * given a string representation. Assumes that the BDF is provided without - * a domain prefix (i.e. domain returned is always 0) - * - * @param input - * The input string to be parsed. Should have the format XX:XX.X - * @param dev_addr - * The PCI Bus-Device-Function address to be returned. Domain will always be - * returned as 0 - * @return - * 0 on success, negative on error. - */ -int rte_pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr); - -/** * @deprecated * Utility function to produce a PCI Bus-Device-Function value * given a string representation. Assumes that the BDF is provided without @@ -272,20 +257,6 @@ int rte_pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr); int eal_parse_pci_BDF(const char *input, struct rte_pci_addr *dev_addr); /** - * Utility function to produce a PCI Bus-Device-Function value - * given a string representation. Assumes that the BDF is provided including - * a domain prefix. - * - * @param input - * The input string to be parsed. Should have the format XXXX:XX:XX.X - * @param dev_addr - * The PCI Bus-Device-Function address to be returned - * @return - * 0 on success, negative on error. - */ -int rte_pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr); - -/** * @deprecated * Utility function to produce a PCI Bus-Device-Function value * given a string representation. Assumes that the BDF is provided including diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index 3568694..180eee8 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -255,8 +255,6 @@ DPDK_17.11 { rte_memcpy_ptr; rte_pci_addr_cmp; rte_pci_addr_parse; - rte_pci_bdf_parse; - rte_pci_dbdf_parse; rte_pci_device_name; rte_pci_get_iommu_class; rte_pci_match;