examples/ip_frag: fix use of ethdev internal device array
authorMarcin Zapolski <marcinx.a.zapolski@intel.com>
Wed, 17 Jul 2019 07:58:05 +0000 (09:58 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 18 Jul 2019 21:05:13 +0000 (23:05 +0200)
Modify ip_fragmentation example app to use rte_eth_info_get instead
of global rte_eth_devices structure.
Apps should not be using internal DPDK data structures directly.

Fixes: 9758b956dcf4 ("examples/ip_fragmentation: fix Tx queues init")
Cc: stable@dpdk.org
Signed-off-by: Marcin Zapolski <marcinx.a.zapolski@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
examples/ip_fragmentation/main.c

index ccaf23f..1b51bf2 100644 (file)
@@ -991,7 +991,7 @@ main(int argc, char **argv)
                        if (rte_lcore_is_enabled(lcore_id) == 0)
                                continue;
 
-                       if (queueid >= rte_eth_devices[portid].data->nb_tx_queues)
+                       if (queueid >= dev_info.nb_tx_queues)
                                break;
 
                        socket = (int) rte_lcore_to_socket_id(lcore_id);