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 52967A0471 for ; Wed, 17 Jul 2019 12:44:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 49EA858C6; Wed, 17 Jul 2019 12:43:52 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id ABADD4C94 for ; Wed, 17 Jul 2019 12:43:51 +0200 (CEST) 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 x6HAeeSZ015091; Wed, 17 Jul 2019 03:43:50 -0700 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-transfer-encoding : mime-version; s=pfpt0818; bh=Gp1d7zNsXikcjG+pvY+xX1KhHV7hZvcc5sBP9SIHTck=; b=MuEffuk3Q+dGWTOLGPcAXh0WR7vnif9dMK7ekCGVaVwpEwwalenLTu9SF/srKSqfH70t DeXkb7aPbbqVLM7B7bwDmjZNP5cLW9d0V9ad+d3gTcrqAsiH31bN5jYU+4Z0AOQ/moLE SKA5w/9YTu1EB9mdnXqRk0mjBHIFw3a2csUocOk7UoV+Cypte1nX/DQx4WdwzcAmgS7S AWwkVtJjsJ3dSPnD9uG6duOWQpvuse03bWYyFsF2I8yqOv5DIDNTSAU/MhTo0QYGY3P9 y2oyiVXOm8DQz9ygz7djb4iGvTLRh8UBAGj+UMUQD4GiX5GXXYciwQCaFKkNmNRsKXs5 gQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2ts07vftrw-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 17 Jul 2019 03:43:49 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 17 Jul 2019 03:43:44 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (104.47.49.59) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 17 Jul 2019 03:43:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gyIWZEHT5GFag/y2M7TvP9RzGecfBqkk+GjjilBazNlXActByAbfWdSKFxH+sTNjQzVm07xFaCFXnuiuNX/qvzfiyY5GQMeLwkqNfjtWOousPERzJscqn4pn02UQcE+e+FG5UnJNTubVZOUSCI5pph5QPcY7nXHtAA1Fc2kViGT1PohMdQTr9c0bGGMfsRan1LoK9tRID24ZezQhNDP7vZsGOMylp3KlTQwQ3bFF+2dfdiqx/dcjSbqKIY4JuH+nNtNYGWvtLtpozHpBxla8izDQFxAjcV9KkdPfhY5Xv069DKyOwKRnY+x7wE012wH+MUKwphR4v13uMFwIRktE7Q== 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=Gp1d7zNsXikcjG+pvY+xX1KhHV7hZvcc5sBP9SIHTck=; b=jubm2f0VGqdaGOvGcCVt+vhkr/0NyYyEcdPq4tclxc/FhwyJf5SIYpE5D7rN/ovJUtFrXZQiymfjB4pwVIBB2pJSR5gIisIEO0m2Evtsf7hvfB8xs428w1txBjL8Pjv9pyj2KTqbvgIKXzAxH05idbrnBujNMFKx18bewXO8NqMxHGZUzKLpxTQQrAGnRX3ds4FGfDCkuL2SLfqp+HBWBBrSL7RKO1jte+Vik7pd7LPIgQFhzCBOKxHWsN6/BoBRh1k0F+ryAU65bJmgiR/1wbUnWbWaAEASYMX+uy2EQ74IcXsFxKXsEfovqlZrQ+mqKuSo/pzuJ86/I7aw8tdnOg== 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=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Gp1d7zNsXikcjG+pvY+xX1KhHV7hZvcc5sBP9SIHTck=; b=J+ev7CbylLb5Et5vjwlmaiiExzv0XO1JnngUWAuYASTIrhM4+W/3HAMD0dBB8HWv+RRCxERVcB84xhBNoEyEO+cGVJc+Nss4SXsTm5NfGHYRED9nfh0ZRKyuFrRLRYlBYS/reRUs+Egh6xx3ivDEs+9ibk489zTs+S2fool6qpU= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB3048.namprd18.prod.outlook.com (20.179.60.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.10; Wed, 17 Jul 2019 10:43:42 +0000 Received: from BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::2d42:12b6:aa2e:2862]) by BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::2d42:12b6:aa2e:2862%4]) with mapi id 15.20.2073.012; Wed, 17 Jul 2019 10:43:42 +0000 From: Jerin Jacob Kollanukkaran To: "Hyong Youb Kim (hyonkim)" , Nithin Kumar Dabilpuram , David Marchand , "Thomas Monjalon" , Ferruh Yigit , "Bruce Richardson" CC: "John Daley (johndale)" , Shahed Shaikh , "dev@dpdk.org" Thread-Topic: [RFC PATCH v3 2/3] eal: add mask and unmask interrupt APIs Thread-Index: AQHVO/XIb9GeLyW36Uqi1XtdG9Kqj6bOUK4AgAAD+yCAABCQAIAAChEggAAQ1wCAAAaUUIAAC7+AgAALR1A= Date: Wed, 17 Jul 2019 10:43:42 +0000 Message-ID: References: <20190716164424.16776-1-ndabilpuram@marvell.com> <20190716164424.16776-2-ndabilpuram@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [106.200.248.176] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5f4aeec2-abf1-4d31-e378-08d70aa3a30f x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BYAPR18MB3048; x-ms-traffictypediagnostic: BYAPR18MB3048: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01018CB5B3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(396003)(136003)(366004)(39860400002)(199004)(189003)(86362001)(66066001)(186003)(2906002)(8936002)(26005)(33656002)(446003)(54906003)(11346002)(486006)(476003)(68736007)(66476007)(7736002)(305945005)(14454004)(3846002)(110136005)(6116002)(9686003)(64756008)(66556008)(66946007)(76116006)(74316002)(66446008)(316002)(4326008)(71200400001)(5660300002)(71190400001)(6436002)(52536014)(76176011)(229853002)(478600001)(102836004)(256004)(6246003)(25786009)(99286004)(81156014)(81166006)(6506007)(53936002)(55016002)(7696005)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB3048; H:BYAPR18MB2424.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-message-info: 1kF/sdMBQQsJzENl9gIP6qSCvHjtLLxvQ2bfNyGi78X1/4oEahvgq8gSPTdWBgn/q3hrKy1ObcnGnAUpFFO4aHJ0ph3I20MwE/Po4rOhakwd2a1f8VveO/Nu1AjdDxyWMztqGDxdELqufyMQLK3xBj+fBMwKyLWyJaD0Pn595lRIDj9kQV4+aYDNuVxY9UrW23+Se+xcpnEWm3BJqy/qLcy2nJc6tOQ0ygAxzsDUsBONRgDipfgTZEE0O590zVPEX7r9NLIe5jgtnpO64EPSeQjnDs0cQ6qdkUdi5c3mTfMSbhMynCFnFTTML9M4yXp121LXuGcNeSxLRwCYpFAWgw9MeAUsKoDcT/+fIe7D/eYPtpBtztGOo9I1glg72yxI6/lraXOHBrgSpanZXfhMEltTMYIgTMujG8iKyujWHl8= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5f4aeec2-abf1-4d31-e378-08d70aa3a30f X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2019 10:43:42.6789 (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: jerinj@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB3048 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-17_03:2019-07-17,2019-07-17 signatures=0 Subject: Re: [dpdk-dev] [RFC PATCH v3 2/3] eal: add mask and unmask interrupt APIs 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" > > I think, it vary from the perspective of IRQ Chip(or controller) vs > > NIC > > register(Source) PoV. > > Since the API starts from rte_intr_* it is more of controller so _ack_ > > make sense Other reason for ack: > > 1) It will enforce that it needs to be called form ISR > > 2) It would be have been really correct to unmask if VFIO+MSIx+Linux > > supports it > > 3) if it is ack, no need to add unmask counterpart, the _mask_ API > > >=20 > Just curious, what you mean by irq controller? Ack/mask/unmask PIOs all g= o Programmable Interrupt Controller. Like Intel 8259A, GIC from ARM etc The drivers in linux/drivers/irqchip/ > to the NIC. It is the NIC that asserts/de-asserts irq.. >=20 > > > > > > Besides the name, are we agreeing that we want these? > > > - Unmask if INTx > > > > Yes > > > > > - Nothing if MSI/MSI-X > > Yes for MSI over VFIO > > No for MSI over UIO/igb_uio > > >=20 > I guess I was not clear. For MSI/MSI-X, we do not want to do mask/unmask > regardless of vfio-pci/igb_uio. Below is my comment about > linux/windows/freebsd from an earlier email. Do you disagree? I am sure > there are plenty of kernel NIC driver guys here. Please correct me if I a= m > mistaken... For some reason, igb_uio kernel driver mask the interrupt for MSIx. We need to ack or unmask if needs to work with MSIX + IGB_UIO. See=20 pci_uio_alloc_resource() if (dev->kdrv =3D=3D RTE_KDRV_IGB_UIO) dev->intr_handle.type =3D RTE_INTR_HANDLE_UIO;=20 else { dev->intr_handle.type =3D RTE_INTR_HANDLE_UIO_INTX; igbuio_pci_irqcontrol() for masking in kernel. So it is more of making inline with igb_uio kernel driver AND not break The existing drivers which was using rte_intr_enable in ISR with MSIX+IGB_U= IO I do agree with that for edge trigged interrupt mask may not require from k= ernel. But I am not sure why it is added in igb_uio kernel driver. May be it is j= ust legacy. Anyway this wont change schematics, when igb_uio kenrel fixed then the coun= ter Part can be changed in rte_intr_ack(). Ie. it is transparent to drivers. >=20 > > I don't have very strong opinion unmask vs ack. I prefer to have ack > > due the reasons stated above. > > If you really have strong opinion on using unmask, we will stick with > > that to make forward progress. > > Let us know. > > >=20 > I have no strong opinion either. OK. Lets stick with rte_intr_ack(). >=20 > Thanks.. > -Hyong