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 CD32DA0471 for ; Wed, 17 Jul 2019 09:47:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54EC12082; Wed, 17 Jul 2019 09:47:57 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id AFF321D9E for ; Wed, 17 Jul 2019 09:47:55 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6H7j79a001178; Wed, 17 Jul 2019 00:47:51 -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-id : content-transfer-encoding : mime-version; s=pfpt0818; bh=Y7ahZWjBPf1/LkRT2K9r1+7hvKt3DeuI0qTuyn+Ww68=; b=fHjP0R9cWVwVxuyZ9m2UIh3ILfXu4FFvn/sWBDlxLlVVCmr2TyIfjhkeSBfA8+VO3kDO iStTIqgtHgZyjsU1E6ddcMYCMQbFkwmqwmJrJntPul9FcyJemRZSO6L9ehPfL/hZZGG4 dESrNVHNquKk6qcN+cOegD5LoPPyWmYFop4ahZgPCVMrAy/37jSNyeZLG84ae7ZwsstZ qlMh+Wxc6z2uGVTBCfCbgI6Fyj3ng0p+Y2FdM0QeWXXNrME+xKg2jMNRBZm492LGAzXC 6b01XZur09B5y8fmryptG0dCYuW/ntOBph44ePlshsiNRLg7nXoKnsQ6eJwqDh4ALE8/ gg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2ts0a26pe8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 17 Jul 2019 00:47:51 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 17 Jul 2019 00:47:47 -0700 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, 17 Jul 2019 00:47:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l5TIv9mygPlTJb8OmFoOWqwl7/bnS7K45WDjzAjq6ZfcKSnAxzo+LeKwfgWBYvrerj7mGPjckHpfb0auzThzZV91JH1wv5uWnkx8zK44xgmPQBgWEIWBfTSRt9OgXMfhbVFhkw7LP00IbomVvJAEQUnyXw/zzQTed9UXQOgt1IiybrIKabIw4atG/dcgtIqU7kimK1xyawQTxJPP/qwHvEQNcdJoTU/ACYUVgJcTqwhbVsnTXZluPddZXTCWhPHsdogJCpVlQjjEOKg5M3r6TqGxrYvgd6d6zFn3ZwLHjRp4sWnXAs/j7wQcztPiNRSHEvl76ZMTcEBGV5NH5tkPQQ== 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=Y7ahZWjBPf1/LkRT2K9r1+7hvKt3DeuI0qTuyn+Ww68=; b=Ck+XwT3C1+1XlpsSd3v8BH1p6hW23oCRh75Ed+AqU5FD5yITSY9y83ZIKVLTMjP3PZnqmvAiJu/K9rWkpyzlt2hwnCj/RQFQBPt68ELhw0cn0uv2aZQY6JoEIYU7FiOWYfFSMJrM/YatnkXHcn7XcjsP6g3mFQDp3io9JRs89VocHl5eGFfnMZg4Ck8jHtQxErNSxcXiJhSdkFxuAMt0jqqkXJQjy3WmaWuiUwhq9/cUTVxtlRr0sgnwo3FC2kNEfSvq3C6M9kVgk7jAsapvpB6tdKZHFmYtP+QpkfvtDmz/fgeE3arg9yJaeZJghV+lcj6gdAonRG+N50MzuYHbmg== 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=Y7ahZWjBPf1/LkRT2K9r1+7hvKt3DeuI0qTuyn+Ww68=; b=PapC3+QecXYuBVuFlISMcpwObIa0XZAhdUujAffW8O5tDmd7Xk/gqhPuEVcfqwRsoaXLJGc9+ajTSB3VmFiL/k0s7SMUbMrXmAqLejvB3Z44+yOiqU8NtUEclSyLEYBihQwcGODKye5YLz5yyymb+RJ4hPhj2VWObwgitoco1UU= Received: from DM6PR18MB2427.namprd18.prod.outlook.com (20.179.104.21) by DM6PR18MB2459.namprd18.prod.outlook.com (20.179.104.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.13; Wed, 17 Jul 2019 07:47:46 +0000 Received: from DM6PR18MB2427.namprd18.prod.outlook.com ([fe80::657a:5df9:1fee:f4d4]) by DM6PR18MB2427.namprd18.prod.outlook.com ([fe80::657a:5df9:1fee:f4d4%4]) with mapi id 15.20.2073.015; Wed, 17 Jul 2019 07:47:45 +0000 From: Nithin Kumar Dabilpuram To: "Hyong Youb Kim (hyonkim)" CC: David Marchand , Thomas Monjalon , Ferruh Yigit , Igor Russkikh , Pavel Belous , Allain Legacy , Matt Peters , Ravi Kumar , Rasesh Mody , Shahed Shaikh , Wenzhuo Lu , Qi Zhang , Xiao Wang , Beilei Xing , Jingjing Wu , Qiming Yang , "Konstantin Ananyev" , Alejandro Lucero , Andrew Rybchenko , Maxime Coquelin , Tiwei Bie , Zhihong Wang , "Yong Wang" , Jerin Jacob Kollanukkaran , "John Daley (johndale)" , "dev@dpdk.org" Thread-Topic: [RFC PATCH v3 3/3] drivers/net: use unmask API in interrupt handlers Thread-Index: AQHVO/XQd13OE3Web0ShjYV5Ot4qfKbOUlCAgAB5vwA= Date: Wed, 17 Jul 2019 07:47:45 +0000 Message-ID: References: <20190716164424.16776-1-ndabilpuram@marvell.com> <20190716164424.16776-3-ndabilpuram@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-imapappendstamp: DM6PR18MB2427.namprd18.prod.outlook.com (15.20.2073.000) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4c22cb9a-bd1a-4ce3-4db6-08d70a8b0eb9 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:DM6PR18MB2459; x-ms-traffictypediagnostic: DM6PR18MB2459: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 01018CB5B3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(136003)(346002)(366004)(376002)(396003)(13464003)(199004)(189003)(256004)(52536014)(71200400001)(81156014)(81166006)(4326008)(8936002)(5660300002)(71190400001)(6246003)(478600001)(66066001)(99286004)(66476007)(66556008)(64756008)(66446008)(66946007)(7736002)(25786009)(9686003)(486006)(53936002)(55016002)(6916009)(6436002)(76116006)(229853002)(68736007)(86362001)(54906003)(55236004)(76176011)(26005)(14454004)(7696005)(446003)(2906002)(11346002)(6506007)(316002)(7416002)(476003)(102836004)(33656002)(74316002)(8676002)(6116002)(3846002)(305945005)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR18MB2459; H:DM6PR18MB2427.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: iuzNwnOchuqdzuYGG09m3OyEtVbUIi4ZCGm075wLg+DzTD1z1YlkCPHNYZWjd8/4GBvbRO07B5tP2egJGYzOwC71mSDf2XzDbdbiEp4u9PyrIBGhMObG6kjX2UKJIL9WvgKUPC5jtW10/X8r3R4GGB7yNv29SOLiLP6YPawZx5Fk0wp415Phti3o9q7syTnRJk4eVKmnuUF5l8lX4goyF8oHFW4kQqgtn2OHaEhLqK5x+CnSW3Ry8FOJjVICw8/b2HuT+x5Hs652ZUFDESx4z4N27grceLurTPrfNHfVwKsqr27oLPwBlWXUpVdfNUIINN7O8X6jI0BC+wleVMK5OiWy9uSLhQ+hxVDWSL1BaO8OxmtdNJBvMRFA+68o+/BmzndnWmyLljTvLUb1G81CHp3ShSJuiktBavCrIE7SA0c= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4c22cb9a-bd1a-4ce3-4db6-08d70a8b0eb9 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2019 07:47:45.6683 (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: ndabilpuram@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB2459 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-17_02:2019-07-16,2019-07-17 signatures=0 Subject: Re: [dpdk-dev] [RFC PATCH v3 3/3] drivers/net: use unmask API in interrupt handlers 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, Jul 17, 2019 at 06:01:47AM +0000, Hyong Youb Kim (hyonkim) wrote: > > -----Original Message----- > > From: Nithin Dabilpuram > > Sent: Wednesday, July 17, 2019 1:44 AM > [...] > > Subject: [RFC PATCH v3 3/3] drivers/net: use unmask API in interrupt > > handlers > >=20 > > Replace rte_intr_enable() with rte_intr_unmask() API > > for unmasking in interrupt handlers and rx_queue_intr_enable() > > in callbacks of PMD's whose original intent was to unmask interrupts > > after handling is completed if device is backed by UIO, IGB_UIO or > > VFIO(with INTx). > >=20 > > Signed-off-by: Nithin Dabilpuram > > --- > >=20 > > v3: > > * Change all PMD's that use rte_intr_enable() in > > rx_queue_intr_enable() or in irq handler to use > > new unmask api. > >=20 > > drivers/net/atlantic/atl_ethdev.c | 2 +- > > drivers/net/avp/avp_ethdev.c | 2 +- > > drivers/net/axgbe/axgbe_ethdev.c | 4 ++-- > > drivers/net/bnx2x/bnx2x_ethdev.c | 2 +- > > drivers/net/e1000/em_ethdev.c | 4 ++-- > > drivers/net/e1000/igb_ethdev.c | 6 +++--- > > drivers/net/fm10k/fm10k_ethdev.c | 6 +++--- > > drivers/net/i40e/i40e_ethdev.c | 2 +- > > drivers/net/iavf/iavf_ethdev.c | 2 +- > > drivers/net/ice/ice_ethdev.c | 4 ++-- > > drivers/net/ixgbe/ixgbe_ethdev.c | 6 +++--- > > drivers/net/nfp/nfp_net.c | 2 +- > > drivers/net/qede/qede_ethdev.c | 8 ++++---- > > drivers/net/sfc/sfc_intr.c | 4 ++-- > > drivers/net/virtio/virtio_ethdev.c | 16 +++++++++++++++- > > drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +- > > 16 files changed, 43 insertions(+), 29 deletions(-) > >=20 > [...] > > diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c > > index 1a7aa17..5484d31 100644 > > --- a/drivers/net/nfp/nfp_net.c > > +++ b/drivers/net/nfp/nfp_net.c > > @@ -1412,7 +1412,7 @@ nfp_net_irq_unmask(struct rte_eth_dev *dev) > > 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); > > + rte_intr_unmask(&pci_dev->intr_handle); >=20 > I mentioned this part earlier. The comment suggests the driver really > needs to clear Mask bit in MSI-X Table, if MSI-X is used? > rte_intr_unmask() + vfio-pci does not do that. The maintainers should > say something.. >=20 Ok, if this comment meant that rte_intr_enable() is a must even with VFIO-MSIX, then I can leave it as it is with rte_intr_unmask(). If it for MSIX interrupts via IGB_UIO, then rte_intr_unmask() will work. > [...] > > diff --git a/drivers/net/qede/qede_ethdev.c > > b/drivers/net/qede/qede_ethdev.c > > index 82363e6..6648139 100644 > > --- a/drivers/net/qede/qede_ethdev.c > > +++ b/drivers/net/qede/qede_ethdev.c > > @@ -248,8 +248,8 @@ qede_interrupt_handler_intx(void *param) > > if (status & 0x1) { > > qede_interrupt_action(ECORE_LEADING_HWFN(edev)); > >=20 > > - if (rte_intr_enable(eth_dev->intr_handle)) > > - DP_ERR(edev, "rte_intr_enable failed\n"); > > + if (rte_intr_unmask(eth_dev->intr_handle)) > > + DP_ERR(edev, "rte_intr_unmask failed\n"); > > } > > } > >=20 > > @@ -261,8 +261,8 @@ qede_interrupt_handler(void *param) > > struct ecore_dev *edev =3D &qdev->edev; > >=20 > > qede_interrupt_action(ECORE_LEADING_HWFN(edev)); > > - if (rte_intr_enable(eth_dev->intr_handle)) > > - DP_ERR(edev, "rte_intr_enable failed\n"); > > + if (rte_intr_unmask(eth_dev->intr_handle)) > > + DP_ERR(edev, "rte_intr_unmask failed\n"); > > } >=20 > I thought you were going to remove rte_intr_enable from this handler > altogether. >=20 Here again, if it was done for case of IGB_UIO with MSIx, then I think it is needed. If maintainer confirms that it is not needed in this i.e qede_interrupt_handler(), then I can remove this unmask. > [...] >=20 > Thanks. > -Hyong >=20