From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gmobb.jp (smtpbb012.gmobb.jp [157.7.156.159]) by dpdk.org (Postfix) with ESMTP id C165C397D for ; Tue, 19 Jun 2018 13:37:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by smtp.gmobb.jp (Postfix) with ESMTP id 94A557E96C; Tue, 19 Jun 2018 20:37:32 +0900 (JST) X-Virus-Scanned: amavisd-new at gmoserver.jp Received: from smtp.gmobb.jp ([127.0.0.1]) by localhost (smtp.gmoserver.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zllq1ZVLHc59; Tue, 19 Jun 2018 20:37:32 +0900 (JST) Received: from localhost.localdomain (unknown [192.47.164.146]) by smtp.gmobb.jp (Postfix) with ESMTPA id 75B8F7E967; Tue, 19 Jun 2018 20:37:32 +0900 (JST) From: Kenta Shinohara To: spp@dpdk.org, ferruh.yigit@intel.com Cc: Kenta Shinohara Date: Tue, 19 Jun 2018 20:37:14 +0900 Message-Id: <20180619113720.8336-2-shinohara.kenta@lab.ntt.co.jp> X-Mailer: git-send-email 2.15.1 (Apple Git-101) In-Reply-To: <20180619113720.8336-1-shinohara.kenta@lab.ntt.co.jp> References: <20180619113720.8336-1-shinohara.kenta@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [spp] [PATCH 1/7] spp_nfv: fix deprecated use of rte_eth_dev_count X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2018 11:37:35 -0000 A method 'rte_eth_dev_count' changes to 'rte_eth_dev_count_avail' because rte_eth_dev_count is deprecated on DPDK v18.05. build error: /home/k-shino/spp/src/nfv/nfv.c: In function ‘main’: /home/k-shino/spp/src/nfv/nfv.c:941:2: warning: ‘rte_eth_dev_count’ is deprecated [-Wdeprecated-declarations] nb_ports = rte_eth_dev_count(); ^ In file included from /home/k-shino/spp/src/nfv/../shared/common.h :21:0, from /home/k-shino/spp/src/nfv/nfv.c:12: /home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/ x86_64-native-linuxapp-gcc/include/rte_ethdev.h:1439:10: note: declared here uint16_t rte_eth_dev_count(void); ^ Signed-off-by: Kenta Shinohara --- src/nfv/nfv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nfv/nfv.c b/src/nfv/nfv.c index f677691..103b96a 100644 --- a/src/nfv/nfv.c +++ b/src/nfv/nfv.c @@ -905,7 +905,7 @@ main(int argc, char *argv[]) port_map_init(); /* Check that there is an even number of ports to send/receive on. */ - nb_ports = rte_eth_dev_count(); + nb_ports = rte_eth_dev_count_avail(); if (nb_ports > RTE_MAX_ETHPORTS) nb_ports = RTE_MAX_ETHPORTS; -- 2.15.1 (Apple Git-101)