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 4191842B8F; Wed, 24 May 2023 19:06:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2832D40156; Wed, 24 May 2023 19:06:09 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2049.outbound.protection.outlook.com [40.107.93.49]) by mails.dpdk.org (Postfix) with ESMTP id 6B426400EF for ; Wed, 24 May 2023 19:06:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WloTguNNhSihjVSF/aif085pP2VZfqtNwnDFjKPqto6hmDqn7kxIO72FqsoF+95yzFSYaYGG3NJRABTt5VNO8jstpE/KGW/EV2993Zs7mwPJ4n1a++mLG3nSA+Lofirk03o3zuW5J9OuHK3K7kfavJZ1m4uAIqqypp5tlbAqL3oJOtLQmjNf7dpkoWPOlKSeBoCpa6vMyrbVzpv7jlt1f4k6s1tO+p0Pcd526hgmUIa6jO3XDcV/s/0V2WjmRR5lczZ4i5Sjf3/rhrsTfcEWwOReJxg2jTcgIIewePpaSmNN47/3rC4l/8Dhs14nMStVjsGu6NrkDST30F5two/gCQ== 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=sYt/iUt6r+dO1PuXvKnUB3RNIKSlIVQuhIS4CSOFfhY=; b=jn0F9qeHq8UeLMe/Yw3YQ6OCzclesvoeMrME5KBxzTmZYHbQzuExUUAOOYREgp+QtZq/Wg/1Y+w+fCHVf4W1MLK6VD6NH6Z3El81/CROlpmJVF1nTm+x7wL/8WkJzGu57AZIiOpIG5WqQNng9daBHOVD5l8aK2nOzBGFatYGhtAo+oELpuRpG2xbiL9dm+keXqDnnjpprAsu9zgVGryJF7fFGsXCW5dFTJRofwnkTr/0JdYH/ZZDJVyfDeqbCGbJPZ7PLLUBGgjB0ylYLm9FviogpNPDYUDnVZ/SIEDsxV7Hgx2fFJLt1lktMgFzddNZkkOE+ymH+ne+lsAkAIn/wA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sYt/iUt6r+dO1PuXvKnUB3RNIKSlIVQuhIS4CSOFfhY=; b=qvCXzU3N22vld1s6vPhCMX34UiLpEHTXb6GJ/DCLeBL50LaOuKSM0HikvTu/uGqkc6761msNvLmBd7Jm1oA8kFzPArZpCMvRYj+BWBWtADB/SIJTg+edeFsp++W+gP0vUE4SBGYc40PbjM+Ey8oA9YaEu6mOPnG2/FwsLwJGgIo= Received: from CH3PR12MB8308.namprd12.prod.outlook.com (2603:10b6:610:131::8) by DS0PR12MB8562.namprd12.prod.outlook.com (2603:10b6:8:164::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Wed, 24 May 2023 17:06:05 +0000 Received: from CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::4e4f:3a93:b7bd:489c]) by CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::4e4f:3a93:b7bd:489c%5]) with mapi id 15.20.6433.015; Wed, 24 May 2023 17:06:05 +0000 From: "Gupta, Nipun" To: Thomas Monjalon CC: "dev@dpdk.org" , "david.marchand@redhat.com" , "Yigit, Ferruh" , "Anand, Harpreet" , "Agarwal, Nikhil" Subject: RE: [PATCH v4 3/4] bus/cdx: add support for MSI Thread-Topic: [PATCH v4 3/4] bus/cdx: add support for MSI Thread-Index: AQHZgZ7hr634xJ6+5E62CIju1Vfelq9pXGKAgABj6sA= Date: Wed, 24 May 2023 17:06:05 +0000 Message-ID: References: <20230124140746.594066-1-nipun.gupta@amd.com> <20230508111812.2655-1-nipun.gupta@amd.com> <20230508111812.2655-4-nipun.gupta@amd.com> <18120073.sWSEgdgrri@thomas> In-Reply-To: <18120073.sWSEgdgrri@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=2c023976-2d68-4008-beed-797546ca1c94; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-05-24T17:04:15Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH3PR12MB8308:EE_|DS0PR12MB8562:EE_ x-ms-office365-filtering-correlation-id: 1c831536-ef59-4177-5bb4-08db5c7928fb x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fJ6NqZ1N9o9KxaUnCLDvOgW+mXvFHQBiwyZwoIbiwIUEsNzgtDFSr6e7qOB0z5wkSLE8cB2g7Yqbfhx+/OATsbehEpgRrjb7TWZFTlsNFA/sJ9HtMD3AUna1LLfrYPJEhQgxrvZZhYctA0KEGxw4Teh1LPgG6o9zNiznCqy6KfdS2zVORdIA/6VNqV12U3Z0f4rUjDZx8UlnHveX/cd8s1uzPhSwWMAAuxLcAOxnNkescwzHhttFh+eagVxxyMIcdkiLkLOYDX9VU1sbucBX+tlP0c7NKARozqApEtABYQ7iMMG91Ww21ukaWSsHzWrPFsL/xnSgF9Imw642/K6vn74w+ecQBliNQqCpzhGbnb+/mV7/awG9zYdAK42Ozrj6Tp6RcBPKkayeFR2G9BGy5UoBDCQAUMWC+2ON0G9wSiviEDc3ZlNidE98NUSta2WDxj/Pi+A8mdQDK7MTBMYwUB+NGJmZnW4uq3H4grmuTuYs4T1ZZ1JQNyBWB9lhtI2uxhrKrxmpmjO6VFHla3+7ZQ1fP+yJ3gZJg2hPAIA/0qK2FG7gKdIyUzvx1PEzukfQ/ILWzHugAaBEQYZIyphkk8LtUgcN4DYdnxey/Jv6FfQORJTq7A4tk39DZlgxNOBS x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH3PR12MB8308.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(396003)(366004)(39860400002)(136003)(376002)(451199021)(2906002)(83380400001)(186003)(86362001)(33656002)(38070700005)(122000001)(38100700002)(55016003)(316002)(7696005)(71200400001)(41300700001)(8936002)(52536014)(8676002)(5660300002)(478600001)(54906003)(76116006)(64756008)(66476007)(6916009)(66446008)(4326008)(66556008)(66946007)(6506007)(9686003)(53546011)(26005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/wzFAOk2ju5Mw+liUwrKTOv0zrzc7Q64mlkNS1wiVbw5tMJegzZiB2W1A/+C?= =?us-ascii?Q?Up7Blf9fvFi+F7qJYBleD/DZcKOT1HXUitzhFUg6b/zCIlvtxd5INZqDYUcZ?= =?us-ascii?Q?uwVsV8F4DUngF+N+zzhepJsOoR+eymQMuYWIgS2l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mwWaEw/IzhpOwLazgc9qoyzT4Sys8NcBJLwlhs9c06jE12?= =?us-ascii?Q?G5I0bC6t7Yvrt2k7z9kwEYUsHMURPqgU+nzE7IQf84kHGmAtukqWTKyClo24?= =?us-ascii?Q?oEJgZ0uf0K19PGpbhrSlE3UJRp3oBQ9uNNjgqX16YzUa4Hsc0HtQkg0amUbM?= =?us-ascii?Q?gFWEn2Xdx0JBbDJlw+42ZjtrxgtEUHOHWMmdBXOtHGUq2zYawROoOL9Bgs1m?= =?us-ascii?Q?l2dNqAosD2xj9IAMlYPBTCaafENkUJyCM598T67QIvp7rHBddbOvnzP3CcCY?= =?us-ascii?Q?+J64Gq7W1R7uc6b4jK0MwDArdp+/xo59sBPAYVo+ngBSnkjc5+RjrF67yuoC?= =?us-ascii?Q?AdbVct0tm/CmMNbs9WgeZpRxFsVkiIJVg92rl9kVSo7ea8xx8wb4Dbw7TM/E?= =?us-ascii?Q?T2kCFB4cMOUOCM4JUZ/M0UUF0QNEvyvcqYD5giHgwBgGpXlRtALe07e5C+by?= =?us-ascii?Q?RcBOicpE+vwUYq30sUDLpqS6SqvKFQAfY/NNjCIV+k638QmhIxiiE2/chxEI?= =?us-ascii?Q?mfl99lNoJPLII7WN1hw=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB8308.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c831536-ef59-4177-5bb4-08db5c7928fb X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2023 17:06:05.1234 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ir6guFNjeiRWblTbcclX06hP6a8eLhnROc0buCNPQzQKaMdP5/KNoY9idJeQIkNc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8562 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 [AMD Official Use Only - General] > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, May 24, 2023 4:37 PM > To: Gupta, Nipun > Cc: dev@dpdk.org; david.marchand@redhat.com; Yigit, Ferruh > ; Anand, Harpreet ; > Agarwal, Nikhil > Subject: Re: [PATCH v4 3/4] bus/cdx: add support for MSI > > Caution: This message originated from an External Source. Use proper caut= ion > when opening attachments, clicking links, or responding. > > > 08/05/2023 13:18, Nipun Gupta: > > MSI's are exposed to the devices using VFIO (vfio-cdx). This > > patch uses the same to add support for MSI for the devices on > > the cdx bus. > > > > A couple of API's have been introduced in the EAL interrupt > > framework: > > - rte_intr_irq_count_set: This API is used to set the total > > interrupts on the interrupt handle. This would be provided > > by VFIO (irq.count) for VFIO enabled devices. > > - rte_intr_irq_count_get: This API returns the total number > > interrupts which were set. > [...] > > --- a/lib/eal/common/eal_interrupts.h > > +++ b/lib/eal/common/eal_interrupts.h > > @@ -16,6 +16,7 @@ struct rte_intr_handle { > > }; > > uint32_t alloc_flags; /**< flags passed at allocation */ > > enum rte_intr_handle_type type; /**< handle type */ > > + uint32_t irq_count; /**< IRQ count provided via VFIO = */ > > Why only via VFIO? Though this represents total number of irq count, for VFIO it is returned b= y VFIO_DEVICE_GET_IRQ_INFO ioctl call. I am not sure about UIO, so added Comment w.r.t. VFIO only. I will make it generic in next spin. > > [...] > > +/** > > + * @internal > > + * Set the irq count field of interrupt handle with user > > + * provided irq count value. > > + * > > + * @param intr_handle > > + * pointer to the interrupt handle. > > + * @param irq_count > > + * IRQ count > > Please write IRQ all uppercase consistently. > Same for CDX. Sure. > > > + rte_intr_irq_count_get; > > + rte_intr_irq_count_set; > > Adding a new API in EAL deserves a separate commit with a different audie= nce. > It looks like it has been hidden from EAL reviewers eyes so far. Will make a separate commit for this. Thanks, Nipun