From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D55141DBF for ; Tue, 20 Mar 2018 15:11:20 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2018 07:11:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,335,1517904000"; d="scan'208";a="184435059" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 20 Mar 2018 07:11:19 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 20 Mar 2018 07:11:19 -0700 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.102]) by fmsmsx115.amr.corp.intel.com ([169.254.4.26]) with mapi id 14.03.0319.002; Tue, 20 Mar 2018 07:11:18 -0700 From: "Eads, Gage" To: Jerin Jacob CC: "dev@dpdk.org" , "Van Haaren, Harry" , "hemant.agrawal@nxp.com" , "Richardson, Bruce" , "santosh.shukla@caviumnetworks.com" , "nipun.gupta@nxp.com" Thread-Topic: [PATCH v3 1/2] eventdev: add device stop flush callback Thread-Index: AQHTwB9V5KUThSmxIk2eHkfECTjmRqPZKhKA Date: Tue, 20 Mar 2018 14:11:18 +0000 Message-ID: <9184057F7FC11744A2107296B6B8EB1E3FA81190@FMSMSX108.amr.corp.intel.com> References: <1520550631-13403-1-git-send-email-gage.eads@intel.com> <1521087130-20244-1-git-send-email-gage.eads@intel.com> <20180320074404.GA2022@jerin> In-Reply-To: <20180320074404.GA2022@jerin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmQ2N2IxZDktZTNmNi00ZTY5LWE4NmItOWVkYmE5NWQ1MTI2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkY1aXdTbjdyaVZPOEVJNllua0wwM0pcLzc3S3JJVThYVlNjcHBWdzN5citFPSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.1.200.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 1/2] eventdev: add device stop flush callback 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: Tue, 20 Mar 2018 14:11:21 -0000 > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Tuesday, March 20, 2018 2:44 AM > To: Eads, Gage > Cc: dev@dpdk.org; Van Haaren, Harry ; > hemant.agrawal@nxp.com; Richardson, Bruce ; > santosh.shukla@caviumnetworks.com; nipun.gupta@nxp.com > Subject: Re: [PATCH v3 1/2] eventdev: add device stop flush callback >=20 > -----Original Message----- > > Date: Wed, 14 Mar 2018 23:12:09 -0500 > > From: Gage Eads > > To: dev@dpdk.org > > CC: jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com, > > hemant.agrawal@nxp.com, bruce.richardson@intel.com, > > santosh.shukla@caviumnetworks.com, nipun.gupta@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 > > --- > > 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 =3D { > > +static struct rte_eventdev_ops dpaa_eventdev_ops =3D { > > .dev_infos_get =3D dpaa_event_dev_info_get, > > .dev_configure =3D dpaa_event_dev_configure, > > .dev_start =3D dpaa_event_dev_start, > > @@ -591,6 +591,7 @@ static const struct rte_eventdev_ops > dpaa_eventdev_ops =3D { > > .eth_rx_adapter_queue_del =3D dpaa_event_eth_rx_adapter_queue_del, > > .eth_rx_adapter_start =3D dpaa_event_eth_rx_adapter_start, > > .eth_rx_adapter_stop =3D dpaa_event_eth_rx_adapter_stop, > > + .dev_stop_flush =3D NULL, >=20 > Do we need explicit NULL assignment here. It will be NULL by default. >=20 Good point. I will fix and resubmit a v4.