From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id 0EA521B5E6 for ; Thu, 21 Jun 2018 12:55:14 +0200 (CEST) Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id w5LAtDjq028823; Thu, 21 Jun 2018 19:55:14 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id E689BEA8363; Thu, 21 Jun 2018 19:55:13 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id DC3A7EA7E6C; Thu, 21 Jun 2018 19:55:13 +0900 (JST) Received: from [IPv6:::1] (watercress.nslab.ecl.ntt.co.jp [129.60.13.73]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id D84B540094A; Thu, 21 Jun 2018 19:55:13 +0900 (JST) References: <20180619113720.8336-1-shinohara.kenta@lab.ntt.co.jp> <20180619113720.8336-7-shinohara.kenta@lab.ntt.co.jp> From: Yasufumi Ogawa Message-ID: <4a41b3b6-66a0-0f07-d287-946a89c2c6c5@lab.ntt.co.jp> Date: Thu, 21 Jun 2018 19:53:47 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180619113720.8336-7-shinohara.kenta@lab.ntt.co.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Kenta Shinohara , spp@dpdk.org, ferruh.yigit@intel.com X-TM-AS-MML: disable Subject: Re: [spp] [PATCH 6/7] shared: fix for updating API of DPDK v18.05 X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 10:55:15 -0000 On 2018/06/19 20:37, Kenta Shinohara wrote: > 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 Thanks! Acked-by: Yasufumi Ogawa > > --- > 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; > } >