[dpdk-dev] [PATCH v2 04/11] examples/l3fwd: add ethdev setup based on eventdev

Pavan Nikhilesh Bhagavatula pbhagavatula at marvell.com
Sun Dec 29 16:42:21 CET 2019


>> -----Original Message-----
>> From: dev <dev-bounces at dpdk.org> On Behalf Of
>> pbhagavatula at marvell.com
>> Sent: Wednesday, December 4, 2019 8:14 PM
>> To: jerinj at marvell.com; Marko Kovacevic
><marko.kovacevic at intel.com>; Ori
>> Kam <orika at mellanox.com>; Bruce Richardson
>> <bruce.richardson at intel.com>; Radu Nicolau
><radu.nicolau at intel.com>;
>> Akhil Goyal <akhil.goyal at nxp.com>; Tomasz Kantecki
>> <tomasz.kantecki at intel.com>; Sunil Kumar Kori
><skori at marvell.com>;
>> Pavan Nikhilesh <pbhagavatula at marvell.com>
>> Cc: dev at dpdk.org
>> Subject: [dpdk-dev] [PATCH v2 04/11] examples/l3fwd: add ethdev
>setup
>> based on eventdev
>>
>> From: Sunil Kumar Kori <skori at marvell.com>
>>
>> Add ethernet port Rx/Tx queue setup for event device which are later
>> used for setting up event eth Rx/Tx adapters.
>>
>> Signed-off-by: Sunil Kumar Kori <skori at marvell.com>
>> ---
>>  examples/l3fwd/l3fwd.h       |  10 +++
>>  examples/l3fwd/l3fwd_event.c | 129
>> ++++++++++++++++++++++++++++++++++-
>>  examples/l3fwd/l3fwd_event.h |   2 +-
>>  examples/l3fwd/main.c        |  15 ++--
>>  4 files changed, 144 insertions(+), 12 deletions(-)
>>
>
><snip>
>
>> +
>> +		local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
>> +
>> 	dev_info.flow_type_rss_offloads;
>> +		if (local_port_conf.rx_adv_conf.rss_conf.rss_hf !=
>> +				port_conf-
>>rx_adv_conf.rss_conf.rss_hf) {
>> +			printf("Port %u modified RSS hash function "
>> +			       "based on hardware support,"
>> +			       "requested:%#"PRIx64"
>> configured:%#"PRIx64"\n",
>> +			       port_id,
>> +			       port_conf->rx_adv_conf.rss_conf.rss_hf,
>> +
>local_port_conf.rx_adv_conf.rss_conf.rss_hf);
>> +		}
>
>We are using 1 queue, but using RSS hash function?

rte_event::flow_id which uniquely identifies a given flow is generated using
RSS Hash function on the required fields in the packet.

>
>> +
>> +		ret = rte_eth_dev_configure(port_id, 1, 1,
>&local_port_conf);
>> +		if (ret < 0)
>> +			rte_exit(EXIT_FAILURE,
>> +				 "Cannot configure device: err=%d,
>> port=%d\n",
>> +				 ret, port_id);
>> +
>
>We should be using number of RX queues as per the config option
>provided in the arguments.
>L3fwd is supposed to support multiple queue. Right?

The entire premise of using event device is to showcase packet scheduling to cores
without the need for splitting packets across multiple queues.

Queue config is ignored when event mode is selected.
 
>
>Regards,
>Nipun
>

Regards,
Pavan.


More information about the dev mailing list