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 6FDD2A04DD; Thu, 28 Nov 2019 09:10:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6F3002F4F; Thu, 28 Nov 2019 09:10:31 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 1B8CA2C60 for ; Thu, 28 Nov 2019 09:10: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 xAS89qUQ002740; Thu, 28 Nov 2019 00:10: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=wxMh1mWJsQMrE7xVHKAwuMTUMggaPF7qN/ru54TNusQ=; b=tbyep0ave1gVKlWHQj4o6GR5UkwbY8tYFzBQrJrd6LD4ZW5THM5Gf1fMmw4L13RwriyO 7A7jUfylWvfTV74cQOZ35THeVWx4QBhkFAU3KOGQ+G/+MDQC63LOQO0Oysheg0ivJNJQ vcoGIAY1HUA+qeYiuoFV7HapxX5EM6e9Tj+qFL0Fddyo5AwiKVtEtxiP0tyXoqolkszb NhoHyd+kQNqyI0xi1f2HYC083j4CZfgw8xHJxH5dRenzqOWWUCTLa+vW1OzU2GB4HEDW k+zC+XSu0as4YVARBLIJ8QSuTRysq7sYTqwryCDxjB0uz15dm2fTvOWT3i/VDvT4GSE1 kg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2whmdycxng-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 28 Nov 2019 00:10:28 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 28 Nov 2019 00:10:25 -0800 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (104.47.48.53) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 28 Nov 2019 00:10:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JnYZIsPo2DoZrSxTORq6dGS1yTw3aB4ueZeQOkPdGM7wmM8Kihb/c3Nqn5MCcS9PRntuCbDyzFRpVKHp1QJSucdXqvO0unL3b2IeII+chXa/e9WNH5Fd8yyvSbJXoQZuGFU+TEFKFD50J0zMn4S7nOIc+G4gyK1UVysP2C1C9U0y9npKN24VBLHYhsohEpzVzl8hh5+nqHOKUu386K3lPxChopHGQL9AiMeSqnlS0yQZuTuvw0YD3q1Qnf6eb3TVn63APqkMmRdjVTOgN6yImcsJ4OmyQ1sTiA6fm4PLMFhYXQjO+C+7OMCEoujILpDklMw6nrhrAEkPDZ2U0xOf6Q== 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=wxMh1mWJsQMrE7xVHKAwuMTUMggaPF7qN/ru54TNusQ=; b=aFUFKfPkWiQNZnyVHYID+V27e/wfdv5B9662VKVMjIoqtG6yWZfkeccYpRCFElEzhsJLX96NiC95khliyadzIdqDlmZivZy3KN3qL6CXrdgVYgAmquHjlZMK++6Rkyg+0kD/vIQquS1kl6XIgy3QlLkPoBidhmQTZVaMfihbWWbRMggVkFImSqSkTwOhpNtuh6Mxe+fY+hJQNGgI4enUZLYoS04xGGJTCjVyMhFDQdFqTQdUO32a5NAkDggqYb0/peaOX4ktrrmz3p+TvXt8XFnWNftpZGr/EO5KinRbu3JDWq0IuSo4MX0eA2Vc7Y1r8Nfed+Afu+Y0itMO0WFlOQ== 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=wxMh1mWJsQMrE7xVHKAwuMTUMggaPF7qN/ru54TNusQ=; b=IGk28JIPQ0fkGM3+u4EOONKAJNHqNSbbMyd2s3+yng5dwwovVc+WjzLiALOkJ/y3syqXwz3faEXFwtgc0/2KsnhXjlj6Dp+d64C97vjT8r5M0TU0mSkJgBX3CzEwwQbj6aVTwk2j2iTzRGFRKKNuFzwCWMw9K893RsIL5CkfLso= Received: from MN2PR18MB2848.namprd18.prod.outlook.com (20.179.21.149) by MN2PR18MB2541.namprd18.prod.outlook.com (20.179.83.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.21; Thu, 28 Nov 2019 08:10:23 +0000 Received: from MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::a8a7:cb5b:a6a6:9693]) by MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::a8a7:cb5b:a6a6:9693%7]) with mapi id 15.20.2474.023; Thu, 28 Nov 2019 08:10:23 +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+54XXUqK9seA282KQ6eftGGAgACIA4A= Date: Thu, 28 Nov 2019 08:10:23 +0000 Message-ID: <20191128081006.GA50093@outlook.office365.com> References: <20191126061525.28507-1-skori@marvell.com> <20191127102222.31940-1-skori@marvell.com> <20191127160319.27915b22@hermes.lan> In-Reply-To: <20191127160319.27915b22@hermes.lan> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PN1PR0101CA0059.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::21) 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: ee716f63-ef9a-45e8-dbb7-08d773da6af4 x-ms-traffictypediagnostic: MN2PR18MB2541: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0235CBE7D0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(136003)(376002)(39860400002)(366004)(396003)(199004)(189003)(1076003)(25786009)(316002)(66946007)(86362001)(305945005)(14454004)(6116002)(14444005)(256004)(446003)(6916009)(81166006)(7736002)(3846002)(8676002)(8936002)(81156014)(2906002)(54906003)(478600001)(66556008)(64756008)(66446008)(33656002)(6436002)(186003)(76176011)(11346002)(99286004)(52116002)(386003)(9686003)(71200400001)(102836004)(71190400001)(229853002)(6512007)(6486002)(66066001)(6506007)(5660300002)(55236004)(26005)(6246003)(4326008)(66476007); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2541; H:MN2PR18MB2848.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: DcAeAXX+MktueLcaqn+e9edceERbfpEs20CtNzke7m8o/OHwErMyFVgzDNtNSHsWNdjZU57M3N4V5j4spD2UHXq6NgaxC7aXYZuVLOP7UKlvAbPiq8lmnWAmvoLMaqe6utDhGoFddOPx9gR+p1NQDwqaqE3yv2r3SuKwqHwT2uXcRaUp7PEwJEE6Z4PCYnE0+vB/icmYroUH5vPQ1ba332fIJjCevor2S0xgJ4Db9Ha5+jbPyhWT/qOerQKj3FUZiGvxCdmCfUFQ18RK3d6Xf7g02LN771RW9ikEibjAXnS2ukRMrsQvd0P1HoKOb7oIEJVW+g5lCLUweyEa9HflAYkdAp0SfeDhGeZg1OMuveqk3z8RHduZjGdkhO2ssK6jXCn2/0/xY01KoKc4K7fG1K5/ZYdy4WytTRPAvNtZKmgBCdX5KzpFFojIo34CVv4+ Content-Type: text/plain; charset="us-ascii" Content-ID: <6B0F6FD68ACC314D883D5F71BF1FB37F@namprd18.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ee716f63-ef9a-45e8-dbb7-08d773da6af4 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2019 08:10:23.2300 (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: ku+oLSs6ErDmbDtpp7iiIJzPL9I7/UBIW+1gbBm/GTjJtJJL80mR3/FtAbZrYsZ9buuTG9otC1ebwgkELUc40g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2541 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-28_01:2019-11-27,2019-11-28 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 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 > If you only need this in drivers, it should be internal not exposed > as part of API 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" ?? 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". OR do u mean * Since only octeontx2 driver is using this, why it is exposed as an API rather it should be defined as some driver internal function ?? 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. Thanks Harman