> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Bruce Richardson > Sent: Friday, June 30, 2017 4:06 PM > To: dev@dpdk.org > Cc: olivier.m...@6wind.com; jerin.ja...@caviumnetworks.com; Richardson, Bruce > <bruce.richard...@intel.com> > Subject: [dpdk-dev] [PATCH v2 5/5] event/sw: change worker rings to standard > event rings > > 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. > > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com>
Agree with 99% of this patch, but due to the implementation (with memzone lookup), 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 configured once. I can send a separate fix, or I could re-spin Bruce's 5 patches, and include the fix. Given this is a small, non-datapath modification to the SW PMD, my preference 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(-) > > 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 <rte_kvargs.h> > #include <rte_ring.h> > #include <rte_errno.h> > +#include <rte_event_ring.h> > > #include "sw_evdev.h" > #include "iq_ring.h" > -#include "event_ring.h" > > #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 = sw_pmd_priv(dev); > struct sw_port *p = &sw->ports[port_id]; > - char buf[QE_RING_NAMESIZE]; > + char buf[RTE_RING_NAMESIZE]; > unsigned int i; > > struct rte_event_dev_info info; > @@ -161,10 +161,11 @@ sw_port_setup(struct rte_eventdev *dev, uint8_t port_id, > p->id = port_id; > p->sw = sw; > > - snprintf(buf, sizeof(buf), "sw%d_%s", dev->data->dev_id, > - "rx_worker_ring"); > - p->rx_worker_ring = 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 = 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);