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 BAFB7A0471 for ; Tue, 16 Jul 2019 08:00:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0CA7B2BF5; Tue, 16 Jul 2019 08:00:53 +0200 (CEST) Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) by dpdk.org (Postfix) with ESMTP id C9A4C2BF4 for ; Tue, 16 Jul 2019 08:00:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3165; q=dns/txt; s=iport; t=1563256850; x=1564466450; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=yYR137trzylhkgrcqDXnr/hB7gT5CLBKOw3PlSG4uoc=; b=W+wN8AEFjI2Xj0dpZFgYoQcn+AkTh2hQ2K5mLgVAdmJcQNX6kHH1iR6u 5IJxEvRpulKsTxtZNI6wcCNCGRsB5Mw8iwL223ItXqWLyQCD3IYRez1UT eiuvOCaDKgPPhj5zETeW9Uv25PYD/S62mf/0tXjaKg3to4mz+VWQKS6jv k=; IronPort-PHdr: =?us-ascii?q?9a23=3A0QH8iRZwsVIxAI/RkxUhzo3/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?A0ATAADvZi1d/5pdJa1lGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBVQMBAQEBCwGBQ1ADalUgBAsoh2MDjk6CW5dPgS6BJANUCQE?= =?us-ascii?q?BAQwBASMKAgEBhEACgmUjNgcOAQMBAQQBAQIBBW2FPAyFSgEBAQEDEhUTBgE?= =?us-ascii?q?BNwELBAIBCBEEAQEfEDIdCAEBBAENBQgagwGBagMdAQ6hBQKBOIhggXAzgnk?= =?us-ascii?q?BAQWBBgErAYNZGIITCYE0AYteF4FAP4EQAUaCTD6CYQOBYiQMgwqCJowCnmU?= =?us-ascii?q?JAoIZhliNT4MalHCNNVWGc5AIAgQCBAUCDgEBBYFWATEqgS5wFUgMglMJgji?= =?us-ascii?q?DcYUUhQgBNnIBgSiPHAEB?= X-IronPort-AV: E=Sophos;i="5.63,496,1557187200"; d="scan'208";a="595658732" Received: from rcdn-core-3.cisco.com ([173.37.93.154]) by rcdn-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 16 Jul 2019 06:00:49 +0000 Received: from XCH-ALN-004.cisco.com (xch-aln-004.cisco.com [173.36.7.14]) by rcdn-core-3.cisco.com (8.15.2/8.15.2) with ESMTPS id x6G60njJ002502 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 16 Jul 2019 06:00:49 GMT Received: from xhs-rcd-001.cisco.com (173.37.227.246) by XCH-ALN-004.cisco.com (173.36.7.14) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 16 Jul 2019 00:58:29 -0500 Received: from xhs-aln-003.cisco.com (173.37.135.120) by xhs-rcd-001.cisco.com (173.37.227.246) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 16 Jul 2019 00:58:28 -0500 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (173.37.151.57) by xhs-aln-003.cisco.com (173.37.135.120) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 16 Jul 2019 00:58:28 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HptkG+W3PHtCeHFpQud0LeZzrxG/4yypMILzKqPg+m2fkuCDvabgLVZAlYioVEJ9KimehU8NVaesY4b1IupFzWDpDvstPIV+CzNi8g+Kz954SYiIoWvcxHqTAiBKgOf2V9f2fgVoJei1AsbbrST9SPfCValvQmloW8zKowIdvLpC/Y1SL80QhbElGoWDu/y1Gej440wOTCGyIB/Ix/1K0VF4/3xUW82XWol+naOrvXzWrl9bOXAYyyQ3UHUmjxPayCpD+rkntATMv0t3PjH8SDH7eZT41cUUeSuwlpAxFy9SAWaRkCEfeLNUwxxUFFuh7XmF8XxbYi+2wwGC6/wgUQ== 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=rkirnxdhxDGdKWgk8/sscy+kzjtuUrUiUtIIORTo4uY=; b=KUCXQHqvxVDg+lFwVHCfpe4HQbEmDYbpud/GfLISmJ7/mhJhFSfbW8Z4DWkuwAemz8rWwqNem303thXzK8eMhYtrY3uop6d9adzuiJJqux88wfkGNPHIiuV1norRvgt1waqdF/HI4jfnSpfBxLvmWrQrGaVHJBHkdtE2hyL5148ikiPMh2lgiDERcpXygTdiVN1o0fFoGKsjO6GzyVvVPs3fmTzJy0LbROOQBO8k3LFkReRUTMDaveSaBf1wiWquxP9wNhWHLiPqKXew39VY40/QfVyUvRrN5yg9EvhAzcJ0TIojPrfwIHfP6iXuHbsiFibF/9p4XN696jIAPxn0jw== 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=rkirnxdhxDGdKWgk8/sscy+kzjtuUrUiUtIIORTo4uY=; b=E4pvreO4E9gC1ERaATrmcBuVJ5ExIzhg6z4fe0m/zBTWa4rf4ub59cv6bFEIHVQVTiOpuSpGsYscOzCf29XVMTdQnIAdD63PlZ7Toepe1HqvwP8a1iWGhqhw3cN8w0HITG5Yy9DZpVK4M/gAldLHcLqXV8wqU/t1h+iJI6Zqg5M= Received: from MWHPR11MB1839.namprd11.prod.outlook.com (10.175.53.12) by MWHPR11MB1565.namprd11.prod.outlook.com (10.172.54.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.10; Tue, 16 Jul 2019 05:58:27 +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.2073.012; Tue, 16 Jul 2019 05:58:27 +0000 From: "Hyong Youb Kim (hyonkim)" To: Jerin Jacob Kollanukkaran , David Marchand , Thomas Monjalon , "Ferruh Yigit" , Alejandro Lucero , Anatoly Burakov CC: "dev@dpdk.org" , "John Daley (johndale)" , Shahed Shaikh , "Nithin Kumar Dabilpuram" Thread-Topic: [RFC PATCH] vfio: avoid re-installing irq handler Thread-Index: AdU7LOBENm/7fWlUSVuvO2rop1WEPwAbdfHg Date: Tue, 16 Jul 2019 05:58:27 +0000 Message-ID: References: In-Reply-To: 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::46] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4421cfbc-d3ae-4776-fbb5-08d709b29f1d x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:MWHPR11MB1565; x-ms-traffictypediagnostic: MWHPR11MB1565: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0100732B76 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(396003)(39860400002)(366004)(136003)(189003)(199004)(13464003)(229853002)(305945005)(7736002)(46003)(33656002)(6246003)(74316002)(186003)(53936002)(966005)(478600001)(2906002)(66946007)(81166006)(316002)(81156014)(8676002)(76116006)(54906003)(446003)(25786009)(110136005)(14454004)(68736007)(8936002)(76176011)(4326008)(99286004)(55016002)(71200400001)(52536014)(71190400001)(11346002)(6436002)(6116002)(6306002)(5660300002)(53546011)(486006)(6506007)(66476007)(7696005)(66446008)(102836004)(64756008)(66556008)(86362001)(476003)(9686003)(256004); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1565; 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: DirBduWgrBxgy1bsbq0ea/PfHIxeThSE5X3gdSpvrGj9MM0YryexTFQ13/d82yktCVmZ2WGKUUfKarCjDDM9TFNKI0D0Cp2Abs1XntyfHiHlXWzY8vOpdZ6ZlOIQjdUpYKC/WWZ0rkYkxj7AVnKDJ7ObBPs/9RXABXs8uD2p4rAmkM5o6OXomTdtQKf6gv5hpvTHq6qEd64sZdBDl0WOUugZM6fKaJpA8rIaq7vWxEDfPBnhgEr6VLHH6wEFELjW/IZ98wQqiBtSZJCZVLyoZxTvEYge3/PWRVht2w60cmFFUZI8zL55HVhivN3tUJ0OPZzSHPjAKYsyiSfoQSZd+h+Yw3uxhNa/PmBU3RpUy4ehlegDyjCAjC/q+3LcJnDyYmi4wewGMi3OVnbCxhIHCDhDqwQJ1Hawq9xWL2upGcQ= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4421cfbc-d3ae-4776-fbb5-08d709b29f1d X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2019 05:58:27.3394 (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: MWHPR11MB1565 X-OriginatorOrg: cisco.com X-Outbound-SMTP-Client: 173.36.7.14, xch-aln-004.cisco.com X-Outbound-Node: rcdn-core-3.cisco.com Subject: Re: [dpdk-dev] [RFC PATCH] vfio: avoid re-installing irq handler 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: Jerin Jacob Kollanukkaran > Sent: Tuesday, July 16, 2019 1:51 AM > To: Hyong Youb Kim (hyonkim) ; David Marchand > ; Thomas Monjalon > ; Ferruh Yigit > Cc: dev@dpdk.org; John Daley (johndale) ; Shahed > Shaikh ; Nithin Kumar Dabilpuram > > Subject: RE: [RFC PATCH] vfio: avoid re-installing irq handler >=20 > > -----Original Message----- > > From: Hyong Youb Kim > > Sent: Monday, July 15, 2019 9:28 PM > > To: David Marchand ; Thomas Monjalon > > ; Jerin Jacob Kollanukkaran ; > > Ferruh Yigit > > Cc: dev@dpdk.org; John Daley ; Hyong Youb Kim > > > > Subject: [EXT] [RFC PATCH] vfio: avoid re-installing irq handler > > > > A rough patch for the approach mentioned earlier. It is only for discus= sion. > > http://mails.dpdk.org/archives/dev/2019-July/138113.html > > > > To try this out, first revert the following then apply. > > commit 89aac60e0be9 ("vfio: fix interrupts race condition") >=20 > Yes. This patch has to be to reverted. It changes the existing interrupt > behavior and does not address the MSIX case as well. >=20 > I think, The clean fix would be to introduce rte_intr_mask() and > rte_intr_unmask() by abstracting the INTX and MSIX differences > And let qede driver call it as needed. >=20 > Thoughts? Hi, You are proposing these? - Add rte_intr_mask_intx, rte_intr_unmask_intx. No APIs for masking MSI/MSI-X as vfio-pci does not support that. - Modify PMD irq handlers to use rte_intr_unmask_intx as necessary. That might be too intrusive. And too much work for the sake of INTx.. Anyone really using/needing INTx these days? :-) The following drivers call rte_intr_enable from their irq handlers. So with explicit rte_intr_unmask_intx, all these would need to do "if using intx, unmask"? atlantic, avp, axgbe, bnx2x, e1000, fm10k, ice, ixgbe, nfp, qede, sfc, vmxnet3 And nfp seems to rely on rte_intr_enable to re-install irq handler to unmask a vector in MSI-X Table? if (hw->ctrl & NFP_NET_CFG_CTRL_MSIXAUTO) { /* If MSI-X auto-masking is used, clear the entry */ rte_wmb(); rte_intr_enable(&pci_dev->intr_handle); With David's patch and mine, this handler would have to first rte_intr_disable() and then enable, if such unmasking is really necessary.. As for the semantics of rte_intr_enable/disable, I am ok as is. - "enable": put things in a state where NIC can send an interrupt, and PMD/app gets a callback. Whether this involves unmasking for INTx is hidden. - "disable": put things in a state where NIC cannot send an interrupt. Regardless of vfio changes, we should probably remove rte_intr_enable from qede_interrupt_handler (the MSI/MSI-X interrupt handler), to make usage/intention clear.. Thanks. -Hyong