From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06D69A0032; Fri, 29 Oct 2021 11:38:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA13D410E1; Fri, 29 Oct 2021 11:38:51 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id A7092410E0 for ; Fri, 29 Oct 2021 11:38:50 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19T9QeOT020169; Fri, 29 Oct 2021 02:38:49 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by mx0b-0016f401.pphosted.com with ESMTP id 3c06huhus7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Oct 2021 02:38:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=io1+C+C8d2zUppJBLpgyxztGUrgafLDKvq3wSIbXJqGjnjOG4luotw0mW/y+TYTijgRUEKu2jdLHnt0MuRig2C+zvH53OHk60/f5jNKKWHy7MPmBHII0eQhxJo+O8YvRi4/lONxHaMgIRlii4sDgds1OD5pzw07oY0A3cikXdAcvRDlWK7ohv4wb+St7ML6DpsW24XiigpCbqExu4X8DWRq7zgs9Uusi5joTEV9ujzUax3GhlGqmhOdGu4Mk5dH8PnKCaTvQfemFC3nN9X5cQgJFD7JliYkhwN79PC1oUsGqwTT8rB3L3O3nesZuDlDDYBW9ulYdT2I3tgzm/fQdLQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qH0VRiJdta+Xmj2nOsiGqKnns7Ufzlp2czeC9jsELj4=; b=iFZq6fFBZWgTIVfPWtlVRw+zp4VZIoi4EB2ft5D6DnQ5uGgBmkupINtOVfHzOBmAZmZuHcfeSNBBYXOqfHF3utpGOC8OfoDs52zf0cZvHLTAaC2eLPZEfXUl/V1dSdIB2AjzOR/OMUdJT2vblEZG8UwkZoBh83mggecFnmqPV6Cel/DZ23VTtDqNn4bh7npn8ZKJ258DfKeSfk5ojXDxqtSCq1Og8r3jchL+lJqknYns+h+uRV098AmTpe6xVAMUQPWPGqmHNPRbBdB9PyC8Kzm3ku6MeeZLzl13/WPbQj8F5OZpOd49vFo7Mn6pLpFjMRLLoyyp6dWhIM56yBEzDA== 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=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qH0VRiJdta+Xmj2nOsiGqKnns7Ufzlp2czeC9jsELj4=; b=MJS6e6s4qLgIdAaKSeLxK+ui9dlV+q2k/KAQpif+6zke7RLpfXLcBGlUTyemF05vAni1kAMVh8AgC61OF32SA37mD1+FRL4MXHEMGgU+LJZlgkREjUZsz/4rjKd7+w/t1CEW0GArWLPADtEv7kSYxu4ptKGVEdDW9LBBVmlu+O4= Received: from BN9PR18MB4204.namprd18.prod.outlook.com (2603:10b6:408:119::18) by BN6PR1801MB1891.namprd18.prod.outlook.com (2603:10b6:405:66::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Fri, 29 Oct 2021 09:38:25 +0000 Received: from BN9PR18MB4204.namprd18.prod.outlook.com ([fe80::29f4:8e3d:264f:26b1]) by BN9PR18MB4204.namprd18.prod.outlook.com ([fe80::29f4:8e3d:264f:26b1%8]) with mapi id 15.20.4649.015; Fri, 29 Oct 2021 09:38:25 +0000 From: Harman Kalra To: David Marchand , "dev@dpdk.org" CC: Anatoly Burakov , Dmitry Kozlyuk Thread-Topic: [EXT] [PATCH] interrupts: do not resize event list for non MSIX Thread-Index: AQHXzJgPgnjV619F4Eezetk/VIGxl6vpuAOw Date: Fri, 29 Oct 2021 09:38:25 +0000 Message-ID: References: <20211029073819.29336-1-david.marchand@redhat.com> In-Reply-To: <20211029073819.29336-1-david.marchand@redhat.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 531227ba-35f3-46b9-fdc9-08d99abfdb11 x-ms-traffictypediagnostic: BN6PR1801MB1891: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Rxkv3YIvSyjm9IUPatEQa5e+m7OuV2WtwIJqpuNJe9DOPWsS6LYeMSaIIaB3hOjZtcE9gburVuBmz9SxtY4PliFk4T6NbHnMRfs1AARxrvSVsoKlpn19xImvz9Gm1dlMUnGbmKJK52eqJr8hi5FJ4q67Gr6ISxyughcR2geAJvC7mSKs2d0SZPYzof0M3NGzD7XFo7HZtrIcnY7pIekW9e8fiDYuxJZBo9UCBNMOcXt87MfO6zVIuG2IHz3llyQoCPWXtTbcUeM5EDabhCPHRtIayLB+yuRgUIz4nSgK2TFoiJNklIaH3hPvDR1t8fO/uxoYzb5RKJrVPoY/q9p/HJwJmNJOXZK6fz7vGncDn80i3k/pIzr2E7WlUOax9+eQeXStfDCUdnHfq3aKBncJp/dmYp97tNzcm4hsCSHfEbJetEKUHUdl7uvaBOeUiBeWiuEspnVv6zn7ygphh5MrqUh4UW29D5XJ5cHAAzLXzYyR6CYnsRaew6elZeITmEh6SkzlDquA1+X12vlQhuJugPmhh7Th2bqe+j1ypgc1R84GwWSRUu4dPjg/+Niv3f42Pluj+h3Krq3q5zZx6Yq8KCiWUcmgXcVEce4yhS/CV0Vn0DwBHBSyBAKUJ8uRyC7Q28x9B5T7KPftafpMZcce8AeC/OgOWK9djfwapnqs51GaRyBLl4t+4s8AbibieJYFIzzdL1rTQQuUP1Nag7JDAQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR18MB4204.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(83380400001)(186003)(122000001)(6506007)(38100700002)(8936002)(54906003)(71200400001)(33656002)(4326008)(2906002)(508600001)(53546011)(55016002)(8676002)(66446008)(9686003)(86362001)(66946007)(64756008)(26005)(7696005)(76116006)(66556008)(52536014)(66476007)(38070700005)(110136005)(316002)(5660300002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?bjN/C10SGyEbdBJdcBhc6jBB9TBSa6uuYFpoFAq8Jz7AKO46JT9ixTfY3ovI?= =?us-ascii?Q?ZVeMGYzRFP8WCPea5GahpBL+uda+GMMLZuoraIjg76riMgmvluFXtwhxnYiI?= =?us-ascii?Q?Io+9pFihv+LNArG0aP+88BsGD5rAvEUNaT/veYVgm6kz7Ad61Out7yC8EVQM?= =?us-ascii?Q?hTJRAhmaX1hm8+cX4XDptPmUIHIBY2/1CZuXPprFGeoeA1Y97bMkLd8iRuUH?= =?us-ascii?Q?67Y02Puv5+4fgU+9TZ/Wq8ofAfGjpL61H6jOUQynhOfu+1CRSPb6FvN3RuAx?= =?us-ascii?Q?ZKdTF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Og?= =?us-ascii?Q?zCpBtzJ1nzSXoO7ldjblwTBnB9mzZsMx2sXSjaQCrUvRL1/5Zesq1iamgDvk?= =?us-ascii?Q?RHx8GYItZq26src8TnbXpCymDBKd4l9u0cNMg48GCjhYG5+sdkU13UbPcCWY?= =?us-ascii?Q?bxKGuAxur7S7kqDrE5lwxp0oyj6v2tMdSSewKrpT2aiXJgbX2cwQGmuDlK/0?= =?us-ascii?Q?BMxTxJ41Ul1D9BgxfHsceELWbRhTvgr6k7kU9pakIKAC3fihnSyVgC6shrjv?= =?us-ascii?Q?l3PtMKF27W/YkKdiOqBU2x4nPA5gWay7lU0Z4Q0eJm59C7zQEenYAa8R+rXC?= =?us-ascii?Q?ATN7B7UYNUdcMybs462l9qaD5wK9qFKcgkSZ53X+S70DEZbWFOIfDXPFddpe?= =?us-ascii?Q?OfaeWmbkAmlAsFm4DyVorw6Y+YkPMcsgxrcbTweTS6kSXv3v0pkn7IhG79wR?= =?us-ascii?Q?iQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR18MB4204.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 531227ba-35f3-46b9-fdc9-08d99abfdb11 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2021 09:38:25.4107 (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: 8VXt3dPRB9u2YHeov1ZmGDbhMHhWDYbrFOxPdnq0FEnnng2TvliXHca4u5chD+3xSXgcYMEltRBfm/xB4Weq0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1801MB1891 X-Proofpoint-GUID: n7x8g6RfND8TUVxsbyQRMs332sWvEvwH X-Proofpoint-ORIG-GUID: n7x8g6RfND8TUVxsbyQRMs332sWvEvwH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-29_01,2021-10-26_01,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] [PATCH] interrupts: do not resize event list for non MSIX X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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: David Marchand > Sent: Friday, October 29, 2021 1:08 PM > To: dev@dpdk.org > Cc: Anatoly Burakov ; Dmitry Kozlyuk > ; Harman Kalra > Subject: [EXT] [PATCH] interrupts: do not resize event list for non MSIX >=20 > External Email >=20 > ---------------------------------------------------------------------- > Resizing event list only makes sense in MSIX case. >=20 > Besides, event list has always been RTE_MAX_RXTX_INTR_VEC_ID large. > Let's restore this assumption for code that might rely on this property a= nd > only enlarge the event list when necessary. >=20 > Bugzilla ID: 843, 865 > Fixes: 8cb5d08db940 ("interrupts: extend event list") >=20 Thanks David for fixing this. Acked-by: Harman Kalra Thanks Harman > Signed-off-by: David Marchand > --- > drivers/bus/pci/linux/pci_vfio.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci= _vfio.c > index f622e7f8e6..edcee92556 100644 > --- a/drivers/bus/pci/linux/pci_vfio.c > +++ b/drivers/bus/pci/linux/pci_vfio.c > @@ -266,12 +266,6 @@ pci_vfio_setup_interrupts(struct rte_pci_device > *dev, int vfio_dev_fd) > return -1; > } >=20 > - /* Reallocate the efds and elist fields of intr_handle based > - * on PCI device MSIX size. > - */ > - if (rte_intr_event_list_update(dev->intr_handle, irq.count)) > - return -1; > - > /* if this vector cannot be used with eventfd, fail if we > explicitly > * specified interrupt type, otherwise continue */ > if ((irq.flags & VFIO_IRQ_INFO_EVENTFD) =3D=3D 0) { @@ -283,6 > +277,14 @@ pci_vfio_setup_interrupts(struct rte_pci_device *dev, int > vfio_dev_fd) > continue; > } >=20 > + /* Reallocate the efds and elist fields of intr_handle based > + * on PCI device MSIX size. > + */ > + if (i =3D=3D VFIO_PCI_MSIX_IRQ_INDEX && > + (uint32_t)rte_intr_nb_intr_get(dev- > >intr_handle) < irq.count && > + rte_intr_event_list_update(dev->intr_handle, > irq.count)) > + return -1; > + > /* set up an eventfd for interrupts */ > fd =3D eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); > if (fd < 0) { > -- > 2.23.0