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 6D69542C34; Mon, 5 Jun 2023 10:06:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F45A40A87; Mon, 5 Jun 2023 10:06:14 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2057.outbound.protection.outlook.com [40.107.94.57]) by mails.dpdk.org (Postfix) with ESMTP id 7D5C14003C for ; Mon, 5 Jun 2023 10:06:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EguzK6nId4iyj1yzox3wUICakBnNE4tm4pgSTN/X4Es9k6aPvo/B+IN1b74WNr2Nu7GURYpg6hrdAN0QaHpzxpjh5oNBYpFcdKqpr3EMyjGS9rtIaGiHkoCekiQ29vGYvqUsEIi86q5n2xgYIveVHxRxEjavd+TXBmYoDNqiUDinjNjP8J3Mssdg6xKwriK7okR9KHlvaS1fNroMIYMpogiSA1eEoIk0rOh8enoodeSof6BsmmqMT17NnaKDRAF0d9VdVdakzSUjBD8W+PmVNYrStYBnk8vjQzVuwtNUGIJxib82S3Tfqs785iNK1+UQJDF/bfW2aJUsT4rxR7abJA== 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=FSqp3D7TkNvJjXlqRwIY6975B+nT4rUMGLh7lo9toTk=; b=Uvq9bujLvnNeqvkG8xOpP+V6e1tNTacd9GC8x4ac3SU4qVdywlBqAvFaPXf8LCoBNf74xh5iVf2Gz0KA+GXzbAMafj6g52H1PFIcJetrh+5YzFrLcoPazPnFumUkpEpEV28/hMTHG+2UKUMr5soTnQJYOTSEDNvVxefk/ne4CBT0yTcTK9GxbXg5KczZAsY239ybpZgzJzadvYbELUPNfrCyPKx/vUHPGjtjq/AbCf7XrHHOoCQzgs8qY29Xz/jzTl9duTGEe5BLTZzEl09uXXCggJ8fJghyhE6kcAWgmtLwFXv9bDgLFhsoF6MdjMm5FRUSIVj9NJUjZSkRg/BY5A== 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=FSqp3D7TkNvJjXlqRwIY6975B+nT4rUMGLh7lo9toTk=; b=V4AGyxLrNRtInsfJVSdajbj4+THCxo767bMNlM8pPgkhzK7KE1V7eyusfHqQeJoL7dvJvVfpqeDDp9/Zs0jM2ONzl5JQcZZZ0bNbI7lULIvY2ynahsN4ghnnI525haKn+ZeO4/DYvvOX1q4xI/9tjCUpvCKJFXSlWMXs4c2LTGI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH3PR12MB8308.namprd12.prod.outlook.com (2603:10b6:610:131::8) by IA1PR12MB6435.namprd12.prod.outlook.com (2603:10b6:208:3ad::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Mon, 5 Jun 2023 08:06:11 +0000 Received: from CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::e452:1914:1054:de79]) by CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::e452:1914:1054:de79%7]) with mapi id 15.20.6455.030; Mon, 5 Jun 2023 08:06:11 +0000 Message-ID: <1ffaf80c-53d3-662b-6860-ed6d3c75de09@amd.com> Date: Mon, 5 Jun 2023 13:35:58 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v5 4/5] bus/cdx: add support for MSI Content-Language: en-US To: David Marchand Cc: dev@dpdk.org, thomas@monjalon.net, hkalra@marvell.com, anatoly.burakov@intel.com, stephen@networkplumber.org, ferruh.yigit@amd.com, harpreet.anand@amd.com, nikhil.agarwal@amd.com References: <20230124140746.594066-1-nipun.gupta@amd.com> <20230525100821.12148-1-nipun.gupta@amd.com> <20230525100821.12148-5-nipun.gupta@amd.com> From: Nipun Gupta In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PN2PR01CA0237.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:eb::19) To CH3PR12MB8308.namprd12.prod.outlook.com (2603:10b6:610:131::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR12MB8308:EE_|IA1PR12MB6435:EE_ X-MS-Office365-Filtering-Correlation-Id: b4c99e61-b60d-4a83-3148-08db659bb9d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xGaNsDNxYPbCYCblxJmBfuKR4NKiPwB/6XVjg+qZ6a95Hbz6a1hUO45RCnwiskyHwfN0vrstY430ByoUeo9LsNoM1wE2tLgvXh08ThfhEpleVt1FD9Fv6Xz+75S1BaK9beULXuUNE1YKpluZwiAQgVg+cVS1kvqIuANsELGnuP8ZA7FqrOrg7fO3yT4PgJ6VtRP7x0PLzUZmrRQxz1+HpyR8RI6RdJxz58YiZko0BEjID5+c5MDWLu5RSAJlzB5bPhD7JNT7gYW+Xm3aRZIU+wVDNyqn+0EDnPFGA/YZ/Qx1ur0+yGeMFL+PWHwiW6NfG6WAVb4AwuuKR2V90Nq67hSTN7aMJ52PEZO+ogBYBtmbkQngaxkuJ7mxborRz/+6lum7FLLsTwIkJAiVdazQ7hyzMPXFFhcgUHdABUNRhdt0f/QNNfV+HNmgZFhHRAovK4HE3SsqP7liGbL8lMN1B5m3CghSFVkEK+BnBndAw8+2ZQut6nePH7Szd3q0g4EEZCq5QJJepJukxli3xN00fPCWXbXWsRiQ9bz+ev9A8FxptPvKZ0kMaYludKjTuqFYoU4KoVKNdPhniWu48uOLCrIgjKsg0aI2LK2DRPqo3/uQePbYjVYQHQ6QgwLIwJpxiuvvnB9nX33rFC8+VUwFjw== 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)(39860400002)(366004)(396003)(376002)(136003)(451199021)(83380400001)(44832011)(478600001)(8676002)(8936002)(41300700001)(316002)(66476007)(66946007)(66556008)(31696002)(5660300002)(38100700002)(6916009)(4326008)(86362001)(6486002)(36756003)(6666004)(2906002)(31686004)(6506007)(26005)(6512007)(53546011)(186003)(2616005)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SW56citEazVoOUpWWExLaktXN2I4eU0yeGYrTUFTemNkbFBiQVRCNWtkeW8r?= =?utf-8?B?N2RrU2J5WS9HZWZtanhjTUJpRHpjV2xXT2xTMXp6RjhDSXZqR3JuN2FDT0pB?= =?utf-8?B?dERzVmJzdGxYWG10N3FyOGRsbmlFbUtpMHZ3TmpKYVhYSk1kS1N6cTdiTDBW?= =?utf-8?B?OTJwc0xBR1psZU50M1JMb0ZMeTZzY2NrNXhBTHJUWnNnKzRMbUl5V0VOd205?= =?utf-8?B?YlpxbDBobVJWT3NuajhrdUNqTUlkUkNmNXlWZVpDNVpJZXNIWEFWNjkzZ2px?= =?utf-8?B?UktYamhkbFBsU3E1RG1hMGFnSk85ZjNES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/xuq83IKBT5pO+u6sBU7/jfr?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4c99e61-b60d-4a83-3148-08db659bb9d5 X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB8308.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2023 08:06:11.6390 (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: KcS1Ci6TapXuXNLPtX9F8xBnK2smdtwkbrMBoA2BOhSGGbgk0JHPruU2XfdZrx97 X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6435 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 On 6/1/2023 8:39 PM, David Marchand wrote: > > On Thu, May 25, 2023 at 12:09 PM Nipun Gupta wrote: >> >> @@ -116,6 +141,18 @@ cdx_vfio_unmap_resource_secondary(struct rte_cdx_device *dev) >> { >> struct mapped_cdx_resource *vfio_res = NULL; >> struct mapped_cdx_res_list *vfio_res_list; >> + int ret, vfio_dev_fd; >> + >> + vfio_dev_fd = rte_intr_dev_fd_get(dev->intr_handle); >> + if (vfio_dev_fd < 0) >> + return -1; >> + >> + ret = rte_vfio_release_device(rte_cdx_get_sysfs_path(), dev->device.name, >> + vfio_dev_fd); >> + if (ret < 0) { >> + CDX_BUS_ERR("Cannot release VFIO device"); >> + return ret; >> + } >> >> vfio_res_list = >> RTE_TAILQ_CAST(cdx_vfio_tailq.head, mapped_cdx_res_list); >> @@ -140,9 +177,80 @@ cdx_vfio_unmap_resource(struct rte_cdx_device *dev) >> return cdx_vfio_unmap_resource_secondary(dev); >> } >> >> +/* set up interrupt support (but not enable interrupts) */ >> static int >> -cdx_rte_vfio_setup_device(int vfio_dev_fd) >> +cdx_vfio_setup_interrupts(struct rte_cdx_device *dev, int vfio_dev_fd, > > Why rename this function? This is actually not renamed. git commit is showing this, because parameters of cdx_rte_vfio_setup_device() has been updated and a new API has also been added cdx_vfio_setup_interrupts(). It shows parameter update as "+cdx_rte_vfio_setup_device()" just after this API code. Thanks, Nipun