From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2812AA04B5; Wed, 4 Dec 2019 17:23:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 61F191BF70; Wed, 4 Dec 2019 17:23:31 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id EC63A1BF6F for ; Wed, 4 Dec 2019 17:23:29 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xB4GBH5q007251; Wed, 4 Dec 2019 08:23:28 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=pfpt0818; bh=OxaszvsDTqo2irpZBvWTlKPr6X0L7x3XCtDAaABIfag=; b=KDUKKJVdUxwp91SVjlWSEm9Il8pE3qqyw7HNse4NLPnLUyb0Qqruo9AH3kNvjWmBF6Zm 1G15Wri2uxUE7jltrq45Tyunx1x/nTOvDyGuvhQjNBja7e4IPbSAGs+id5PvVM3aIrdQ jjmVt7FWKJuHZYsqEbR6LmgNcyA/j7A9U2MXHVEjypGKtfBjSwDFEp9sbOJs6SE8LSxd AfHFurLwplYoGJFYMzgw8UdRuYgy8bPx1+Z2PUzrhgAH71oMcx+nG3es45WlXCnwR/dV WKcsIEqtjqmfwOXTqAeAv3i7cP0Si6rgeWjPhRzMRq/GPPb8JkkG3c9gX1xcFdCrVSfs 9Q== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2wnvgvmu3p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 04 Dec 2019 08:23:28 -0800 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 4 Dec 2019 08:23:27 -0800 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (104.47.33.50) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 4 Dec 2019 08:23:27 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BqRpWDrWpKt1GDHQTc0TrDW4PTN3u5MihqlBEFJpQlPLwOikpkbmM1fStg9u58bYVvVUqP7rcZIg3/bYCG+GcUsQsX4EDDaJrOXaQOtdXHasnYM0/9hG74OD8ewhzxNq1QJDR3XaxhXQR9RvsGgdhNkhKBP/GYvqnskhsop/NfNcIRtNQI/B+1ne3R0gsnkW5fjiPB3JogaaznUaZHKGitWoDk0bVkrPZf/AGR+hsniXso2m570qKWZ8n5f462PqAY9wzdETnG905jRjbzI2LGujSbmzRC5Eubp5LzvbEFRj/yLgMGMcfXM/ax1zRP2U3AcxyFtH/feNA5BgEojXaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OxaszvsDTqo2irpZBvWTlKPr6X0L7x3XCtDAaABIfag=; b=O1gmzGIWP0mHbf/mijK6ANCcPlbEgCwruyrghKrqTWGPEyvVRtvKqeP+/sdfusBNR4pY1Vr6mB8indoU/MkC/qK2IuiUxQXjkZ96DRbFMeWjhB1xP/Sa+DUB8KvdVAyConDkkObOULwIy1aRZ8fzz98FpmGN/k1+pAMKqEu78V4PjpdYagUR8pKJ3bEMOeg87LUx1p6hKSb0Eya3whkwhBPIgRWxSyKnceMbJy7nKK0ZNZRiz5lUsqZBQtIfzeKD0KBoECqA6+yWBVJAjs7cZI/8LjIHWtvBWBT9KofLY/zsyC3Fu5LTjQuiYt02NPKP+4SATEMQt4Nbrs2W0KYXkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OxaszvsDTqo2irpZBvWTlKPr6X0L7x3XCtDAaABIfag=; b=kHQNjvysw9HP2eomTNVMu7Vw7HuCGzRsoPYHSlfKKtZeirCy4zKrxIVIJwupp+MDIv5tTngQeHaFLO9ADmr0wBTq/ZQUcyXOroG5gxR1O+W06VaQloFOzc7hpTKnX6BvveSgsDC8q0WccMYQWyZkE8MKlPmO8l81Npzs5+nar6U= Received: from MN2PR18MB2848.namprd18.prod.outlook.com (20.179.21.149) by MN2PR18MB3309.namprd18.prod.outlook.com (10.255.237.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.12; Wed, 4 Dec 2019 16:23:25 +0000 Received: from MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::81e4:87d1:7636:2ed7]) by MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::81e4:87d1:7636:2ed7%7]) with mapi id 15.20.2516.013; Wed, 4 Dec 2019 16:23:25 +0000 From: Harman Kalra To: Stephen Hemminger CC: Sunil Kumar Kori , Bruce Richardson , "dev@dpdk.org" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v2 1/4] eal: add API to check if its interrupt context Thread-Index: AQHVpQy0PfMI+54XXUqK9seA282KQ6eftGGAgADkNQCAADPbAIAJZ6oA Date: Wed, 4 Dec 2019 16:23:25 +0000 Message-ID: <20191204162302.GA183703@outlook.office365.com> References: <20191126061525.28507-1-skori@marvell.com> <20191127102222.31940-1-skori@marvell.com> <20191127160319.27915b22@hermes.lan> <20191128081006.GA50093@outlook.office365.com> <20191128084542.3e293ce4@hermes.lan> In-Reply-To: <20191128084542.3e293ce4@hermes.lan> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BMXPR01CA0014.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::24) To MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:3e::21) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0b7444c1-fa03-48b7-0710-08d778d649c8 x-ms-traffictypediagnostic: MN2PR18MB3309: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0241D5F98C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(376002)(346002)(396003)(136003)(366004)(189003)(199004)(6116002)(2906002)(3846002)(8676002)(26005)(81156014)(102836004)(8936002)(305945005)(55236004)(7736002)(81166006)(6246003)(1076003)(6512007)(33656002)(71190400001)(25786009)(4326008)(71200400001)(9686003)(14454004)(6506007)(6916009)(5660300002)(86362001)(99286004)(11346002)(229853002)(14444005)(66946007)(66476007)(478600001)(52116002)(6436002)(316002)(76176011)(64756008)(66446008)(66556008)(54906003)(6486002)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB3309; H:MN2PR18MB2848.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ploi17OGP/Hgie5wY/byA3Uv9FxK0jJ4VOxomkG7YWtNnqUDn56tvLYTOKUxHW7CInkzKehrtIVCq/yBzdDxi1HAYKy9v6pVKXcTZwZEBkl2xt/RSgd5zqsyMGZBzF1uczj8FKHuzoxzwBpD0uD822ue6NsN9oADBMU/TNS7zjInjVhn66Zes8qL/3IpBVkO3t4+W77CWhODEQPx5JCGouSIUNIFbLpH2K1fbz4Ewz4Tw4L8r6k6DuM1Lzq7e6k+Xie96yBfh+w7Ddc8k5xkLjOyvVZc/e7N7WIUloHoj5or0g/DMMX9NfGG1rIIV9QlzynoSeSn1+UCuduYbLvNdUhXYdSPcownwSw4JOzPfVVuN2OieKrMlBT3eivvBq6WIxucHvyUHLasJrWznciBofPcJ37XsWPUlTVcbdMUdB2GFrcrFMosRFu5+g/F/vi/ Content-Type: text/plain; charset="us-ascii" Content-ID: <80E604D30AB66443B2E548FC1150D3CC@namprd18.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0b7444c1-fa03-48b7-0710-08d778d649c8 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Dec 2019 16:23:25.5333 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ea4kkMSUzxtoKtnyxExCBUXkHMpy3YzI+hENAgJcRt3LLTlcriUmctkuGQaQMazUJmFSW0UWlI4In6hyhgpShQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3309 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-04_03:2019-12-04,2019-12-04 signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v2 1/4] eal: add API to check if its interrupt context 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Nov 28, 2019 at 08:45:42AM -0800, Stephen Hemminger wrote: > On Thu, 28 Nov 2019 08:10:23 +0000 > Harman Kalra wrote: >=20 > > On Wed, Nov 27, 2019 at 04:03:19PM -0800, Stephen Hemminger wrote: > > > External Email > > >=20 > > > ---------------------------------------------------------------------= - > > > On Wed, 27 Nov 2019 15:52:19 +0530 > > > Sunil Kumar Kori wrote: > > > =20 > > > > =20 > > > > +/** > > > > + * @warning > > > > + * @b EXPERIMENTAL: this API may change without prior notice > > > > + * > > > > + * Check if currently executing in interrupt context > > > > + * > > > > + * @return > > > > + * - positive in case of interrupt context > > > > + * - zero in case of process context > > > > + * - negative if unsuccessful > > > > + */ > > > > +__rte_experimental > > > > +int > > > > +rte_thread_is_intr(void); =20 > > >=20 > > > If you only need this in drivers, it should be internal not exposed > > > as part of API =20 > >=20 > > Sorry, but can you please help me understand the query. Do you mean: > > * Since "rte_thread_is_intr" would be used only used by > > libraries/drivers and not by any external application, rather having > > it in "rte_interrupt.h", we should have it in some internal header > > file like "eal_private.h" ?? > >=20 > > ANS - Yes we can do that but since all other related APIs like > > "rte_intr_ack", "rte_intr_enable/disable" which are also used by > > drivers/lib and not application, are prototyped in "rte_interupt.h". > >=20 > > OR do u mean > > * Since only octeontx2 driver is using this, why it is exposed as an AP= I > > rather it should be defined as some driver internal function ?? > >=20 > > ANS - "rte_thread_is_intr" is an counter part of "in_interrupt()" in > > DPDK, which will return whether the current execution is in interrupt > > context. This helps in dealing with nested interrupts case. We faced a > > similar case while handling hotplug probing initiated via secondary > > process. > > We believe this API could be very useful for many drivers which might > > end up in handling nested interrupts case. > >=20 > > Thanks > > Harman >=20 > What I meant was that some functions in EAL are documented as > being internal (flagged with @internal) and don't show up in > the documented API. >=20 > My concern is that if we make this part of the public API, it makes > it harder to change structural things like the interrupt thread > later. The interrupt thread is already problematic for several > other usages. >=20 I think now I understood your point, I will move prototype of this API to "common/include/rte_eal_interrupts.h", flag it as @internal and resend next version. I think this file was created for such APIs only as its description says. /** * @file rte_eal_interrupts.h * @internal * * Contains function prototypes exposed by the EAL for interrupt handling b= y * drivers and other DPDK internal consumers. */ Thanks Harman