From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0116.outbound.protection.outlook.com [104.47.0.116]) by dpdk.org (Postfix) with ESMTP id 559B84C97 for ; Mon, 30 Jul 2018 11:17:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5dusTLUfV1Ga0nUnM5gGqKbWGOge4DDa7S28Z089TvM=; b=LiAZK/4muKVjq4Jmbxo5aYMuFkzYAahRHPSKEUzlDOizxQZn+qzGHgvRASK01aYDO6V50HHxbj8l6Z8CkG0FgB+jjgu7OqgUIaD5+Zw1Pzdm2yisrTSnsxU1uVxBt9utuauGnK/bwzlGByIBzL6PWpqZTgEV1nZ+s6BhaRK6hbQ= Received: from DB7PR07MB4556.eurprd07.prod.outlook.com (52.135.141.14) by DB7PR07MB4458.eurprd07.prod.outlook.com (52.135.140.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.8; Mon, 30 Jul 2018 09:17:47 +0000 Received: from DB7PR07MB4556.eurprd07.prod.outlook.com ([fe80::10fa:ae08:1e34:67ac]) by DB7PR07MB4556.eurprd07.prod.outlook.com ([fe80::10fa:ae08:1e34:67ac%4]) with mapi id 15.20.1017.010; Mon, 30 Jul 2018 09:17:47 +0000 From: "Elo, Matias (Nokia - FI/Espoo)" To: Jerin Jacob CC: "dev@dpdk.org" , "Van Haaren, Harry" Thread-Topic: [dpdk-dev] eventdev: method for finding out unlink status Thread-Index: AQHUJ9Aa1/qQlBsMGkGIBi2aSKyqoKSnZV8AgAAXrwA= Date: Mon, 30 Jul 2018 09:17:47 +0000 Message-ID: <80CC5C07-0D73-4F86-9F93-0AB78DEF2BFD@nokia.com> References: <20180730075408.GA14117@jerin> In-Reply-To: <20180730075408.GA14117@jerin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3445.9.1) x-originating-ip: [131.228.32.171] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR07MB4458; 6:xhAvdCSYHmoXOr5kZ7+MU3outdCe6DXHQQl0MXsIhCGjeohsKtCjE2r7+AQB/XSdlkYRHFXdOh5JX1NSeOvy0KwXK/2R5VkA3fk9vgw2pXuXyFOTUe+wT7SRt0CoXVf3bOgnR4jixFLE/vUrCymS1pa83hQ9V+NzDBsVmdSKX8kj4OQJ6m4+nYdDw77Nt/nahZ6qb85kHi2/5Gx4y95kHAyJMRycBwR5foQshismwgWStofzr+clA8oFWB609AGrWQR1ldkRxuZ39zivOx/syQvipvPIkmLp8EglN+0lE5RxS+zHhoV3MxSMPgHNaEkRH9nnZSwJLraB2mar99lhZO647vQzP3V+hJQ+Q0jAHjtF3lw7Z0Y6hd1dluKFlw2ogPezCxL4wuDlXIyjh3ApGLW/wNXnWHWKYZMWQjvO0sf8o9l/J0a4jHHxkN/TCbMd+RbDy4YPdwxfGYe3VaAd5w==; 5:CIGj3VwFdaO2/U+FAySDRmr8xvsDaqNtNKVE19HCn8kWKevHm5uanwLCFjdCrTtu0yaxKX0tDv0eNoKO5PW/6+0vh0bcYPktNCOaBT7UGbBobYVp8/SYNiajebhKrZpJX6qu9upBBEfkFinhZ5BlcoQ4pHxjh3AmrAW0rmRpTqs=; 7:ReKIQKRQInn+K5T+6KM0e+tXNBwxXc9Oosyn7+Pz/H85UnUDbLLTVGwjFgHyIkzPyfNRk3rZ+uf6h3t1Jj98eiHa0J6+KCugVwAn3jOdQx/l9tYG0LVe54ckWk6YQYC32idgrSr5oSVPJsNhxWYrxYwCowdO/vrPn/VQXfu9XYishKkw3RRY0xvSVd3Lmm7lQeUVJDJDJJBQ278YXKdVkmGQWqIE7jYCg9wkkjiYmzU63/CZKW3aemnuext1LD30 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: a69bfd1e-6972-4133-37a6-08d5f5fd50b1 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7193020); SRVR:DB7PR07MB4458; x-ms-traffictypediagnostic: DB7PR07MB4458: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matias.elo@nokia.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231311)(11241501184)(806099)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DB7PR07MB4458; BCL:0; PCL:0; RULEID:; SRVR:DB7PR07MB4458; x-forefront-prvs: 0749DC2CE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(346002)(366004)(376002)(39860400002)(136003)(199004)(189003)(6506007)(76176011)(54906003)(14454004)(50226002)(8936002)(476003)(8676002)(5660300001)(316002)(966005)(82746002)(229853002)(86362001)(6436002)(6116002)(256004)(305945005)(6916009)(7736002)(5250100002)(102836004)(3846002)(57306001)(6246003)(4326008)(186003)(99286004)(105586002)(6486002)(97736004)(486006)(83716003)(106356001)(25786009)(6512007)(446003)(2900100001)(36756003)(68736007)(26005)(6306002)(81156014)(81166006)(53936002)(66066001)(478600001)(2906002)(11346002)(33656002)(2616005); DIR:OUT; SFP:1102; SCL:1; SRVR:DB7PR07MB4458; H:DB7PR07MB4556.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: IsDdKxB1ZOLEzOLCVEu81Q00SbhZq9eNKcMQfeO2fgca7rIyFteS9RVJyifQppbYW1qZXtkkE7S0C57PEZl/YFs/z19q4ZOFRiTjdlMtcvzH1aMiK3xRr1LNJgFK1UXvFm8gLbcDELAecv1iJZHCEXRH9R5zjS3n1/uEFSzfQa+Ol8Gnvp+ILPjgLnEj0hnJ9daEb6mYCYGP9RGBqCymwTf7053jie33ZmwFh1YJ9k3eSpNsWd6Q9zEVARxVNJl/0NK5sHwveqrJVO8m5gfU/htYTjyEiDvYK+Oriw82p3ngJzDELqMF8BkHL1cCWO25u9xxezlth22r8LgJCL8jgbQc1ehhoK1UA99uST+GKQpDharQdQHUPGt0pgooIFndIQEwZNAK1oRNylGq3bI8yQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <20EC44194BD7AD48BFB4E5B5EB784088@eurprd07.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-Network-Message-Id: a69bfd1e-6972-4133-37a6-08d5f5fd50b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jul 2018 09:17:47.0574 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR07MB4458 Subject: Re: [dpdk-dev] eventdev: method for finding out unlink status 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, 30 Jul 2018 09:17:48 -0000 >>=20 >> In bug report https://bugs.dpdk.org/show_bug.cgi?id=3D60 we have been di= scussing >> issues related to events ending up in wrong ports after calling >> rte_event_port_unlink(). In addition of finding few bugs we have identif= ied a >> need for a new API call (or documentation extension) for an application = to be >=20 > From HW perspective, documentation extension should be enough. adding=20 > "there may be pre-scheduled events and the application is responsible to = process them" > on unlink(). Since dequeue() has which queue it is dequeue-ed from, the > application can allays make action based on that(i.e, Is the event > post/pre to unlink) At least in case of SW eventdev the problem is how the application can know= that it has processed all pre-scheduled events. E.g. dequeue may return nothing = but since the scheduler is running as a separate process events may still end up to t= he unlinked port asynchronously. >=20 >> able to find out when an unlink() call has finished and no new events ar= e >> scheduled anymore to the particular event port. This is required e.g. wh= en doing >> clean-up after an application thread stops processing events. >=20 > If thread stopping then it better to call dev_stop(). At least in HW > implementation, For an application doing dynamic load balancing stopping the whole eventdev= is not an option. > A given event port assigned to a new lcore other than > it previous one then we need to do some clean up at port level. In my case I'm mapping an event port per thread statically (basically thre= ad_id =3D=3D port_id), so this shouldn't be an issue.