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

Nipun Gupta nipun.gupta at nxp.com
Mon Dec 30 08:40:32 CET 2019


Hi Pavan,

> -----Original Message-----
> From: Pavan Nikhilesh Bhagavatula <pbhagavatula at marvell.com>
> Sent: Sunday, December 29, 2019 9:12 PM
> To: Nipun Gupta <nipun.gupta at nxp.com>; Jerin Jacob Kollanukkaran
> <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>
> Cc: dev at dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 04/11] examples/l3fwd: add ethdev setup
> based on eventdev
> 
> 
> >> -----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.

Okay. Got it.

> 
> >
> >> +
> >> +		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.

For atomic queues, we have single queue providing packets to a single core at a time till processing on that core is completed, irrespective of the flows on that hardware queue.
And multiple queues are required to distribute separate packets on separate cores, with these atomic queues maintaining the ordering and not scheduling on other core, until processing core has completed its job.
To have this solution generic, we should also take config parameter - (port, number of queues) to enable multiple ethernet RX queues.

Regards,
Nipun

> 
> >
> >Regards,
> >Nipun
> >
> 
> Regards,
> Pavan.


More information about the dev mailing list