From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id 89B021BB78 for ; Thu, 21 Jun 2018 12:53:02 +0200 (CEST) Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id w5LAr1St028760; Thu, 21 Jun 2018 19:53:01 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id EDDD1EA83C9; Thu, 21 Jun 2018 19:53:00 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id E37ECEA836A; Thu, 21 Jun 2018 19:53:00 +0900 (JST) Received: from [IPv6:::1] (watercress.nslab.ecl.ntt.co.jp [129.60.13.73]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id DFAC840094A; Thu, 21 Jun 2018 19:53:00 +0900 (JST) References: <20180619113720.8336-1-shinohara.kenta@lab.ntt.co.jp> <20180619113720.8336-2-shinohara.kenta@lab.ntt.co.jp> From: Yasufumi Ogawa Message-ID: Date: Thu, 21 Jun 2018 19:51:32 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180619113720.8336-2-shinohara.kenta@lab.ntt.co.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CC-Mail-RelayStamp: 1 To: Kenta Shinohara , spp@dpdk.org, ferruh.yigit@intel.com X-TM-AS-MML: disable Subject: Re: [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: Thu, 21 Jun 2018 10:53:03 -0000 On 2018/06/19 20:37, Kenta Shinohara wrote: > 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 Thanks! Acked-by: Yasufumi Ogawa > > --- > 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; > > -- Yasufumi Ogawa NTT Network Service Systems Labs