[spp] [PATCH 1/7] spp_nfv: fix deprecated use of rte_eth_dev_count
Yasufumi Ogawa
ogawa.yasufumi at lab.ntt.co.jp
Thu Jun 21 12:51:32 CEST 2018
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 at 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 <shinohara.kenta at lab.ntt.co.jp>
Thanks!
Acked-by: Yasufumi Ogawa <ogawa.yasufumi at lab.ntt.co.jp>
>
> ---
> 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
More information about the spp
mailing list