From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v3 5/7] service cores: enable event/sw with service Date: Tue, 4 Jul 2017 16:22:30 +0530 Message-ID: <20170704105229.GA12473@jerin> References: <1498735421-100164-1-git-send-email-harry.van.haaren@intel.com> <1499031314-7172-1-git-send-email-harry.van.haaren@intel.com> <1499031314-7172-6-git-send-email-harry.van.haaren@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, thomas@monjalon.net, keith.wiles@intel.com, bruce.richardson@intel.com To: Harry van Haaren Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0074.outbound.protection.outlook.com [104.47.37.74]) by dpdk.org (Postfix) with ESMTP id E7BDD271 for ; Tue, 4 Jul 2017 12:52:48 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1499031314-7172-6-git-send-email-harry.van.haaren@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Sun, 2 Jul 2017 22:35:12 +0100 > From: Harry van Haaren > To: dev@dpdk.org > CC: jerin.jacob@caviumnetworks.com, thomas@monjalon.net, > keith.wiles@intel.com, bruce.richardson@intel.com, Harry van Haaren > > 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 > > --- > > v2: > - Remove #include (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 > #include > #include > +#include > > #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