From: Marcin Zapolski <marcinx.a.zapolski@intel.com>
To: dev@dpdk.org
Cc: Marcin Zapolski <marcinx.a.zapolski@intel.com>,
alialnu@mellanox.com,
Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [v2 2/3] examples/ip_fragmentation: fix use of internal struct
Date: Wed, 17 Jul 2019 09:58:05 +0200 [thread overview]
Message-ID: <20190717075806.2320-3-marcinx.a.zapolski@intel.com> (raw)
In-Reply-To: <20190717075806.2320-1-marcinx.a.zapolski@intel.com>
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 --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)
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);
--
2.17.1
next prev parent reply other threads:[~2019-07-17 7:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 9:56 [dpdk-dev] [PATCH 0/3] examples: remove usage of internal structures Marcin Zapolski
2019-07-15 9:56 ` [dpdk-dev] [PATCH 1/3] examples/l3fwd*: remove references to rte_eth_devices Marcin Zapolski
2019-07-15 15:03 ` Bruce Richardson
2019-07-15 9:56 ` [dpdk-dev] [PATCH 2/3] examples/ip_fragmentation: remove usage of internal struct Marcin Zapolski
2019-07-15 14:39 ` Bruce Richardson
2019-07-15 14:45 ` Bruce Richardson
2019-07-15 9:56 ` [dpdk-dev] [PATCH 3/3] examples/ipsec-secgw: remove usage of internal structure Marcin Zapolski
2019-07-15 14:51 ` Bruce Richardson
2019-07-17 7:58 ` [dpdk-dev] [v2 0/3] examples: fix use of internal struct Marcin Zapolski
2019-07-17 7:58 ` [dpdk-dev] [v2 1/3] examples/l3fwd*: " Marcin Zapolski
2019-07-17 7:58 ` Marcin Zapolski [this message]
2019-07-17 7:58 ` [dpdk-dev] [v2 3/3] examples/ipsec-secgw: " Marcin Zapolski
2019-07-18 20:42 ` [dpdk-dev] [v2 0/3] examples: " Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190717075806.2320-3-marcinx.a.zapolski@intel.com \
--to=marcinx.a.zapolski@intel.com \
--cc=alialnu@mellanox.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).