From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB680C76186 for ; Wed, 17 Jul 2019 07:58:53 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id AFADD2077C for ; Wed, 17 Jul 2019 07:58:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFADD2077C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC34F2BBB; Wed, 17 Jul 2019 09:58:45 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CB09923D for ; Wed, 17 Jul 2019 09:58:39 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2019 00:58:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,273,1559545200"; d="scan'208";a="187509432" Received: from marcinzx-mobl.ger.corp.intel.com ([10.103.104.99]) by fmsmga001.fm.intel.com with ESMTP; 17 Jul 2019 00:58:38 -0700 From: Marcin Zapolski To: dev@dpdk.org Cc: Marcin Zapolski , alialnu@mellanox.com, Bruce Richardson Date: Wed, 17 Jul 2019 09:58:05 +0200 Message-Id: <20190717075806.2320-3-marcinx.a.zapolski@intel.com> X-Mailer: git-send-email 2.22.0.windows.1 In-Reply-To: <20190717075806.2320-1-marcinx.a.zapolski@intel.com> References: <20190715095623.579-1-marcinx.a.zapolski@intel.com> <20190717075806.2320-1-marcinx.a.zapolski@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [v2 2/3] examples/ip_fragmentation: fix use of internal struct X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: Bruce Richardson --- 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