From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 364251B224 for ; Thu, 12 Oct 2017 12:46:21 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id b189so11895922wmd.4 for ; Thu, 12 Oct 2017 03:46: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=CKP+LH3rMSHFVJPR5Wnl18huK/pUzWv/RZgJIodYcjY=; b=reqTyZXaruODpxpA4cWcVMiHVWLzOTLKmTj79OO9GAqTi4ojCnx4xCbmhD+PMpiQpV +es7pVDqLsi7E6PPFGeO9jxTHpFCpNscsoq2R00YNB7x3l3XV1lXB9mtz9HRTQboFPjC pFVFxxARQ9m6O37fb84VX9InulYlhPPtnzLwqWDNHwAt/Qxv4GVyTDg+dic/aw3DC3dV zi4vcOax+lOB+jGlX1lleBe8BlNSba2wZprXrLl2/WSdP3XboDacBBR6VGkow0r+2AL7 bjIp6IzeqR5H21zyozr+65osRh3SPmYrAJH0MPhOKIYKeBqQEyz0cTnFbhWYlBMmNN4Z sR7w== 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=CKP+LH3rMSHFVJPR5Wnl18huK/pUzWv/RZgJIodYcjY=; b=dGn6AF5LTYzzonULXC1h5KEBDtsJjStCJlIsvAIv5qdeL52XUf0/htynnM6IlZiPOG QtWZfD0Cv7fL+O83kn9/G97KWnrAC0E74bKJzM89vqabLAv+/Cy7Mupa0XKhYsjP3S8V hRBiemdoT8jFLxGfy/Uy18ThQSQPKhYc3A18OzOSoFOpkXuHb6FMJraGTlhRKK7rtPSU fJue+1SmX9WN3DPGxGMZ60SjpoaJ4F/VTjj8r4ciwKuHzBcnFqbYZV/ebOI6GrbpPR2I I8vngbMh/FunTnQN5PTX0cQZC3aktUIh0IRrkNTneVaMw/BXzZOws4QafJYO/l8mX86v pSMg== X-Gm-Message-State: AMCzsaXYxIjlHlJsoE/XvgNwD0Z5fqPVlIqc6vEfWMRMTF3sjCD/nlU5 AUbnXQLB76XTD412WUdN4zfv2TGT X-Google-Smtp-Source: AOwi7QDGHaDj7MsUrJz7wIMGFGHIbC2ehQEBGehyxa08FYISVvr3oRsxN8fZGclBaotbnm/NA5kZ1g== X-Received: by 10.223.133.186 with SMTP id 55mr1839370wrt.17.1507805180374; Thu, 12 Oct 2017 03:46:20 -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 z192sm16481146wmz.28.2017.10.12.03.46.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Oct 2017 03:46:19 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 12 Oct 2017 12:45:41 +0200 Message-Id: <3c22901bcbb634abb14d220296e612a8dbd8886e.1507804944.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 14/20] 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: , X-List-Received-Date: Thu, 12 Oct 2017 10:46:21 -0000 Do not expose the minute implementations of PCI parsing. This leaves only the all-purpose pci_addr_parse, which is simpler to use. Signed-off-by: Gaetan Rivet --- lib/librte_pci/include/rte_pci.h | 29 ----------------------------- lib/librte_pci/rte_pci.c | 28 ++++++++++++++-------------- lib/librte_pci/rte_pci_version.map | 2 -- 3 files changed, 14 insertions(+), 45 deletions(-) diff --git a/lib/librte_pci/include/rte_pci.h b/lib/librte_pci/include/rte_pci.h index 9e79557..ea0897c 100644 --- a/lib/librte_pci/include/rte_pci.h +++ b/lib/librte_pci/include/rte_pci.h @@ -151,21 +151,6 @@ TAILQ_HEAD(mapped_pci_res_list, mapped_pci_resource); 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 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 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 including @@ -181,20 +166,6 @@ int pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr); int eal_parse_pci_DomBDF(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 pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr); - -/** * @deprecated * Utility function to write a pci device name, this device name can later be * used to retrieve the corresponding rte_pci_addr using eal_parse_pci_* diff --git a/lib/librte_pci/rte_pci.c b/lib/librte_pci/rte_pci.c index 7ba472c..1307a18 100644 --- a/lib/librte_pci/rte_pci.c +++ b/lib/librte_pci/rte_pci.c @@ -70,13 +70,7 @@ get_u8_pciaddr_field(const char *in, void *_u8, char dlm) return end + 1; } -int -eal_parse_pci_BDF(const char *input, struct rte_pci_addr *dev_addr) -{ - return pci_bdf_parse(input, dev_addr); -} - -int +static int pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr) { const char *in = input; @@ -94,13 +88,7 @@ pci_bdf_parse(const char *input, struct rte_pci_addr *dev_addr) return 0; } -int -eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr) -{ - return pci_dbdf_parse(input, dev_addr); -} - -int +static int pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr) { const char *in = input; @@ -125,6 +113,18 @@ pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr) return 0; } +int +eal_parse_pci_BDF(const char *input, struct rte_pci_addr *dev_addr) +{ + return pci_bdf_parse(input, dev_addr); +} + +int +eal_parse_pci_DomBDF(const char *input, struct rte_pci_addr *dev_addr) +{ + return pci_dbdf_parse(input, dev_addr); +} + void rte_pci_device_name(const struct rte_pci_addr *addr, char *output, size_t size) diff --git a/lib/librte_pci/rte_pci_version.map b/lib/librte_pci/rte_pci_version.map index 5f50f98..b5c9ec2 100644 --- a/lib/librte_pci/rte_pci_version.map +++ b/lib/librte_pci/rte_pci_version.map @@ -5,8 +5,6 @@ DPDK_17.11 { eal_parse_pci_DomBDF; pci_addr_cmp; pci_addr_parse; - pci_bdf_parse; - pci_dbdf_parse; pci_device_name; pci_map_resource; pci_unmap_resource; -- 2.1.4