summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEmma Kenny <emma.kenny@intel.com>2018-07-02 16:40:21 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-07-11 19:22:40 +0200
commitcded996be2f7612d2417e77b19938da58b90ec3b (patch)
treec67ecdb955a3f8c8838d90e06ffd4eafe0e4ca14 /examples
parentc754c7d809347e264cc305b1e389cb322e1e1ab3 (diff)
downloaddpdk-cded996be2f7612d2417e77b19938da58b90ec3b.zip
dpdk-cded996be2f7612d2417e77b19938da58b90ec3b.tar.gz
dpdk-cded996be2f7612d2417e77b19938da58b90ec3b.tar.xz
examples/multi_process: fix build
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; Fixes: f8c02ca878af ("examples/multi_process: convert to new ethdev offloads API") Cc: stable@dpdk.org Signed-off-by: Emma Kenny <emma.kenny@intel.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/multi_process/l2fwd_fork/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index 20a6a3d..80335c8 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -1029,6 +1029,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) {
@@ -1072,7 +1073,7 @@ main(int argc, char **argv)
/* init one TX queue on each port */
fflush(stdout);
txq_conf = dev_info.default_txconf;
- 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);