DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anoob Joseph <anoobj@marvell.com>
To: "Carrillo, Erik G" <erik.g.carrillo@intel.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	"Rao, Nikhil" <nikhil.rao@intel.com>,
	"Gujjar, Abhinandan S" <abhinandan.gujjar@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Cc: "Narayana Prasad Raju Athreya" <pathreya@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Lukas Bartosik" <lbartosik@marvell.com>,
	"Pavan Nikhilesh Bhagavatula" <pbhagavatula@marvell.com>,
	"Hemant Agrawal" <hemant.agrawal@nxp.com>,
	"Nipun Gupta" <nipun.gupta@nxp.com>,
	"Van Haaren, Harry" <harry.van.haaren@intel.com>,
	"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>,
	"Ma, Liang J" <liang.j.ma@intel.com>
Subject: Re: [dpdk-dev] [PATCH 32/39] eventdev: add routine to launch eventmode workers
Date: Thu, 27 Jun 2019 05:50:19 +0000	[thread overview]
Message-ID: <MN2PR18MB2877C219D2B206CD3F2B6DB8DFFD0@MN2PR18MB2877.namprd18.prod.outlook.com> (raw)
In-Reply-To: <BE54F058557D9A4FAC1D84E2FC6D875723507D23@fmsmsx115.amr.corp.intel.com>

Hi Erik,

Please see inline.

Thanks,
Anoob

> -----Original Message-----
> From: Carrillo, Erik G <erik.g.carrillo@intel.com>
> Sent: Monday, June 10, 2019 8:16 PM
> To: Anoob Joseph <anoobj@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Rao, Nikhil <nikhil.rao@intel.com>; Gujjar,
> Abhinandan S <abhinandan.gujjar@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: Narayana Prasad Raju Athreya <pathreya@marvell.com>; dev@dpdk.org;
> Lukas Bartosik <lbartosik@marvell.com>; Pavan Nikhilesh Bhagavatula
> <pbhagavatula@marvell.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Van
> Haaren, Harry <harry.van.haaren@intel.com>; Mattias Rönnblom
> <mattias.ronnblom@ericsson.com>; Ma, Liang J <liang.j.ma@intel.com>
> Subject: RE: [PATCH 32/39] eventdev: add routine to launch eventmode
> workers
> 
> Hi Anoob,
> 
> One other observation in-line:
> 
> > -----Original Message-----
> > From: Anoob Joseph <anoobj@marvell.com>
> > Sent: Monday, June 3, 2019 12:33 PM
> > To: Jerin Jacob <jerinj@marvell.com>; Rao, Nikhil
> > <nikhil.rao@intel.com>; Carrillo, Erik G <erik.g.carrillo@intel.com>;
> > Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; Richardson, Bruce
> > <bruce.richardson@intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>
> > Cc: Anoob Joseph <anoobj@marvell.com>; Narayana Prasad
> > <pathreya@marvell.com>; dev@dpdk.org; Lukasz Bartosik
> > <lbartosik@marvell.com>; Pavan Nikhilesh <pbhagavatula@marvell.com>;
> > Hemant Agrawal <hemant.agrawal@nxp.com>; Nipun Gupta
> > <nipun.gupta@nxp.com>; Van Haaren, Harry
> <harry.van.haaren@intel.com>;
> > Mattias Rönnblom <mattias.ronnblom@ericsson.com>; Ma, Liang J
> > <liang.j.ma@intel.com>
> > Subject: [PATCH 32/39] eventdev: add routine to launch eventmode
> > workers
> >
> > With eventmode, workers could be drafted differently according to the
> > capabilities of the underlying event device. The added function would
> > receive an array of such workers and probes the eventmode properties
> > to choose the worker.
> >
> > Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> > Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com>
> > ---
> 
> <...Snipped...>
> 
> > +
> > +void __rte_experimental
> > +rte_eventmode_helper_launch_worker(struct
> > rte_eventmode_helper_conf *mode_conf,
> > +		struct rte_eventmode_helper_app_worker_params
> > *app_wrkr,
> > +		uint8_t nb_wrkr_param)
> > +{
> > +	struct rte_eventmode_helper_app_worker_params *match_wrkr;
> > +	uint32_t lcore_id;
> > +	struct eventmode_conf *em_conf;
> > +
> > +	if (mode_conf == NULL) {
> > +		RTE_EM_HLPR_LOG_ERR("Invalid conf");
> > +		return;
> > +	}
> > +
> > +	if (mode_conf->mode_params == NULL) {
> > +		RTE_EM_HLPR_LOG_ERR("Invalid mode params");
> > +		return;
> > +	}
> > +
> > +	/* Get eventmode conf */
> > +	em_conf = (struct eventmode_conf *)(mode_conf->mode_params);
> > +
> > +	/* Get core ID */
> > +	lcore_id = rte_lcore_id();
> > +
> > +	/* TODO check capability for rx core */
> > +
> > +	/* Check if this is rx core */
> > +	if (em_conf->eth_core_mask & (1 << lcore_id)) {
> 
> In the above, eth_core_mask is a uint32_t, but RTE_MAX_LCORE=128 in the
> common config.

[Anoob] Will fix this in v2. Will use rte_bitmask APIs instead.
 
> 
> > +		rte_eventmode_helper_start_worker_eth_core(em_conf,
> > lcore_id);
> > +		return;
> > +	}
> > +
> > +	if (app_wrkr == NULL || nb_wrkr_param == 0) {
> > +		RTE_EM_HLPR_LOG_ERR("Invalid args");
> > +		return;
> > +	}
> > +
> > +	/*
> > +	 * This is a regular worker thread. The application would be
> > +	 * registering multiple workers with various capabilities. The
> > +	 * worker to be run will be selected by the capabilities of the
> > +	 * event device configured.
> > +	 */
> > +
> > +	/* Get the first matching worker for the event device */
> > +	match_wrkr = rte_eventmode_helper_find_worker(lcore_id,
> > +			em_conf,
> > +			app_wrkr,
> > +			nb_wrkr_param);
> > +
> > +	if (match_wrkr == NULL) {
> > +		RTE_EM_HLPR_LOG_ERR(
> > +			"No matching worker registered for lcore %d",
> > lcore_id);
> > +		goto clean_and_exit;
> > +	}
> > +
> > +	/* Verify sanity of the matched worker */
> > +	if (rte_eventmode_helper_verify_match_worker(match_wrkr) != 1)
> > {
> > +		RTE_EM_HLPR_LOG_ERR("Error in validating the matched
> > worker");
> > +		goto clean_and_exit;
> > +	}
> > +
> > +	/* Launch the worker thread */
> > +	match_wrkr->worker_thread(mode_conf);
> > +
> > +clean_and_exit:
> > +
> > +	/* Flag eth_cores to stop, if started */
> > +	rte_eventmode_helper_stop_worker_eth_core();
> > +}
> 
> <...Snipped...>
> 
> Regards,
> Erik

  reply	other threads:[~2019-06-27  5:50 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 17:32 [dpdk-dev] [PATCH 00/39] adding eventmode helper library Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 01/39] examples/l2fwd-event: create copy of l2fwd Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 02/39] examples/l2fwd-event: move macros to common header Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 03/39] examples/l2fwd-event: move structures " Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 04/39] examples/l2fwd-event: move global vars " Anoob Joseph
2019-06-07 10:02   ` Jerin Jacob Kollanukkaran
2019-06-07 10:45     ` Anoob Joseph
2019-06-07 12:47       ` Jerin Jacob Kollanukkaran
2019-06-03 17:32 ` [dpdk-dev] [PATCH 05/39] examples/l2fwd-event: move dataplane code to new file Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 06/39] examples/l2fwd-event: remove unused header includes Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 07/39] examples/l2fwd-event: move drain buffers to new function Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 08/39] examples/l2fwd-event: optimize check for master core Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 09/39] examples/l2fwd-event: move periodic tasks to new func Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 10/39] examples/l2fwd-event: do timer updates only on master Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 11/39] examples/l2fwd-event: move pkt send code to a new func Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 12/39] examples/l2fwd-event: use fprintf in usage print Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 13/39] examples/l2fwd-event: improvements to the " Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 14/39] eventdev: add files for eventmode helper Anoob Joseph
2019-06-10 10:10   ` Jerin Jacob Kollanukkaran
2019-06-03 17:32 ` [dpdk-dev] [PATCH 15/39] eventdev: add routines for logging " Anoob Joseph
2019-06-10 10:12   ` Jerin Jacob Kollanukkaran
2019-06-17  9:09     ` Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 16/39] eventdev: add eventmode CL options framework Anoob Joseph
2019-06-10 10:19   ` Jerin Jacob Kollanukkaran
2019-06-17 10:14     ` Anoob Joseph
2019-06-11  8:58   ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2019-06-03 17:32 ` [dpdk-dev] [PATCH 17/39] eventdev: allow application to set ethernet portmask Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 18/39] eventdev: add framework for eventmode conf Anoob Joseph
2019-06-10 10:06   ` Jerin Jacob Kollanukkaran
2019-06-20  7:26     ` Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 19/39] eventdev: add common initialize routine for eventmode devs Anoob Joseph
2019-06-10 10:23   ` Jerin Jacob Kollanukkaran
2019-06-17 10:22     ` Anoob Joseph
2019-06-11  8:58   ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2019-06-03 17:32 ` [dpdk-dev] [PATCH 20/39] eventdev: add eventdevice init for eventmode Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 21/39] eventdev: add eventdev port-lcore link Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 22/39] eventdev: add option to specify schedule mode for app stage Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 23/39] eventdev: add placeholder for ethdev init Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 24/39] eventdev: add Rx adapter init in eventmode Anoob Joseph
2019-06-10 14:56   ` Carrillo, Erik G
2019-06-11  3:45     ` [dpdk-dev] [EXT] " Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 25/39] eventdev: add routine to validate conf Anoob Joseph
2019-06-10 10:25   ` Jerin Jacob Kollanukkaran
2019-06-17 10:23     ` Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 26/39] eventdev: add default conf for event devs field in conf Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 27/39] eventdev: add default conf for Rx adapter conf Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 28/39] eventdev: add default conf for event port-lcore link Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 29/39] eventdev: add routines to display the eventmode conf Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 30/39] eventdev: add routine to access eventmode link info Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 31/39] eventdev: add routine to access event queue for eth Tx Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 32/39] eventdev: add routine to launch eventmode workers Anoob Joseph
2019-06-10 14:31   ` Carrillo, Erik G
2019-06-17 10:34     ` [dpdk-dev] [EXT] " Anoob Joseph
2019-06-10 14:46   ` [dpdk-dev] " Carrillo, Erik G
2019-06-27  5:50     ` Anoob Joseph [this message]
2019-06-11  8:58   ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2019-06-03 17:32 ` [dpdk-dev] [PATCH 33/39] eventdev: add Tx adapter support Anoob Joseph
2019-06-11  8:58   ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2019-06-03 17:32 ` [dpdk-dev] [PATCH 34/39] eventdev: add support for internal ports Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 35/39] eventdev: display Tx adapter conf Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 36/39] examples/l2fwd-event: add eventmode for l2fwd Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 37/39] examples/l2fwd-event: add eventmode worker Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 38/39] " Anoob Joseph
2019-06-03 17:32 ` [dpdk-dev] [PATCH 39/39] " Anoob Joseph
2019-06-07  9:48 ` [dpdk-dev] [PATCH 00/39] adding eventmode helper library Jerin Jacob Kollanukkaran
2019-06-11 10:44   ` Mattias Rönnblom
2019-06-14  9:18     ` [dpdk-dev] [EXT] " Anoob Joseph
2019-06-17 13:23       ` Mattias Rönnblom
2019-06-20  3:44         ` Anoob Joseph
     [not found] <1559580584-5728-1-git-send-email-anoobj@marvell.com>
2019-06-03 16:49 ` [dpdk-dev] [PATCH 32/39] eventdev: add routine to launch eventmode workers Anoob Joseph

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=MN2PR18MB2877C219D2B206CD3F2B6DB8DFFD0@MN2PR18MB2877.namprd18.prod.outlook.com \
    --to=anoobj@marvell.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=erik.g.carrillo@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerinj@marvell.com \
    --cc=lbartosik@marvell.com \
    --cc=liang.j.ma@intel.com \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=nikhil.rao@intel.com \
    --cc=nipun.gupta@nxp.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=pathreya@marvell.com \
    --cc=pbhagavatula@marvell.com \
    /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).