From patchwork Mon Jul 2 15:40:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emma Kenny X-Patchwork-Id: 42104 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2FA71B459; Mon, 2 Jul 2018 17:39:20 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id D12BD5F29 for ; Mon, 2 Jul 2018 17:39:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 08:39:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,299,1526367600"; d="scan'208";a="54536864" Received: from silpixa00399499.ir.intel.com (HELO silpixa00399499.ger.corp.intel.com) ([10.237.222.184]) by orsmga006.jf.intel.com with ESMTP; 02 Jul 2018 08:39:15 -0700 From: Emma Kenny To: dev@dpdk.org Cc: anatoly.burakov@intel.com, ferruh.yigit@intel.com, Emma Kenny , shahafs@mellanox.com Date: Mon, 2 Jul 2018 16:40:21 +0100 Message-Id: <20180702154021.17908-1-emma.kenny@intel.com> X-Mailer: git-send-email 2.9.5 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v1] examples/multi_process: fix build error 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" Fix bug with undeclared variable name and calling a variable that is not member of struct. CC main.o l2fwd_fork/main.c: In function ‘main’: l2fwd_fork/main.c:1043:33: error: ‘dev_info’ undeclared (first use in this function) rte_eth_dev_info_get(portid, &dev_info); l2fwd_fork/main.c:1043:33: note: each undeclared identifier is reported only once for each function it appears in l2fwd_fork/main.c:1077:11: error: ‘struct rte_eth_txconf’ has no member named ‘tx_offloads’ txq_conf.tx_offloads = local_port_conf.txmode.offloads; make[1]: *** [main.o] Error 1 make: *** [all] Error 2 Fixes: f8c02ca878af ("examples/multi_process: convert to new ethdev offloads API") Cc: shahafs@mellanox.com Signed-off-by: Emma Kenny Acked-by: Ferruh Yigit Acked-by: Shahaf Shuler --- examples/multi_process/l2fwd_fork/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c index 94318ab..62e3937 100644 --- a/examples/multi_process/l2fwd_fork/main.c +++ b/examples/multi_process/l2fwd_fork/main.c @@ -1030,6 +1030,7 @@ main(int argc, char **argv) struct rte_eth_rxconf rxq_conf; struct rte_eth_txconf txq_conf; struct rte_eth_conf local_port_conf = port_conf; + struct rte_eth_dev_info dev_info; /* skip ports that are not enabled */ if ((l2fwd_enabled_port_mask & (1 << portid)) == 0) { @@ -1074,7 +1075,7 @@ main(int argc, char **argv) fflush(stdout); txq_conf = dev_info.default_txconf; txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE; - txq_conf.tx_offloads = local_port_conf.txmode.offloads; + txq_conf.offloads = local_port_conf.txmode.offloads; ret = rte_eth_tx_queue_setup(portid, 0, nb_txd, rte_eth_dev_socket_id(portid), &txq_conf);