-----Original Message----- > Date: Sun, 2 Jul 2017 22:35:12 +0100 > From: Harry van Haaren <harry.van.haa...@intel.com> > To: dev@dpdk.org > CC: jerin.ja...@caviumnetworks.com, tho...@monjalon.net, > keith.wi...@intel.com, bruce.richard...@intel.com, Harry van Haaren > <harry.van.haa...@intel.com> > Subject: [PATCH v3 5/7] service cores: enable event/sw with service > X-Mailer: git-send-email 2.7.4 > > This commit shows how easy it is to enable a specific > DPDK component with a service callback, in order to get > CPU cycles for it. > > The beauty of this method is that the service is unaware > of how much CPU time it is getting - the application can > decide how to split and slice cores and map them to the > registered services. > > Signed-off-by: Harry van Haaren <harry.van.haa...@intel.com> > > --- > > v2: > - Remove #include <rte_cycles.h> (Jerin) > - Remove development prints (Jerin) > - Track service name in PMD > - Print warning if service does not have an lcore mapped (Jerin) > --- > drivers/event/sw/sw_evdev.c | 32 ++++++++++++++++++++++++++++++++ > drivers/event/sw/sw_evdev.h | 3 +++ > 2 files changed, 35 insertions(+) > > diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c > index fe2a61e..baab376 100644 > --- a/drivers/event/sw/sw_evdev.c > +++ b/drivers/event/sw/sw_evdev.c > @@ -38,6 +38,7 @@ > #include <rte_kvargs.h> > #include <rte_ring.h> > #include <rte_errno.h> > +#include <rte_service_private.h> > > #include "sw_evdev.h" > #include "iq_ring.h" > @@ -597,6 +598,13 @@ sw_start(struct rte_eventdev *dev) > { > unsigned int i, j; > struct sw_evdev *sw = sw_pmd_priv(dev); > + > + /* check a service core is mapped to this service */ > + struct rte_service_spec *s = rte_service_get_by_name(sw->service_name); > + if (!rte_service_is_running(s)) > + SW_LOG_ERR("Warning: No Service core enabled on service %s\n", > + s->name);
For now, we can print just Warning. Once we remove schedule api from eventdev then we can make it as error. Right? Acked-by: Jerin Jacob <jerin.ja...@caviumnetworks.com>