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 B471BA0471 for ; Wed, 17 Jul 2019 08:01:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A1FFF2BF4; Wed, 17 Jul 2019 08:01:53 +0200 (CEST) Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80]) by dpdk.org (Postfix) with ESMTP id CF40C2BF4 for ; Wed, 17 Jul 2019 08:01:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3343; q=dns/txt; s=iport; t=1563343311; x=1564552911; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=BjprdMnKEAwPEWlUkYxAXarKWFJYGijB0ZS/VPiVD3w=; b=Zg+6PTgthtOximcNzJ4fCEYQpLI2pP263hZSP/rjKFCJefdfBjWebK2g d/N/9M0TnMNQikg65NOGgxqVaEUhpmlUfSE5hE9brjB/n9VMu/zAEkOBg 91hF4XmqgHHXSm6vVQDVQdMZZXG+x65DCecuEybMjymZqK2TSqrCtv0Zk w=; IronPort-PHdr: =?us-ascii?q?9a23=3AXgqf0h/q7vTKsv9uRHGN82YQeigqvan1NQcJ65?= =?us-ascii?q?0hzqhDabmn44+8ZB7E/fs4iljPUM2b8P9Ch+fM+4HYEW0bqdfk0jgZdYBUER?= =?us-ascii?q?oMiMEYhQslVc6UDkv4LfvCZC0hF8MEX1hgrDm2?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DJAQDiuC5d/5RdJa1mGwEBAQEDAQE?= =?us-ascii?q?BBwMBAQGBZ4FEUAOBQiAECyqHYwOOToJbl1CCUgNUCQEBAQwBAS0CAQGEQAK?= =?us-ascii?q?CPSM4EwEDAQEEAQECAQVthTwMhUoBAQEBAxIVEwYBATcBCwQCAQgOAwQBAR8?= =?us-ascii?q?QMh0IAgQBDQUIGoRrAx0BoWUCgTiIYIFwM4J5AQEFgQUBAYQJGIITCYE0i18?= =?us-ascii?q?XgUA/gRABRoJMPoRGJIMXgiaMHIoHlEQJAoIZlCeYCo01l1ACBAIEBQIOAQE?= =?us-ascii?q?FgWchgVhwFYMngkEMF4NOihwBNnKBKY0NAQE?= X-IronPort-AV: E=Sophos;i="5.64,273,1559520000"; d="scan'208";a="511295296" Received: from rcdn-core-12.cisco.com ([173.37.93.148]) by rcdn-iport-9.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 17 Jul 2019 06:01:50 +0000 Received: from XCH-RCD-006.cisco.com (xch-rcd-006.cisco.com [173.37.102.16]) by rcdn-core-12.cisco.com (8.15.2/8.15.2) with ESMTPS id x6H61oYI006480 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 17 Jul 2019 06:01:50 GMT Received: from xhs-rtp-002.cisco.com (64.101.210.229) by XCH-RCD-006.cisco.com (173.37.102.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 17 Jul 2019 01:01:49 -0500 Received: from xhs-aln-001.cisco.com (173.37.135.118) by xhs-rtp-002.cisco.com (64.101.210.229) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 17 Jul 2019 02:01:49 -0400 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (173.37.151.57) by xhs-aln-001.cisco.com (173.37.135.118) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 17 Jul 2019 01:01:49 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E0iPKEcP6sEMcqlOHzMnjvvdIO38bdm7wLyivUhEYjWv6xyQzPkm4DYO0gBhudaOCXxbmQOYX2cgC3M7/1BweEsQ0SFn8CSCNpXoKK2XQdpsnoSw4ZbLd/o+HwMhof8tzZEku3hCijodi5m6+b7q5VNNIFEiAuML9HMo3lPSCMit1lM4MbNOR2nkh4vBHw7+dvsFz693Xc5a7cpCIip+cA/ApxJ/xNGh33/20igwIBLktJe33/EXGJbt+lTTlGD2P+263isF+bwhjI6mXenMlRYCp7JTzqCkbXAHX56vP341VmYf6817Hfyp3d0y2KLa19XNSn41eBqkJSbM5UMbAA== 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=vAEGg4eSOy6+7Dih1ucyxywPznh75DouVrsC6uA49tA=; b=UoCkbv+WpqivBACBlPgFx6lIU57uOCTCo51v1rMf/PKaNVx8i5+valUuQIlHcPyP8RiyjcXuZ5p0HExr6TVIG9Rp/mu/fY/FgtwpXePogZXdmUnC9PtQnCbifsC4Hga5kxEhhBHHgZKi+tCF4lN0kWD9/dMDmyVxEWj9vX3sJ6w8+Gtre98d/sOPqxZxjxdbJwQOPCSLaFCXMEKeSsltVaABrHgiTLr+voWhxfSleNgCEW9OLS+id4naJ7Fl9R5e10anYwUq5xYXOEnQPgFa2GRRn83AncHF2GlvkHaEzY/5sCfVOlZWZSeFOfdFf4Ziut07f9KLci7vIWa7MaFq8w== 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=vAEGg4eSOy6+7Dih1ucyxywPznh75DouVrsC6uA49tA=; b=oHDTPZX82s2ze/ksK/rYFTYt4SxM9pm3WHBh1fZih61z18Lp3cy26ti6b/6Ldh/1aZmoMid+J+l7VCYcArSq4ruv0+gusoJCLPEtiBf0xZbIdgKYWOJnyWhJz3ZsvsDl7bFdN/v430OrGDbYCMj+7jlM2vB0QCUdtJMTZu1OvD4= Received: from MWHPR11MB1839.namprd11.prod.outlook.com (10.175.53.12) by MWHPR11MB1837.namprd11.prod.outlook.com (10.175.53.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.11; Wed, 17 Jul 2019 06:01:47 +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 06:01:47 +0000 From: "Hyong Youb Kim (hyonkim)" To: Nithin Dabilpuram , 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" CC: "jerinj@marvell.com" , "John Daley (johndale)" , "dev@dpdk.org" Thread-Topic: [RFC PATCH v3 3/3] drivers/net: use unmask API in interrupt handlers Thread-Index: AQHVO/XTka6U9siSAE21qK+CB2h8LabOULmg Date: Wed, 17 Jul 2019 06:01:47 +0000 Message-ID: References: <20190716164424.16776-1-ndabilpuram@marvell.com> <20190716164424.16776-3-ndabilpuram@marvell.com> In-Reply-To: <20190716164424.16776-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: 0a3cb5d9-ec57-42f7-8aea-08d70a7c4102 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:MWHPR11MB1837; x-ms-traffictypediagnostic: MWHPR11MB1837: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 01018CB5B3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(346002)(39860400002)(376002)(366004)(136003)(13464003)(189003)(199004)(316002)(6116002)(110136005)(54906003)(14454004)(7416002)(76176011)(6506007)(53546011)(7696005)(46003)(229853002)(102836004)(186003)(99286004)(25786009)(4326008)(9686003)(33656002)(55016002)(53936002)(478600001)(6246003)(68736007)(8676002)(71200400001)(71190400001)(81166006)(81156014)(486006)(7736002)(74316002)(476003)(6436002)(446003)(2906002)(64756008)(86362001)(256004)(11346002)(66946007)(5660300002)(66556008)(52536014)(66446008)(305945005)(76116006)(8936002)(66476007)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1837; 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: +lvwsUVKiOfE01xeOqI4YYvx/BeD4evMNTeeGuK5vSs094W/g3SjwhK7JPw9F+Uw680BStwJElD7umMQLgWHNfveRPdewN1dCEGRSqhW/WW78iwStRgdiJE8DwrR2NEfUjkI6kdoK+Y5RliQXo6r70lVirNQ4pZr8hrdOzYaL0nIArjC3CrLSHNosnsYwTqFuo4+y4G3LfvtgeLlReiY7b/AItwRzO+/Vyutl6XWv3Cbn+X9iE/WRQgISGTmhLqTWWjQzgdun+SmILgd7OunFwsvL/P4gPyk2d9tCIZl/EdY+824nwEGyHeCqTNQSIz197neQlhbN+epQHqjkLMAX6oBEQnWHnFK56j/2aP5iOh8j7MHNX9i7pvU7apyGKTIXFXkvvoJBSzics5ondwrikNhAHoNzvsD0QT9ysUYnm0= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0a3cb5d9-ec57-42f7-8aea-08d70a7c4102 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2019 06:01:47.5960 (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: MWHPR11MB1837 X-OriginatorOrg: cisco.com X-Outbound-SMTP-Client: 173.37.102.16, xch-rcd-006.cisco.com X-Outbound-Node: rcdn-core-12.cisco.com 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" > -----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); 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.. [...] > 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"); > } I thought you were going to remove rte_intr_enable from this handler altogether. [...] Thanks. -Hyong