summaryrefslogtreecommitdiff
path: root/examples/ip_fragmentation
diff options
context:
space:
mode:
authorMarcin Zapolski <marcinx.a.zapolski@intel.com>2019-07-17 09:58:05 +0200
committerThomas Monjalon <thomas@monjalon.net>2019-07-18 23:05:13 +0200
commit6b7780bfebe4de743c5edbe7a3c7f9fa817789ad (patch)
tree73e36335154c86f517c7f6c24b5de578c0070322 /examples/ip_fragmentation
parent0109baf1964ca047646d49708263b2f6cbd63571 (diff)
downloaddpdk-6b7780bfebe4de743c5edbe7a3c7f9fa817789ad.zip
dpdk-6b7780bfebe4de743c5edbe7a3c7f9fa817789ad.tar.gz
dpdk-6b7780bfebe4de743c5edbe7a3c7f9fa817789ad.tar.xz
examples/ip_frag: fix use of ethdev internal device array
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>
Diffstat (limited to 'examples/ip_fragmentation')
-rw-r--r--examples/ip_fragmentation/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index ccaf23f..1b51bf2 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -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);