From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,URIBL_SBL,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C53EBC76186 for ; Wed, 17 Jul 2019 12:57:37 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 4830E2173E for ; Wed, 17 Jul 2019 12:57:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cisco.com header.i=@cisco.com header.b="OJoq08zH"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cisco.onmicrosoft.com header.i=@cisco.onmicrosoft.com header.b="i3M2M4s1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4830E2173E Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=cisco.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5B3B01B9A0; Wed, 17 Jul 2019 14:57:36 +0200 (CEST) Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by dpdk.org (Postfix) with ESMTP id 7EED85905 for ; Wed, 17 Jul 2019 14:57:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3104; q=dns/txt; s=iport; t=1563368254; x=1564577854; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=eXrOeUluuW2ok8zH5uoCXiwMGCjNrmgeFaVW6AfCnow=; b=OJoq08zHhN7JJZqqwm1PzX04Kf8kFuHG86Rddiq0PgAxkC14xrF1B3lc YtAePX1t23xo3lindnEhxaCAhUmntM+cGL4hA35B9n6sy0c39Z2akHrus 0YCeA0WSzsswNAeailn4RR3IBPZXyyueRtMo6vnoDtFW4GkYDraX6DTXm o=; IronPort-PHdr: =?us-ascii?q?9a23=3AIWQj/BY12WAUZrhX5pXdAiT/LSx94ef9IxIV55?= =?us-ascii?q?w7irlHbqWk+dH4MVfC4el20gebRp3VvvRDjeee87vtX2AN+96giDgDa9QNMn?= =?us-ascii?q?1NksAKh0olCc+BB1f8Kavqfis8H8VHfFRk5Hq8d0NSHZW2ag=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AIAAAjGi9d/5JdJa1lGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBUwUBAQEBCwGBQyknA4FCIAQLKodjA4RSiSmCW36WUoEugSQ?= =?us-ascii?q?DVAkBAQEMAQEtAgEBhEACgkUjNAkOAQMBAQQBAQIBBW2FPAyFSgEBAQEDEig?= =?us-ascii?q?GAQE3AQsEAgEIDgMEAQEfEDIdCAIEAQ0FCBqCNYI2Ax0Boh0CgTiIYIIjgnk?= =?us-ascii?q?BAQWBBgGEChiCEwmBNAGLXheBQD+BEUaCFzU+hEaDO4ImjAIgnkUJAoIZlCe?= =?us-ascii?q?YCo01l1ACBAIEBQIOAQEFgVA4gVhwFYMngkGDcYocATZygSmNRwEB?= X-IronPort-AV: E=Sophos;i="5.64,274,1559520000"; d="scan'208";a="601481360" Received: from rcdn-core-10.cisco.com ([173.37.93.146]) by rcdn-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 17 Jul 2019 12:57:33 +0000 Received: from XCH-RCD-015.cisco.com (xch-rcd-015.cisco.com [173.37.102.25]) by rcdn-core-10.cisco.com (8.15.2/8.15.2) with ESMTPS id x6HCvW43006290 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 17 Jul 2019 12:57:33 GMT Received: from xhs-rcd-002.cisco.com (173.37.227.247) by XCH-RCD-015.cisco.com (173.37.102.25) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 17 Jul 2019 07:57:32 -0500 Received: from xhs-aln-002.cisco.com (173.37.135.119) by xhs-rcd-002.cisco.com (173.37.227.247) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 17 Jul 2019 07:57:31 -0500 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (173.37.151.57) by xhs-aln-002.cisco.com (173.37.135.119) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 17 Jul 2019 07:57:31 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V3a5tPIe7Ez545WDORyMr9rioW7QKqNgUxOT9kPnc1B/yldsw5mC7zJKCNQtFqkM5nldBDDS7wHOdAV0h79s+soPY+T64DJrJ61blOtnclD4oDsmoFiMgEKIVrHPVmXDtU24DA+EL/nJX88ZsM2zJg6z9kDLIonNaufyBSC1ayaKWnsX6StR3nyWePNFWanZjHDR45EBfvt7h9yucE/JATHFOPC6DNTH7GwsJxJE4hApXoEM7Ab+3D84hmQ+gTbMhFTpkhb9mSL123G3P2kmukki0LugDxdBLLd3VTVue4dLhqOi9FxxB7hq8YKzGED83MfB45LNQ09Tr0z6JgccPA== 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=uEWjtGay5S+E/JRWll07PS82bG7JeQIahz5V7q4klrw=; b=cU8sK5bRmmjqqF2bV6mthhV+hBnxi8XZs2Ww7CPPw1D8WWnCg+U/Yjtj3uCBoCMRf4HYQjsmrLCbZ71nkRDI5WsMNfKegrTM8rnrUT5f3rHgn8Z6Lix58I13vBdo73AJWt1DPQborT16/yMClpl9u311rcwfOGSTR5bDE6WZr0RWN1kE4TDMEAJib59oipSsmvhR7dWDC2H7qzQwn0eM7o9PUp2By0NPkAYiAIv2xsQOgppfmM+ZEPqdhvXYQctFk6ftomHxAj+c4IG6DT2cSBSHXfSGfIYvFKtHV3BOciM7dVCD7dzvXiAlqOS2kd+EuJhu9wu6WQ/hSVTRW6ACYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=cisco.com;dmarc=pass action=none header.from=cisco.com;dkim=pass header.d=cisco.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uEWjtGay5S+E/JRWll07PS82bG7JeQIahz5V7q4klrw=; b=i3M2M4s1JzWXiQ0cx1r4whrCQwgugC4DkPghdChvVa302rZdCkMSyzHf/6q7jskgv0ktDu6coJCkPCal3a7lTC1J2dX9tifvZfbqHHzeHF1sTDmC+UGs8u5GueKw2hXnDUmc/ngQ0MNVp0/cPEEG/cV1qoGKKJ+swi2GmMNjkjg= Received: from MWHPR11MB1839.namprd11.prod.outlook.com (10.175.53.12) by MWHPR11MB0077.namprd11.prod.outlook.com (10.164.204.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.11; Wed, 17 Jul 2019 12:57:30 +0000 Received: from MWHPR11MB1839.namprd11.prod.outlook.com ([fe80::3cef:35b5:8800:39f1]) by MWHPR11MB1839.namprd11.prod.outlook.com ([fe80::3cef:35b5:8800:39f1%6]) with mapi id 15.20.2094.011; Wed, 17 Jul 2019 12:57:30 +0000 From: "Hyong Youb Kim (hyonkim)" To: Nithin Dabilpuram , David Marchand , Thomas Monjalon , "Ferruh Yigit" , Bruce Richardson CC: "jerinj@marvell.com" , "John Daley (johndale)" , Shahed Shaikh , "dev@dpdk.org" Thread-Topic: [PATCH v2 2/3] eal: add ack interrupt API Thread-Index: AQHVPJ1awKwl6iv5TE2qTW+wXmFZCabOwnIg Date: Wed, 17 Jul 2019 12:57:29 +0000 Message-ID: References: <20190717115852.171416-1-ndabilpuram@marvell.com> <20190717124354.142668-1-ndabilpuram@marvell.com> <20190717124354.142668-3-ndabilpuram@marvell.com> In-Reply-To: <20190717124354.142668-3-ndabilpuram@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=hyonkim@cisco.com; x-originating-ip: [2001:420:c0dc:1001::133] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4ca15974-e8d8-4d66-d885-08d70ab653cb x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MWHPR11MB0077; x-ms-traffictypediagnostic: MWHPR11MB0077: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 01018CB5B3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(376002)(39860400002)(366004)(396003)(346002)(13464003)(189003)(199004)(7736002)(305945005)(25786009)(53936002)(74316002)(8676002)(6436002)(478600001)(9686003)(76176011)(6506007)(53546011)(68736007)(256004)(7696005)(14444005)(186003)(55016002)(446003)(11346002)(33656002)(486006)(8936002)(81156014)(81166006)(46003)(99286004)(102836004)(54906003)(6116002)(316002)(476003)(2906002)(110136005)(71190400001)(71200400001)(14454004)(5660300002)(76116006)(229853002)(4326008)(66476007)(66556008)(64756008)(66446008)(52536014)(86362001)(66946007)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB0077; H:MWHPR11MB1839.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: SBOZNu6V9ZXoRWkwNXIetExJytR/huEUxMDsHJaVaSR62MrFzHuc0NJ7KcBz8tX04YgXioj0Hhf7SsrhuINXEMm9xYFaS5E1hsgErrznkXWcNSkBLV4R4Wdx0XmL8Xb/xLquJXp7uswRrmgnMjAfMqFDxA2Ox3ml5FQSeBe6vNPRse+wQQps2Wumy79JH8TFR7V1T+P6QIB8K7xjXB9o2v4eYzGPSmELCjIf/JL/FFeucTxi4muhDyk7fw4v0GhLr6bQXlyMoDPngemJPKWf8kphRxfGL5wW7z2sSbAgTjl0XNDISAeKLg6xPf5lZo+btQmZFciY8o4HUsXU7G/lCnhbPJRHyKC5sfKVgVGZ3dOzmmdft0dnEMipZ0Z207u1D/O2G+wFtQvfvFaMgCrK4dlZ6qypwlqO/mrNyIrz2EQ= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4ca15974-e8d8-4d66-d885-08d70ab653cb X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2019 12:57:30.0002 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hyonkim@cisco.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB0077 X-OriginatorOrg: cisco.com X-Outbound-SMTP-Client: 173.37.102.25, xch-rcd-015.cisco.com X-Outbound-Node: rcdn-core-10.cisco.com Subject: Re: [dpdk-dev] [PATCH v2 2/3] eal: add ack interrupt API 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" > -----Original Message----- > From: Nithin Dabilpuram > Sent: Wednesday, July 17, 2019 9:44 PM > To: Hyong Youb Kim (hyonkim) ; David Marchand > ; Thomas Monjalon > ; Ferruh Yigit ; Bruce > Richardson > Cc: jerinj@marvell.com; John Daley (johndale) ; > Shahed Shaikh ; dev@dpdk.org; Nithin Dabilpuram > > Subject: [PATCH v2 2/3] eal: add ack interrupt API >=20 > Add new ack interrupt API to avoid using > VFIO_IRQ_SET_ACTION_TRIGGER(rte_intr_enable()) for > acking interrupt purpose for VFIO based interrupt handlers. > This implementation is specific to Linux. >=20 > Using rte_intr_enable() for acking interrupt has below issues >=20 > * Time consuming to do for every interrupt received as it will > free_irq() followed by request_irq() and all other initializations > * A race condition because of a window between free_irq() and > request_irq() with packet reception still on and device still > enabled and would throw warning messages like below. > [158764.159833] do_IRQ: 9.34 No irq handler for vector >=20 > In this patch, rte_intr_ack() is a no-op for VFIO_MSIX/VFIO_MSI interrupt= s > as they are edge triggered and kernel would not mask the interrupt before > delivering the event to userspace and we don't need to ack. >=20 > Signed-off-by: Nithin Dabilpuram > Signed-off-by: Jerin Jacob > --- > v2: > * No change >=20 > lib/librte_eal/common/include/rte_interrupts.h | 22 +++++++ > lib/librte_eal/freebsd/eal/eal_interrupts.c | 9 +++ > lib/librte_eal/linux/eal/eal_interrupts.c | 81 > ++++++++++++++++++++++++++ > lib/librte_eal/rte_eal_version.map | 1 + > 4 files changed, 113 insertions(+) >=20 > diff --git a/lib/librte_eal/common/include/rte_interrupts.h > b/lib/librte_eal/common/include/rte_interrupts.h > index c1e912c..93b31cd 100644 > --- a/lib/librte_eal/common/include/rte_interrupts.h > +++ b/lib/librte_eal/common/include/rte_interrupts.h > @@ -118,6 +118,28 @@ int rte_intr_enable(const struct rte_intr_handle > *intr_handle); > */ > int rte_intr_disable(const struct rte_intr_handle *intr_handle); >=20 > +/** > + * It acks an interrupt raised for the specified handle. > + * > + * Call this function to ack an interrupt from interrupt > + * handler either from application or driver, so that > + * new interrupts are raised. > + * > + * @note For interrupt handle types VFIO_MSIX and VFIO_MSI, > + * this function is a no-op and returns success without > + * changing anything as kernel doesn't expect > + * them to be acked. > + * [...] Shouldn't we explain that this really is "unmask" but named "ack" because of x and y, and that it is expected at end of INTx handler? Ack does not have a well-defined meaning, whereas everyone knows what unmask means.. [...] Thanks. -Hyong