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 4E846432BB; Mon, 6 Nov 2023 18:05:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36F6D406B7; Mon, 6 Nov 2023 18:05:30 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2074.outbound.protection.outlook.com [40.107.212.74]) by mails.dpdk.org (Postfix) with ESMTP id D3D564025D for ; Mon, 6 Nov 2023 18:05:27 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hhaFWkpKBioJC279PPWE/fOlfeXt1J9qoTen7z3W6pOaS6Sam2GZLKCs0opthZQcXLafDK2OKb6R42DVBIh8GD/jn7Uia7qjiY1xZZU7EMs/GQBXjxj0XpJkud3pDiK1KvNzdVqb8AQnXTOKsIdqmE6SWsQyT8cFihns/sBCqO6sOFnOzXm158b0hmLe66VOqXztuQdckRQNHNOnqpZ7exkPVOhEAv3CQiwEk7jNRIN2PmUzADBQIlQvvJyXJMelT6nQzz+KX4kNNcBjQpHibwbcBqR9vNN0GJerr3oyPhdQkkuhVbMZ6ztdjbyLkpvjYkBRO4IaHafj9C4Gp/PsAA== 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=b2Rrm48XM57g6HxZQGZy/BHFbdPyCu2vrrpGrYCGeuM=; b=RF7gLLsTZ0X50VC9GmYTVbc5U52ob3OFiHNlczj0le4yXvLxH6/rbhHdlHL5eJXBv6uGdjBC6adC3TzCJ+4xD/RR0MayPdUOgMUDwz5Eb/xJrfv3jVZpGpUbtLqB61G+FulUJe+dlmIOlo7EmTuAIs8leUViFbUQml9hUT29Kf0VJwadxu/lArILtqOKEAOtP8fT0v6PvO450dawkiKMlIKNbiPydCBoY+TgqXSBjhHtG31bnFQQQEuNFwgR/9xnxlLGH3cDQJdqdUZD/Rf+JN91o7TW3WXKjMgONEvLJGxXbFmizpBr2zvjPebWk/qVU/NXdi1BO3ZiXbFMVpRnWA== 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=b2Rrm48XM57g6HxZQGZy/BHFbdPyCu2vrrpGrYCGeuM=; b=DY/6EM4h64IEC/xWeiXGGL3usMl2RJ7+/2hao+HZrfUH12eCUg15bqPdHE44HYENxkkbmMjjpZ3w9XlebcbZOv9C6EOHAkAQgjj6FPrap5B5/JbO8Z6AR3KADurlboOKhC5lUiUvBT35ytwxOlNUYy5oZHyJGzf4ZkH/aZn4oRU= 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 PH7PR12MB6906.namprd12.prod.outlook.com (2603:10b6:510:1b8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Mon, 6 Nov 2023 17:05:24 +0000 Received: from CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::1ff1:d311:1f3a:5b42]) by CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::1ff1:d311:1f3a:5b42%7]) with mapi id 15.20.6954.028; Mon, 6 Nov 2023 17:05:24 +0000 Message-ID: <8816597c-a4f5-4fa2-a3fa-90d9fd68dbfe@amd.com> Date: Mon, 6 Nov 2023 22:34:41 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] bus/cdx: add support for devices without MSI To: Shubham Rohila , nikhil.agarwal@amd.com, david.marchand@redhat.com, dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@amd.com, anatoly.burakov@intel.com References: <20231027162212.3353973-1-ferruh.yigit@amd.com> <20231103112016.1945684-1-shubham.rohila@amd.com> Content-Language: en-US From: "Gupta, Nipun" In-Reply-To: <20231103112016.1945684-1-shubham.rohila@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI2PR01CA0037.apcprd01.prod.exchangelabs.com (2603:1096:4:193::9) To CH3PR12MB8308.namprd12.prod.outlook.com (2603:10b6:610:131::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR12MB8308:EE_|PH7PR12MB6906:EE_ X-MS-Office365-Filtering-Correlation-Id: 2af625ca-f428-449e-cfd1-08dbdeea90d7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KQdZ5cbr3WvDpohr++fDBe+Y2nQj3jzUF1GBe29BfBdWLCuCT2VuXSQ3OLWgLU3B4YpA00PKf+oyx49lMVQO0gObA+YrYG9dD+qXdQLYHEHCtiDCvbUvFVDgqDYNRz2ZLH7AutMNQex20F0G5PXhaQvnXDvz+zbP2Qv3FLiK9kXhjWnUVAdFmyfoP0nQzvPnN7zvWzy3jo919GedTU5nFg7o/7gIi4VizGHCzHuVssB3h6me1GQwyaNDuNLsOnHOKX0V/6GV3K4DGPPefi6TeqmIZbdO1UdI0nF5q/P4L3cKFHVOVQpZEf3PlWTk7JIXiDkBSDVeHxwhu1HPG//ZBwfBEgh9/jxyXQR8SH8DndBldQCHv1Ezw+y21qVas51+0V3zU6bfdVox19+jLbSK0lt55WvAgvAoGndE5DTtkf0d5Cjc3NimsfA4/pPEcckjo0iaUYvX9GcPUjRy/5T/puJA17+sn6UzCGfJUn4LwX1fPgIoKMl+bICH11ZSa0FbgARCZP5QgvogzU++MmpHF1yGQAvR9fE07Fe+vvfTvhREEzwm7SWZKXqXsa89rO1omFhYj2qdH6HCvZF6AcR1gemKATTku6CPqPemulBvFn3JBR69H7UjOVWe6drsDuDFXDy83IHst9PnGEDpwiz6TA== 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:(13230031)(396003)(346002)(136003)(39860400002)(376002)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(8676002)(4326008)(6486002)(478600001)(2906002)(31686004)(5660300002)(41300700001)(66476007)(66556008)(66946007)(316002)(86362001)(2616005)(26005)(6506007)(6512007)(6666004)(36756003)(53546011)(83380400001)(38100700002)(31696002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TnVUUG5jYldFclhVK2ZRcmlwcnFuZW1SNXd5RmpBZzZ0d2ZzbWNxM2RmcGY2?= =?utf-8?B?dWxuOE5oR21jL1JQcENPREpIY2paVW5qTGdVM3liL2NkMXIxS2NDUDZQZUlI?= =?utf-8?B?R2FLN2VzZmg5YU1zN3NYdU11L2lPUGI2VDhwdDFmVHZIKzN1WEwzc3hIWVZ5?= =?utf-8?B?SldQS2VIa1BVb3VQc2FBNnYweHlDK3JURVNwWUZUMUJaWE5GNno3WmNmcy9W?= =?utf-8?B?L01qMXRsZGVGaXBRMkJGWGtYQ0srNHRXdW1hb1UvZEtTQ1ZkUFFocGo0R20w?= =?utf-8?B?NERKTWQyZHU1MzYwaGhqaUJyY1UxRnh4eUllSGFFM3o1amozUjlBQXFaZ1ZX?= =?utf-8?B?WmxoOGFV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d.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2af625ca-f428-449e-cfd1-08dbdeea90d7 X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB8308.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2023 17:05:23.9559 (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: zax9IktET9F1JFxJg5128A48LZD98oh43zXn15bsvvdKDOZ0GbLeWx/p/FgF3D7h X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6906 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 11/3/2023 4:50 PM, Shubham Rohila wrote: > From: Nikhil Agarwal > > Update the cleanup routine for cdx device to support > device without MSI. Also, set vfio_dev_fd for such devices > This fd can be used for BME reload operations. > > Signed-off-by: Nikhil Agarwal > Signed-off-by: Shubham Rohila > --- > v2 > - New patch in the series > drivers/bus/cdx/cdx.c | 2 +- > drivers/bus/cdx/cdx_vfio.c | 19 +++++++++---------- > 2 files changed, 10 insertions(+), 11 deletions(-) > > diff --git a/drivers/bus/cdx/cdx.c b/drivers/bus/cdx/cdx.c > index 541aae76c3..62b108e082 100644 > --- a/drivers/bus/cdx/cdx.c > +++ b/drivers/bus/cdx/cdx.c > @@ -405,9 +405,9 @@ cdx_probe_one_driver(struct rte_cdx_driver *dr, > return ret; > > error_probe: > + cdx_vfio_unmap_resource(dev); > rte_intr_instance_free(dev->intr_handle); > dev->intr_handle = NULL; > - cdx_vfio_unmap_resource(dev); > error_map_device: > return ret; > } > diff --git a/drivers/bus/cdx/cdx_vfio.c b/drivers/bus/cdx/cdx_vfio.c > index 8a3ac0b995..8cac79782e 100644 > --- a/drivers/bus/cdx/cdx_vfio.c > +++ b/drivers/bus/cdx/cdx_vfio.c > @@ -101,13 +101,12 @@ cdx_vfio_unmap_resource_primary(struct rte_cdx_device *dev) > struct mapped_cdx_res_list *vfio_res_list; > int ret, vfio_dev_fd; > > - if (rte_intr_fd_get(dev->intr_handle) < 0) > - return -1; Why is this check removed? If VFIO fd is not there we may not proceed with other VFIO cleanup?