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 5748F41B15; Mon, 28 Aug 2023 08:07:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E07824026D; Mon, 28 Aug 2023 08:07:02 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2056.outbound.protection.outlook.com [40.107.100.56]) by mails.dpdk.org (Postfix) with ESMTP id 85DB24021E; Mon, 28 Aug 2023 08:07:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wu4sM8b0mYFIgn3d4bdbmpvNTEhz4gatxgvfoNjrWpN6/cnGGSvji4kUJQxa+8zkjf/KjkmVxHv69WYHxnPsiWYS7WFvqdJzcX6Smm5WAtTLBjaonayXCZa16YGWKf8HrNN8MgDyov95HORbwIqTvqjnfB6WiuCxT90d6GocFrYF8KwOBbZ2Fjr5RMoGkcm76AzX6H7aV3zpa9wdrCEZIYRHiUND1U2Bk9jx4mDR658zusRNy2iGRWUk7Y5YovvyZyFqimoVJLhqgoieffWtz7go4IqMAKYvoWVFtpY62KICh62xzhbWm7w8vNDjyFG0b1HoNue93wm6MIrqsJq7ig== 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=S6KTeKso+TanRIsx/C2OZpZfOPo0mCgX6DMmDQU5Qks=; b=J+Q/9qjk+qIU7LzZUTWWxu4jJkcHaatdWxn9xruyAvwWJMq4xYnTCW6iha6uDVgylrUOI6K3wXTvcrhl4TGLY+UdlJOMwhlWpX8aX82uYDYOZy5xwdA32aG+RM3hzpdE3h/XPtyMGy1Q+/GpxG5WR65YZ/3mV9Kq170YuRgeHmnAyiXoXYPOWeFQiLNIiSt/HJ6rQZdWL/oZO/ZILtDDyE4IwSrlhS+C4qn9OeblMUNDHygeN1vUITMJfgduWFNFOw/mPSMBnZorVOo3KQ929Np4Khnj26Bv3d0GrhRXYuofB2R7rW1WWlT+R+NA7o2CnOgtqGR5mus5caOy5OuU6Q== 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=S6KTeKso+TanRIsx/C2OZpZfOPo0mCgX6DMmDQU5Qks=; b=ddVInNzwhmpvicO2dZv4c+3roQmUQONSSua4CnGyoX6ENAiSKuhMzspOgj6KhjNJCxdGl99e/NXjDYkI28mTVUv7Pa2ly6uMsCj7cehO7x4QDCgCHS2ARXDD8D6jpCKbnhNaQxqeiXDQOE7cCw1SZnSMdBMP6KZF5epVKBrf4bQ= 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 BY5PR12MB4052.namprd12.prod.outlook.com (2603:10b6:a03:209::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.34; Mon, 28 Aug 2023 06:06:55 +0000 Received: from CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::7eed:c168:1b20:c628]) by CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::7eed:c168:1b20:c628%4]) with mapi id 15.20.6699.034; Mon, 28 Aug 2023 06:06:55 +0000 Message-ID: Date: Mon, 28 Aug 2023 11:36:40 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v3] bus/pci: fix legacy device IO port map in secondary process To: Wenwu Ma , dev@dpdk.org Cc: david.marchand@redhat.com, maxime.coquelin@redhat.com, chenbo.xia@intel.com, miao.li@intel.com, weix.ling@intel.com, stable@dpdk.org References: <20230807015820.1329972-1-wenwux.ma@intel.com> <20230822021836.420095-1-wenwux.ma@intel.com> Content-Language: en-US From: "Gupta, Nipun" In-Reply-To: <20230822021836.420095-1-wenwux.ma@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN2PR01CA0169.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:26::24) To CH3PR12MB8308.namprd12.prod.outlook.com (2603:10b6:610:131::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR12MB8308:EE_|BY5PR12MB4052:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e9cab5c-e67d-43d4-28cd-08dba78cfada X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N5eSHgdUjAajrcXuoU3BAtIaAZLSp5k1UG5FE1jmEweNX+ApqnqUgc2ZPmc8ZvwFIRRR78LO4oWVMnvFLTTHM9Uw0hRPTxAArBKYLqGhVQg/p0DHeUOyBaF9LF7DNw0SwzPVYiVPNoehMF4Rx8rcgAaXEvf0/AbpQuGP59jbf+z670QhJmxF06ZOMqMopRQMH2mJokNyGLMx/69rzJqYXYuMrOiQsxeTV+oLyZ8bWvtud1hrkI0IPmi0CwTf5g94xaIQcrdyX5xED9DZkgjtd8JXz9/iouAGu4yrQX7Iapw13d7jMNDRUFZt/tnJJlHIr39VCZFOmP8xP6lXW4urWTEb1vMN6V4+Y+ofY9Efe5ChQBUicfZfUKWNLgzed835DupvSCmCAD+bR/UZRGmNcxN8z5ySRh+oQomRc9MRfyB0xVPv++knq+0HCia67s3Z13z7gdQYkTq+3QIadSnlLo3TQZOK166V7fVGgGqdKbvDz0hqCe53ecGrWRKGvruBdo1VfUgRaQuyFMrRAdm2os6d16SPm/Y05oiYsdWKoBUjcTOGFvu8y+M1ErpH8Z/R6w6QbiNKniyad2CjB2s3BfqA/egnfJ8tfnme26czD8jkdotcPR38DrGp2FUzKT0GUGbw9GffIsuGWGKhkntKFQ== 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)(366004)(346002)(136003)(39850400004)(396003)(376002)(186009)(1800799009)(451199024)(6512007)(31696002)(6666004)(53546011)(6506007)(6486002)(2616005)(2906002)(86362001)(5660300002)(4326008)(8936002)(8676002)(66946007)(66556008)(36756003)(66476007)(41300700001)(316002)(38100700002)(478600001)(83380400001)(31686004)(26005)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?c0ZQeC9ublZoeUFhcEJjNDllQmRzSWl0ZGpOVTFKc3dvUWtmenUwdlVsOGxk?= =?utf-8?B?aDcva3UxM3lIQ201ZjM2T2tHVUVKVHBHQjAxQ1hCRDNXeGNpdktnQzFaQmZT?= =?utf-8?B?WXRheUxiWDQ3N2QwV3hnK1RDVFd2TGNpTXJjOU5ZZG8vMktmS3MvNnVIVDNL?= =?utf-8?B?czN5dFNZcEw2MVlxb3NJMS9zK2poS1J4RzVuSDhDQ2pRQUlyMUpkcU1UVjBa?= =?utf-8?B?UUZpUmxvKy83NXFlOEF6Tk9yVUpPN3VwclRRNVdmOXdlWGZha2c5QVg5MW92?= =?utf-8?B?eFpyV1FtUzQ5dFhZZnBtdURReTg5UWhlU2daMFdUQ1JmQ1UzZjEySURPRUs0?= =?utf-8?B?WGt5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?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e9cab5c-e67d-43d4-28cd-08dba78cfada X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB8308.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2023 06:06:55.3115 (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: zVh+1x8lQGtS9FGnaiJcCcAR/ziHzbbhZj0ohIFVldGQ8K6ow437iK1Pj7H4GVVx X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4052 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 Hi Wenwu On 8/22/2023 7:48 AM, Wenwu Ma wrote: > When doing IO port mapping for legacy device > in secondary process, the region information > is missing, so, we need to refill it. Please use 72 columns in the commit log > > Fixes: 4b741542ecde ("bus/pci: avoid depending on private kernel value") > Cc: stable@dpdk.org > > Signed-off-by: Wenwu Ma > --- > v3: > - adjusting variable settings > v2: > - add release of device in pci_vfio_ioport_unmap > > --- > drivers/bus/pci/linux/pci_vfio.c | 43 ++++++++++++++++++++++++++++++-- > 1 file changed, 41 insertions(+), 2 deletions(-) > > diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c > index e634de8322..5ef26c98d1 100644 > --- a/drivers/bus/pci/linux/pci_vfio.c > +++ b/drivers/bus/pci/linux/pci_vfio.c > @@ -1314,6 +1314,27 @@ pci_vfio_ioport_map(struct rte_pci_device *dev, int bar, > return -1; > } > > + if (rte_eal_process_type() == RTE_PROC_SECONDARY) { One thing I am not fully convinced is that why VFIO setup is not required for primary process here? Thanks, Nipun