[dpdk-dev] [PATCH v3 1/2] eventdev: add device stop flush callback
Eads, Gage
gage.eads at intel.com
Tue Mar 20 15:11:18 CET 2018
> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob at caviumnetworks.com]
> Sent: Tuesday, March 20, 2018 2:44 AM
> To: Eads, Gage <gage.eads at intel.com>
> Cc: dev at dpdk.org; Van Haaren, Harry <harry.van.haaren at intel.com>;
> hemant.agrawal at nxp.com; Richardson, Bruce <bruce.richardson at intel.com>;
> santosh.shukla at caviumnetworks.com; nipun.gupta at nxp.com
> Subject: Re: [PATCH v3 1/2] eventdev: add device stop flush callback
>
> -----Original Message-----
> > Date: Wed, 14 Mar 2018 23:12:09 -0500
> > From: Gage Eads <gage.eads at intel.com>
> > To: dev at dpdk.org
> > CC: jerin.jacob at caviumnetworks.com, harry.van.haaren at intel.com,
> > hemant.agrawal at nxp.com, bruce.richardson at intel.com,
> > santosh.shukla at caviumnetworks.com, nipun.gupta at nxp.com
> > Subject: [PATCH v3 1/2] eventdev: add device stop flush callback
> > X-Mailer: git-send-email 2.7.4
> >
> > When an event device is stopped, it drains all event queues. These
> > events may contain pointers, so to prevent memory leaks eventdev now
> > supports a user-provided flush callback that is called during the queue drain
> process.
> > This callback is stored in process memory, so the callback must be
> > registered by any process that may call rte_event_dev_stop().
> >
> > This commit also clarifies the behavior of rte_event_dev_stop().
> >
> > This follows this mailing list discussion:
> > http://dpdk.org/ml/archives/dev/2018-January/087484.html
> >
> > Signed-off-by: Gage Eads <gage.eads at intel.com>
> > ---
> > v2: allow a NULL callback pointer to unregister the callback
> > v3: move the callback pointer to struct rte_eventdev_ops and
> > the user argument to struct rte_eventdev_data.
> >
> > drivers/event/dpaa/dpaa_eventdev.c | 3 +-
> > drivers/event/dpaa2/dpaa2_eventdev.c | 3 +-
> > drivers/event/octeontx/ssovf_evdev.c | 6 ++-
> > drivers/event/opdl/opdl_evdev.c | 4 +-
> > drivers/event/skeleton/skeleton_eventdev.c | 5 ++-
> > drivers/event/sw/sw_evdev.c | 4 +-
> > lib/librte_eventdev/rte_eventdev.c | 17 +++++++++
> > lib/librte_eventdev/rte_eventdev.h | 55
> ++++++++++++++++++++++++++--
> > lib/librte_eventdev/rte_eventdev_pmd.h | 3 ++
> > lib/librte_eventdev/rte_eventdev_version.map | 6 +++
> > 10 files changed, 95 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/event/dpaa/dpaa_eventdev.c
> > b/drivers/event/dpaa/dpaa_eventdev.c
> > index 0006801..4bf1918 100644
> > --- a/drivers/event/dpaa/dpaa_eventdev.c
> > +++ b/drivers/event/dpaa/dpaa_eventdev.c
> > @@ -571,7 +571,7 @@ dpaa_event_eth_rx_adapter_stop(const struct
> rte_eventdev *dev,
> > return 0;
> > }
> >
> > -static const struct rte_eventdev_ops dpaa_eventdev_ops = {
> > +static struct rte_eventdev_ops dpaa_eventdev_ops = {
> > .dev_infos_get = dpaa_event_dev_info_get,
> > .dev_configure = dpaa_event_dev_configure,
> > .dev_start = dpaa_event_dev_start,
> > @@ -591,6 +591,7 @@ static const struct rte_eventdev_ops
> dpaa_eventdev_ops = {
> > .eth_rx_adapter_queue_del = dpaa_event_eth_rx_adapter_queue_del,
> > .eth_rx_adapter_start = dpaa_event_eth_rx_adapter_start,
> > .eth_rx_adapter_stop = dpaa_event_eth_rx_adapter_stop,
> > + .dev_stop_flush = NULL,
>
> Do we need explicit NULL assignment here. It will be NULL by default.
>
Good point. I will fix and resubmit a v4.
More information about the dev
mailing list