From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0057.outbound.protection.outlook.com [104.47.36.57]) by dpdk.org (Postfix) with ESMTP id D8BAA27D for ; Tue, 20 Mar 2018 08:44:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+7fBgt/g/MnS1dC48ilto+9zGb6pY/zxHaZ50D3O9bE=; b=NxS9h1L8N/uVXr/+5wdod5HPnezeBWeqHKH9q4lyjCKWQ3L8iQzLqo6JzPNrZZ+KNNnpts7jcT1/UdGgSN43JCfKhFlQhYpeHzRsFFlcx3y+HAx38MX0OXM+lwledd0uRwAoeHb0RhUDQ+GF7dIIgM6mAH1f9taKctqZF+Q3flY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by SN2PR07MB2528.namprd07.prod.outlook.com (2603:10b6:804:7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Tue, 20 Mar 2018 07:44:19 +0000 Date: Tue, 20 Mar 2018 13:14:05 +0530 From: Jerin Jacob To: Gage Eads Cc: dev@dpdk.org, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, bruce.richardson@intel.com, santosh.shukla@caviumnetworks.com, nipun.gupta@nxp.com Message-ID: <20180320074404.GA2022@jerin> References: <1520550631-13403-1-git-send-email-gage.eads@intel.com> <1521087130-20244-1-git-send-email-gage.eads@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521087130-20244-1-git-send-email-gage.eads@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR0101CA0052.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::14) To SN2PR07MB2528.namprd07.prod.outlook.com (2603:10b6:804:7::6) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4fdd8d3e-d9d4-4bfa-b92b-08d58e36657f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:SN2PR07MB2528; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 3:uY0vkcoXzkVW32+EoZshk9G2dAHsYZq8S0XHY+c2CIfX57mNoyFvb7xdGVznbXrcrlzoTMn9dI6fu2kUF7JRF0gAq+jGPRrd3zWoaYrVcfNtNu+eOYKfT2A3J4ydBh9E/Yr/ibpfH1LGmXQ7cDmE7rqB22/AKvPkWBDxGEvxJXSBUJwXIeT/eqSGydP/JvgdP5sthWOKEK3oYDfCssTz2FHrKORRKiIue/rXssdBzAKk+hv5NdYxQDmyCUVoduCn; 25:A3hW9VctrpURwS7EQ6G4ImkR5L0V45ifDA1EoIKlBnFWFltRsIVM+xBVX2ycARE0fb1t8SutnaGPsuNWfsU5/zcR/N0GPo97Ejhzg++Px8g20qxllKlX6Q5FAHAaNJGB79lJJetQUwMg/MR0pYLhNZyR/x63Mh8OvvBFSrTQO1dAbxnlqw8gF5ZPolezEkM0T8nVtUX/eyF6XIyJVzHxklnEho06nyfBPopMB31MPHolvIUc5XdhkY2M5rdGHwYr1GJ5G7rFe4MxijhklGEWqpri2n6F6fGQjeFzG7IzVJtT7GpEfaA2KDZ0xZqvYpGWQ0oubZTSVQTQkU+YxeUJ/A==; 31:9gYA2SxeGs0WDE2VbV8csJMH5ApZoSuNyiMUp5T9VmcENIR/nEBdhzmhy7fT4aCjmT8AFj+dihmLuYKqpjGdqHAqLVTA6O3Yh85kKGT8IEuoI9sL2yU6WNU7s9711WtD93eEppiA10qcn+SAUZM2i1fjxPGpYY2xnIhBjTEGq8dxx4dB9PXZHYvnD3Va1jpPj4V7AZ4OXPyQ6nEAxNizQKzP1LkepEJeQ21u/7OoE0Y= X-MS-TrafficTypeDiagnostic: SN2PR07MB2528: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 20:phu3NVg2h4XShkWCb5IgwSMNZq2i+O40hHK6U/JBqChWO33HzdZmjm2/KYCpiVFKa39V/742xhlDxd8hC4JoUN+pLbFX2jgs45Ga/hoIz7dzTrZ6eXrpzyYuWiNkNWpDx9Jjk9sOz+0fBdRS9KWn2sPH5uwlAWNYSQM5WoMWTj7d7xX0VmcWVSy3OvKdJWvjoy4IxJRkAii3zG9acqEcEl39zQoeTrGHzvxT4kttDQeffIYEO1fkZAx/H27TV5yjKOHg3KCqVWzfJrIjeDNXrlKZMpolJImq/mQOq+6b9vG4cy7o/XEc7cc1Xifew9cT8qTPEnRVXFwdyLY+N77M4idPRROPkOdRIojwXLjcTAVO2B1uEcUOG2buwdG8rMt33qtzZYzSd0ccZFWU3AQ3v2MckJIaPnH7QiwR8ffHgnnar8VPElWuzvjBb1Wy9DFyPxfArzdi/XSWOnJPiSK+zYhPmOk/FWZHYxVAhnzNRadAuu5Jicslnr3GGkqW8DUPccaKbpd269LMIlXUzspyvuTc3mBkSLQ7flaYtJ8+1Kjldnh5DHlhgJy2Yz5VQFclZ82PaqCg5HQAYnC9/zDiI8TGnyococksJYWfnD080F8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(10201501046)(3231221)(944501308)(52105095)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:SN2PR07MB2528; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2528; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 4:3dZkVmYiXuWWt1KPmdzHidlj0h6T2Bqyduf+jGzPKuxzv1Z4cEbJzWqNuFXFGHbPF9DvIekfh445qSGgrLMHI1oxb12v5W1L/9h6tunOVGLmxXKnH2odhK1zeL3z+2nIB0yRk/3k8wc5YCB4nnCrHx5t1hkIRsUjybRXEp/z7oD8Jfyvpy3afLeKZiBBVQtwfSyHVC4c4HCTkquBPJtp80ONtpYyEgUoxzRYc6J6oD2Lf5RcjiuBE8WGHHE8pjp62sT/5H3J8xONNQsOkaTwHyq/IUGLtstn3CXxy9YXEU3nBpCmKr6bArN3YUzm/MDXy1/WjRHGB7dphwz1tpcrh2SfPoW+UCqY/TpvAI1/zP8= X-Forefront-PRVS: 061725F016 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(396003)(346002)(376002)(39860400002)(13464003)(57704003)(199004)(189003)(6916009)(81156014)(81166006)(5009440100003)(76176011)(2906002)(316002)(53936002)(55016002)(50466002)(33656002)(16586007)(6306002)(8676002)(9686003)(3846002)(8656006)(66066001)(6116002)(106356001)(33896004)(8936002)(6666003)(59450400001)(47776003)(1076002)(6246003)(23726003)(53376002)(58126008)(52116002)(42882007)(26005)(16526019)(186003)(386003)(229853002)(72206003)(5660300001)(305945005)(68736007)(7736002)(478600001)(33716001)(966005)(25786009)(97736004)(4326008)(2950100002)(105586002)(6496006)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2528; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2528; 23:/j3fmQqlF6MjdYZFAuoG447lv72pHNuj5MZtap5q1?= =?us-ascii?Q?F4CsyZBtnxHmt5+U3B3sNbAl6XJLxvRabt3zlHsjsU+9aC1b4/dw7Sf3xOqr?= =?us-ascii?Q?Voap0cbRFkotns9xkPNJZbvp42yIwvYfiwbvUjdHm6+clMe7rFjggl3yPKSL?= =?us-ascii?Q?ZKZeu90k0ImBaB6N0vBLiqMIcaSzJnWzE1v03okncCK0a5g+pLAMUzUlTQrR?= =?us-ascii?Q?nazxDIW3SKlyZAxYD+DnTZ1XrsVjWxGgTtnIAXTqqXd5UexCeuyYLEAV3GEE?= =?us-ascii?Q?VQvC0erei0pSawuw5Jxnqg3UN016v/RHrW+z0nuTIfVhzQjz5xI1TjfdgaIs?= =?us-ascii?Q?pEI7f5yt8t1OQI5WwfRcmbyPj0+I9LzGySTjM7akugDbI96kcClto0t8XWw2?= =?us-ascii?Q?gCzULPJmtWb8SO8y3VeRYEsJxfRAFQp37Rvdv3CA09rhSpNs40xZWAb8ZAHR?= =?us-ascii?Q?wPkt0u25qihE4hc9hC99xpri2+5ctDQ83i5d9B05bivjFaiqbKoB9eay/Yin?= =?us-ascii?Q?xbVOckv2UpN1BaFqqjjVJE9YHF8EldgO0Xrzr/j52pgk8fA4pVGvxdu3VOuq?= =?us-ascii?Q?cGzvvFdNkRtnafIfhQgzkYZkP+qCEXMcbyPUp/xr1RoYaAS17385avAe2j0C?= =?us-ascii?Q?qKQVwmAJ+bdXr9Q1ResewrfqkqVE4oX+8XNHQxKhwUx7r9qfOUzS1su7S8Z/?= =?us-ascii?Q?7T2ky/FaoWXzn9WssS9FUcqJpXSMUoRkMj9dAM+032gqESCCYit6XmbDe83Y?= =?us-ascii?Q?YLrTYPGDHvl/M9KShp775Gf2vxoNbvSjmEx1DaJwI042tCCN+bSYcih2ZX7A?= =?us-ascii?Q?U8XVg+/+lctSKBpRn/Kse///cuXypYkl9ZoGSwyGl9ElzLqNdpkx7iFD5AB2?= =?us-ascii?Q?bhjgGu1yRRaSIIPz17SFj5BEM5SUGv+rfV48urxFiUr8dzZuEWfEtgNJy4wC?= =?us-ascii?Q?c85MxdNjFdzUvBElNwdvlWF48p1Gs+Pb7nCF0/7fPA2UCYDxWgBpDjVuyufg?= =?us-ascii?Q?07Wo/ijT3Go/O1DtQEASU9zjbUgd+YBtu7YmT6Kew7cCNaDAPJBfBAdRQNbh?= =?us-ascii?Q?U+JPsKK7wqXBDZcQHg2qFj69lY7V+fQoI04Vg1oYNpFb+vHCHo3GbnRThBQA?= =?us-ascii?Q?Y8UhWGgB30iZG/J/M+uKtJnPaF+ZhtUuqY1F/90oDALYPfVDVJ9MQD2y50c7?= =?us-ascii?Q?CPCunraKRacXaqOfnRtBF85opy2D+iDYEClVatRyoVztdYNZ7wDksUCs5SFZ?= =?us-ascii?Q?qnASTQrplWvoqMu76k0oiQgEeyvr2Ev27Y3PqdLsxbUPLvmag4HR3VfuvruP?= =?us-ascii?Q?F+Dzx5MjTxAqRlJ037QwGN/Lus2Y5zk2tH9kfV5Pin7V5EHMW/m4XyGq3LBE?= =?us-ascii?Q?+FDkspLzCob2bdLjcnm3pobKzpEgok9MmX57dec2Br/paRv?= X-Microsoft-Antispam-Message-Info: SsT0hsMamCisQoX9SzHunDj6RZTXTx8u1eXnEAGeJkwxIeo8MK+p4CcWcKjnb3gUdq4iBeKyjB78RzMdxTEAwkmiYpfS040l4Jx9UK9SGcaXXMdqvEltviCEffqzIim979enyn3/1FVjWosms8KEaJ5J5KvB5lL6r+XOIBCViOalvWzP4FbDbOHISaA8O0Dm X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 6:cmndzBbDDo4V1b6IWfZzI9rKFziuZHJj68VVLLfi+kGf2iw1vlAOSDVcvpmhWHNdhk/AsP4j5k9Jo6w9x2MUWDQmQharlyTVcpE3XQI2rXMs7MZV42o+XTignVlHw7frQ+j3kzf5vLHdy7Scs7Astgj+OFoT2E3Loi8COQSvxzEyrUO8iI4XRfhe7EpCz3L8iUJ3KI9+Af4/I3yLXlSTyWtTzDYxImzWMliwrfaUCQrTtE4l5EsfVbbJRv/l9GIEm4IP+XzXt/k/u4BpfRW5znTdrurm5vtYzvwFo9IibEHd2geHuw3euZ8Ri68ZGw+7n9jZEDGrqaVsaXaFf2MjAZ135bLFBwE32wbEx8Y4xhA=; 5:ph2JR+OiMN83aI0iVXZGRkyERse6XV9TFHOPXPXAT1QyAlIv3/kta57m0zsJls+6+krDlNyuspzphkcpOFniLn0A6AQa9wiGj2GQpAF3OclXhCp3tIQbgMu/fhFloZfCjcx5kQw7Uex9ZWw4TzA9rRJ3A+sXkQwetsFWdTaZsCw=; 24:UXd14clQErt0MCHM1aY/pyOVOvHW27ObHDnte5IPvAvmwpYkSBjQ/sj4pyFTLDpqtnOvvMR9klCt0SupXGe8iP9BQHLu7QfNyjjDTN0/aKc=; 7:nn7dDQMafvv3yfPDqcO33M5ZJrvqws2DQFULDuHjNqBR6WtR4Iw1WmNednPUAknqDk8mh+eblvdKlQvLYxqNKTYWW1F+GXepXc0sWURT7dz6U7l74OCPrJ2gU+7Drli+A+rlVjjPn1ngtYPXjoMBjZTvM0UJiwD+oUkdiRcNmmnwbJ+E3k/TjO5HcMka4DmabTMUXs/bZ63K18hsFRjFuUyI22pbtkHOvjdRJgDfxAnPTOY4x4/mzt2+ZUJ9skyG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2018 07:44:19.0348 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4fdd8d3e-d9d4-4bfa-b92b-08d58e36657f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2528 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 07:44:25 -0000 -----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 = { > +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. > }; > > static int > diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c > index c3e6fbf..363837a 100644 > --- a/drivers/event/dpaa2/dpaa2_eventdev.c > +++ b/drivers/event/dpaa2/dpaa2_eventdev.c > @@ -693,7 +693,7 @@ dpaa2_eventdev_eth_stop(const struct rte_eventdev *dev, > return 0; > } > > -static const struct rte_eventdev_ops dpaa2_eventdev_ops = { > +static struct rte_eventdev_ops dpaa2_eventdev_ops = { > .dev_infos_get = dpaa2_eventdev_info_get, > .dev_configure = dpaa2_eventdev_configure, > .dev_start = dpaa2_eventdev_start, > @@ -714,6 +714,7 @@ static const struct rte_eventdev_ops dpaa2_eventdev_ops = { > .eth_rx_adapter_queue_del = dpaa2_eventdev_eth_queue_del, > .eth_rx_adapter_start = dpaa2_eventdev_eth_start, > .eth_rx_adapter_stop = dpaa2_eventdev_eth_stop, > + .dev_stop_flush = NULL, Same as above comment. > }; > > static int > diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c > index a108607..713983b 100644 > --- a/drivers/event/octeontx/ssovf_evdev.c > +++ b/drivers/event/octeontx/ssovf_evdev.c > @@ -591,7 +591,7 @@ ssovf_selftest(const char *key __rte_unused, const char *value, > } > > /* Initialize and register event driver with DPDK Application */ > -static const struct rte_eventdev_ops ssovf_ops = { > +static struct rte_eventdev_ops ssovf_ops = { > .dev_infos_get = ssovf_info_get, > .dev_configure = ssovf_configure, > .queue_def_conf = ssovf_queue_def_conf, > @@ -615,7 +615,9 @@ static const struct rte_eventdev_ops ssovf_ops = { > .dump = ssovf_dump, > .dev_start = ssovf_start, > .dev_stop = ssovf_stop, > - .dev_close = ssovf_close > + .dev_close = ssovf_close, > + > + .dev_stop_flush = NULL Same as above comment. > }; > > static int > diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c > index 7708369..477e102 100644 > --- a/drivers/event/opdl/opdl_evdev.c > +++ b/drivers/event/opdl/opdl_evdev.c > @@ -607,7 +607,7 @@ set_do_test(const char *key __rte_unused, const char *value, void *opaque) > static int > opdl_probe(struct rte_vdev_device *vdev) > { > - static const struct rte_eventdev_ops evdev_opdl_ops = { > + static struct rte_eventdev_ops evdev_opdl_ops = { > .dev_configure = opdl_dev_configure, > .dev_infos_get = opdl_info_get, > .dev_close = opdl_close, > @@ -629,6 +629,8 @@ opdl_probe(struct rte_vdev_device *vdev) > .xstats_get_names = opdl_xstats_get_names, > .xstats_get_by_name = opdl_xstats_get_by_name, > .xstats_reset = opdl_xstats_reset, > + > + .dev_stop_flush = NULL, Same as above comment. > }; > > static const char *const args[] = { > diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c > index 7f46756..c627f01 100644 > --- a/drivers/event/skeleton/skeleton_eventdev.c > +++ b/drivers/event/skeleton/skeleton_eventdev.c > @@ -319,7 +319,7 @@ skeleton_eventdev_dump(struct rte_eventdev *dev, FILE *f) > > > /* Initialize and register event driver with DPDK Application */ > -static const struct rte_eventdev_ops skeleton_eventdev_ops = { > +static struct rte_eventdev_ops skeleton_eventdev_ops = { > .dev_infos_get = skeleton_eventdev_info_get, > .dev_configure = skeleton_eventdev_configure, > .dev_start = skeleton_eventdev_start, > @@ -334,7 +334,8 @@ static const struct rte_eventdev_ops skeleton_eventdev_ops = { > .port_link = skeleton_eventdev_port_link, > .port_unlink = skeleton_eventdev_port_unlink, > .timeout_ticks = skeleton_eventdev_timeout_ticks, > - .dump = skeleton_eventdev_dump > + .dump = skeleton_eventdev_dump, > + .dev_stop_flush = NULL Same as above comment. > }; > > static int > diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c > index 6672fd8..bda2e21 100644 > --- a/drivers/event/sw/sw_evdev.c > +++ b/drivers/event/sw/sw_evdev.c > @@ -772,7 +772,7 @@ static int32_t sw_sched_service_func(void *args) > static int > sw_probe(struct rte_vdev_device *vdev) > { > - static const struct rte_eventdev_ops evdev_sw_ops = { > + static struct rte_eventdev_ops evdev_sw_ops = { > .dev_configure = sw_dev_configure, > .dev_infos_get = sw_info_get, > .dev_close = sw_close, > @@ -797,6 +797,8 @@ sw_probe(struct rte_vdev_device *vdev) > .xstats_reset = sw_xstats_reset, > > .dev_selftest = test_sw_eventdev, > + > + .dev_stop_flush = NULL, Same as above comment. > }; > > static const char *const args[] = { > diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c > index 851a119..2de8d9a 100644 > --- a/lib/librte_eventdev/rte_eventdev.c > +++ b/lib/librte_eventdev/rte_eventdev.c > @@ -1123,6 +1123,23 @@ rte_event_dev_start(uint8_t dev_id) > return 0; > } > > +int > +rte_event_dev_stop_flush_callback_register(uint8_t dev_id, > + eventdev_stop_flush_t callback, void *userdata) > +{ > + struct rte_eventdev *dev; > + > + RTE_EDEV_LOG_DEBUG("Stop flush register dev_id=%" PRIu8, dev_id); > + > + RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > + dev = &rte_eventdevs[dev_id]; > + > + dev->dev_ops->dev_stop_flush = callback; > + dev->data->dev_stop_flush_arg = userdata; > + > + return 0; > +} Other than above minor comments, everything else looks good to me.