diff mbox series

[v2,2/3] examples/ip_fragmentation: fix use of internal struct

Message ID 20190717075806.2320-3-marcinx.a.zapolski@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series examples: fix use of internal struct | expand


Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Marcin Zapolski July 17, 2019, 7:58 a.m. UTC
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: alialnu@mellanox.com

Signed-off-by: Marcin Zapolski <marcinx.a.zapolski@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
 examples/ip_fragmentation/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 85c0100f7..a2a14e827 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -989,7 +989,7 @@  main(int argc, char **argv)
 			if (rte_lcore_is_enabled(lcore_id) == 0)
-			if (queueid >= rte_eth_devices[portid].data->nb_tx_queues)
+			if (queueid >= dev_info.nb_tx_queues)
 			socket = (int) rte_lcore_to_socket_id(lcore_id);