Soft Patch Panel
 help / color / mirror / Atom feed
From: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
To: spp@dpdk.org, ferruh.yigit@intel.com
Cc: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
Subject: [spp] [PATCH 6/7] shared: fix for updating API of DPDK v18.05
Date: Tue, 19 Jun 2018 20:37:19 +0900	[thread overview]
Message-ID: <20180619113720.8336-7-shinohara.kenta@lab.ntt.co.jp> (raw)
In-Reply-To: <20180619113720.8336-1-shinohara.kenta@lab.ntt.co.jp>

An error has occured while executing spp primary.

execution error:
k-shino@tyrannosaurus:~/dpdk1805/spp$ sudo ./src/primary/x86_64-native
-linuxapp-gcc/spp_primary -l 2 -n 4 --socket-mem 512 --huge-dir=/dev/h
ugepages --proc-type=primary -- -p 0x02 -n 1 -s 192.168.122.1:5555
EAL: Detected 6 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/.rte_unix
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:00:19.0 on NUMA socket 0
EAL:   probe driver: 8086:153a net_e1000_em
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL:   probe driver: 8086:105e net_e1000_em
EAL: PCI device 0000:04:00.1 on NUMA socket 0
EAL:   probe driver: 8086:105e net_e1000_em
APP: Port 1 init ... eth_em_tx_queue_setup(): 0xcd1680: Tx queue offlo
ads 0x801d don't match port offloads 0x0 or supported port offloads 0x
f or supported queue offloads 0xf
EAL: Error - exiting with code: 1
  Cause: Cannot initialise port 0

This error is caused by updating API of 'eth_em_tx_queue_setup()'.
To fix this, replace 5th argument of the method from 'NULL', which is
referenced from examples/l2fwd/main.c.

Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>

---
 src/shared/common.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/shared/common.c b/src/shared/common.c
index b11cb6d..10115d1 100644
--- a/src/shared/common.c
+++ b/src/shared/common.c
@@ -115,10 +115,21 @@ init_port(uint16_t port_num, struct rte_mempool *pktmbuf_pool)
 	const uint16_t tx_ring_size = RTE_MP_TX_DESC_DEFAULT;
 	uint16_t q;
 	int retval;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_conf local_port_conf = port_conf;
+	struct rte_eth_txconf txq_conf;
 
 	RTE_LOG(INFO, APP, "Port %u init ... ", port_num);
 	fflush(stdout);
 
+	rte_eth_dev_info_get(port_num, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		local_port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+	txq_conf = dev_info.default_txconf;
+	txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
+	txq_conf.offloads = local_port_conf.txmode.offloads;
+
 	/*
 	 * Standard DPDK port initialisation - config port, then set up
 	 * rx and tx rings
@@ -137,7 +148,7 @@ init_port(uint16_t port_num, struct rte_mempool *pktmbuf_pool)
 
 	for (q = 0; q < tx_rings; q++) {
 		retval = rte_eth_tx_queue_setup(port_num, q, tx_ring_size,
-			rte_eth_dev_socket_id(port_num), NULL);
+			rte_eth_dev_socket_id(port_num), &txq_conf);
 		if (retval < 0)
 			return retval;
 	}
-- 
2.15.1 (Apple Git-101)

  parent reply	other threads:[~2018-06-19 11:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 11:37 [spp] [PATCH 0/7] patches for " Kenta Shinohara
2018-06-19 11:37 ` [spp] [PATCH 1/7] spp_nfv: fix deprecated use of rte_eth_dev_count Kenta Shinohara
2018-06-21 10:51   ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 2/7] spp_primary: " Kenta Shinohara
2018-06-21 10:52   ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 3/7] spp_vm: " Kenta Shinohara
2018-06-21 10:52   ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 4/7] spp_vf: " Kenta Shinohara
2018-06-21 10:52   ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 5/7] spp_vm: fix changing spec of rte_mem_config Kenta Shinohara
2018-06-21 10:53   ` Yasufumi Ogawa
2018-06-19 11:37 ` Kenta Shinohara [this message]
2018-06-21 10:53   ` [spp] [PATCH 6/7] shared: fix for updating API of DPDK v18.05 Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 7/7] spp_vm: add DALLOW_EXPERIMENTAL_API on CFLAGS Kenta Shinohara
2018-06-21 10:54   ` Yasufumi Ogawa
2018-06-21 10:49 ` [spp] [PATCH 0/7] patches for DPDK v18.05 Yasufumi Ogawa
2018-08-15 15:44   ` Ferruh Yigit

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=20180619113720.8336-7-shinohara.kenta@lab.ntt.co.jp \
    --to=shinohara.kenta@lab.ntt.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@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).