[dpdk-dev] [PATCH 6/6] service cores: enable event/sw with service

Van Haaren, Harry harry.van.haaren at intel.com
Thu Jun 29 13:15:31 CEST 2017


> From: Jerin Jacob [mailto:jerin.jacob at caviumnetworks.com]
> Sent: Monday, June 26, 2017 2:47 PM
> To: Van Haaren, Harry <harry.van.haaren at intel.com>
> Cc: dev at dpdk.org; thomas at monjalon.net; Wiles, Keith <keith.wiles at intel.com>; Richardson,
> Bruce <bruce.richardson at intel.com>
> Subject: Re: [PATCH 6/6] service cores: enable event/sw with service
> 
> -----Original Message-----
> > Date: Fri, 23 Jun 2017 10:06:19 +0100
> > From: Harry van Haaren <harry.van.haaren at intel.com>
<snip>
> > +#include <rte_service_private.h>
> > +#include <rte_cycles.h>
> 
> If rte_service_private.h needs the rte_cycles.h then I think it can be
> included in rte_service_private.h.

Actually it was stale, a leftover from during development - removed.


> > +	/* register service with EAL */
> > +	struct rte_service_spec service;
> > +	memset(&service, 0, sizeof(struct rte_service_spec));
> > +	snprintf(service.name, sizeof(service.name), "%s_service", name);
> 
> Should we add socket_id as well in the service name?

The user can name the PMD instance with socket ID if they so wish. The name of the PMD instance must already be unique - so we won't gain anything by adding socket ID there either... I'm not seeing value?

The socket ID is available to the application by reading   struct service_spec.


> > +	service.socket_id = socket_id;
> > +	service.callback = sw_sched_service_func;
> > +	service.callback_userdata = (void *)dev;
> > +
> > +	int32_t ret = rte_service_register(&service);
> > +	printf("serivce register = %d, cb ud %p\n", ret, dev);
> 
> sw_pmd_log?

Removed - little value in seeing pointer values bar during development :)


> > +
> >  	return 0;
> 
> Should we also check rte_service_is_running() in sw pmd start function
> to verify application did everything to setup the service function on
> service lcore? or means for feedback?

Yes good idea - rte_service_is_running will return true if the service callback will be called by at least one service lcore - exactly what we need to check.

This check is implemented in v2, on the way soon. As noted in the first email, I'll kick off a mail about discussing how to best use service-cores, and how to enable applications benefit most from service cores (including not using them if they don't want to :)


More information about the dev mailing list