From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 3B5352BB4 for ; Mon, 3 Jul 2017 14:28:35 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2017 05:28:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,303,1496127600"; d="scan'208";a="988173290" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga003.jf.intel.com with ESMTP; 03 Jul 2017 05:28:33 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.211]) by IRSMSX154.ger.corp.intel.com ([169.254.12.76]) with mapi id 14.03.0319.002; Mon, 3 Jul 2017 13:28:32 +0100 From: "Van Haaren, Harry" To: "jerin.jacob@caviumnetworks.com" CC: "olivier.matz@6wind.com" , "Richardson, Bruce" , "dev@dpdk.org" , "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH v2 5/5] event/sw: change worker rings to standard event rings Thread-Index: AQHS8bLMfl/tcP6vRUiWN8KqdacxIKJCChRA Date: Mon, 3 Jul 2017 12:28:32 +0000 Message-ID: References: <20170607133620.275801-1-bruce.richardson@intel.com> <20170630150621.156365-1-bruce.richardson@intel.com> <20170630150621.156365-6-bruce.richardson@intel.com> In-Reply-To: <20170630150621.156365-6-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDY2Y2YzNzMtMDkwZi00NThkLWIxZjctOWYyMTVhYTczZjYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Iit4RHptS2NCbXpadkNuZUUwNDdGQVFmWGpOSjczUU1qbHFHMjFId2toS009In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 5/5] event/sw: change worker rings to standard event rings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 12:28:36 -0000 > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > Sent: Friday, June 30, 2017 4:06 PM > To: dev@dpdk.org > Cc: olivier.matz@6wind.com; jerin.jacob@caviumnetworks.com; Richardson, B= ruce > > Subject: [dpdk-dev] [PATCH v2 5/5] event/sw: change worker rings to stand= ard event rings >=20 > Now that we have a standard event ring implementation for passing events > core-to-core, use that in place of the custom event rings in the software > eventdev. >=20 > Signed-off-by: Bruce Richardson Agree with 99% of this patch, but due to the implementation (with memzone l= ookup), we need to change one part of the sw_port_setup() function. The change is required to allow port_setup() to be called multiple times on= the same port, which is required to re-configure a port that has already been config= ured once. I can send a separate fix, or I could re-spin Bruce's 5 patches, and includ= e the fix. Given this is a small, non-datapath modification to the SW PMD, my preferen= ce is to ack this patch once I've posted a separate patch fix for the SW PMD. @Jerin, any preference? > --- > drivers/event/sw/sw_evdev.c | 38 +++++++++++++++++++----------= ------ > drivers/event/sw/sw_evdev.h | 4 ++-- > drivers/event/sw/sw_evdev_scheduler.c | 19 +++++++++--------- > drivers/event/sw/sw_evdev_worker.c | 28 +++++++++++++++++++++----- > drivers/event/sw/sw_evdev_xstats.c | 15 +++++++------- > 5 files changed, 64 insertions(+), 40 deletions(-) >=20 > diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c > index fe2a61e2f..31880aa5c 100644 > --- a/drivers/event/sw/sw_evdev.c > +++ b/drivers/event/sw/sw_evdev.c > @@ -38,10 +38,10 @@ > #include > #include > #include > +#include >=20 > #include "sw_evdev.h" > #include "iq_ring.h" > -#include "event_ring.h" >=20 > #define EVENTDEV_NAME_SW_PMD event_sw > #define NUMA_NODE_ARG "numa_node" > @@ -140,7 +140,7 @@ sw_port_setup(struct rte_eventdev *dev, uint8_t port_= id, > { > struct sw_evdev *sw =3D sw_pmd_priv(dev); > struct sw_port *p =3D &sw->ports[port_id]; > - char buf[QE_RING_NAMESIZE]; > + char buf[RTE_RING_NAMESIZE]; > unsigned int i; >=20 > struct rte_event_dev_info info; > @@ -161,10 +161,11 @@ sw_port_setup(struct rte_eventdev *dev, uint8_t por= t_id, > p->id =3D port_id; > p->sw =3D sw; >=20 > - snprintf(buf, sizeof(buf), "sw%d_%s", dev->data->dev_id, > - "rx_worker_ring"); > - p->rx_worker_ring =3D qe_ring_create(buf, MAX_SW_PROD_Q_DEPTH, > - dev->data->socket_id); > + snprintf(buf, sizeof(buf), "sw%d_p%u_%s", dev->data->dev_id, > + port_id, "rx_worker_ring"); > + p->rx_worker_ring =3D rte_event_ring_create(buf, MAX_SW_PROD_Q_DEPTH, > + dev->data->socket_id, > + RING_F_SP_ENQ | RING_F_SC_DEQ | RING_F_EXACT_SZ);