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 7D231A034C; Sun, 18 Dec 2022 15:25:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 146EA40A7A; Sun, 18 Dec 2022 15:25:09 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2062.outbound.protection.outlook.com [40.107.92.62]) by mails.dpdk.org (Postfix) with ESMTP id 07C2D40685 for ; Sun, 18 Dec 2022 15:25:07 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cpqESGnCIl4d0uoRG7wgibfawRc3jkEolN1hT8NTgLiiZqBMdWCbQR96QUBaoAKyH0CFu/mKGkyBLjQHzjejIZ17AzP7ZnPRn2weoC1xiPn9yflW780fsymb4WOSvoe2j35cPDOG6rNbxqqmne2R4Psdv5kiiFuHbc25bVtgfhiIAGjMDm1qUsPzyGYT/wkBsQDUtxqZUSdgIbrcvpHk+nGBpScw9m9T2BYpyYY3jctGqypchZMR/1akTB/PdBon9mKAEJ8CAcEzUWhTcvYQuqJqIB88YR01zLmveEzQR9nLGremSIX0dkfsaK4eyDRSU8uJR/U9HK0CU1J30ogehg== 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=i2J61ayD7s+rT44r6OOw0cTxPc6DEKKSKWDfEFkS7cI=; b=ZCPrZHE2AJESPZr7wDNdKXJnIxqnghGidZQfKKsrGDHx15tUFdxHsYSByZtLjEtJEaaBQSmtheEXT1GiihsuTC1uTKbm5AjQQrpvUwrX6BzSbUARJC9omxu/kUxjl1M1SKnA43CSQplotAoD/aNFmTDLMxcGO13G8L6FRo4ualH1Mo0noEW+5drBjEy1llMbEwH6V5wgr0jwEmQRKdoa2ArZQqHKOZ+tqb0J5zwrQsCenU6UUk2w25EI47Kt6SfE2mz7vZB1zCC9TlNr6Ja1yO7z3pFmDv8E3KNp0Zl4IwLRg586YdJ4WIMqlmV7X+s0rrXMA0EVuNsGkObMGluHng== 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=i2J61ayD7s+rT44r6OOw0cTxPc6DEKKSKWDfEFkS7cI=; b=Xe5Ha9OsHEvA5YTKGglmbjG4MPXdNTYLNzzDpMchYwZQoheTSHXdNThHZ0gzE1MSYzXn0fYl8cMnOoNiYG4Op/TZavZpO/FlbSeEEdMDTgKhT6Kaz8MXd4Ns6SfCxh8fTR2yN+JcaW8Q7BHEfNHTSWeQKdQ9hjUUi2Ri47bfM1U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DS0PR12MB7745.namprd12.prod.outlook.com (2603:10b6:8:130::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Sun, 18 Dec 2022 14:25:02 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%8]) with mapi id 15.20.5924.016; Sun, 18 Dec 2022 14:25:01 +0000 Message-ID: <4a59bead-6998-3a21-597c-6eb1c6c25d69@amd.com> Date: Sun, 18 Dec 2022 14:24:55 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH kmods] linux/igb_uio: fix build on Linux 5.18+ To: luca.boccassi@gmail.com, dev@dpdk.org References: <20221216171801.348224-1-luca.boccassi@gmail.com> Content-Language: en-US From: Ferruh Yigit In-Reply-To: <20221216171801.348224-1-luca.boccassi@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0444.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::24) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DS0PR12MB7745:EE_ X-MS-Office365-Filtering-Correlation-Id: 758db526-554f-499a-07ab-08dae103a601 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /qArcYqxCbCn7IxOrlBIXkwSx+b5yI+0SjS+y/+2BEVmmJxuq34P59tL6OScgCdFNIs9bM63+UPPCdMuy+SC59td5Or25hL50mT1VON1uzEmRNuB0H5R3xAHcfC9ubSK4u7kwlVnwhUiPRSk8NP50GkSOhjNIx7SWxrAJU6wjsRilDRJw6NFxtFb06Ms+mhu7maM5vGm4qGoG0uHJZGU9xVKKYeAAKm6/ZFGfAGYB/yHK8lNq59o6sqr2WnaMkCU57BHfefT6AbxqYZ++i8/xIelpdbK+ciD2P4TVgp5HRGqXGXlvA8vRU1YsLi0vNwSjlBpFyW6KeaKWUb/9q61PiRE6jQCUSX3j6Nurr0TBcujN9+s/zorUjqpgBCV0M8A6ClAaRm/4h80lSRw0DgkBGPp9FhJVNEpblDJqALu5Su91RsehhNbLc0xtYMEozsHOsroeQ/LA0kC493vbu9yy44T5doDyepcfsE3hT1WJhIpsxyxHDW61k2ksLLOdMkmNCaACTlPyIV59ZVk1mq7zQMDBwBQMn73TfoCpqArOg/6RMqlLQXsJW42GS+bOrtwZTQf92WkQrKLjsl4O4+MmOi0nx6S6Kyk9/25CwTBNPE57RD5d0d5Bp2mKQfgrVbKv0fdiZkYA112aN2vaNFk9o5RPXteiPkT4vrmCSRsy9i8hZJF1th4rXvRephMkFmF1IScUTEIF7OvISmv33J37ElDsdFQc4fyKl4yFTdDSIS8twZ9Etf1a4SIs4giHL5NsW6zmXkcgrU/m67ovE4WeQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(346002)(136003)(366004)(39860400002)(376002)(396003)(451199015)(38100700002)(41300700001)(8936002)(66476007)(5660300002)(66946007)(8676002)(66556008)(31686004)(478600001)(53546011)(6486002)(36756003)(44832011)(2906002)(316002)(966005)(26005)(186003)(6512007)(86362001)(6666004)(6506007)(31696002)(2616005)(8193001)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cWxwV25QeklwNDFkTmZFSG1GS3JJRWtwWFB3ejVqZTNUK01BTnpQVWJyYjBS?= =?utf-8?B?N3MwV0NFMk13bElOcWVDR1B2ZlI5UW1POEZHZ0t5UXlNeDdIYk4wL1JYbFRW?= =?utf-8?B?SHpNNFdvVlZGSEFIMS93alEyZDhPQzU0THQ3K0kyM0x6dHJFNWMxMUttTGxw?= =?utf-8?B?NkhhSGQvVWYycXE1ajNqbi8rR3B1TFpsZnlFSGhZRlhObW5lWml5eDJNTzUz?= =?utf-8?B?Mzg5eHh1SmdIZmFLSTFZb2FFN09vTk55dTFwc1RpTUxvOEI2Y2VscnVFQUVu?= =?utf-8?B?UHhuejF1ZjlPTS9kRkttMHBkL1N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S?= =?utf-8?Q?gabFaV7QsbKQwtq5Sl8m6zuKv?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 758db526-554f-499a-07ab-08dae103a601 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2022 14:25:01.7581 (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: 7Q27F5tA382ZREyrc4KCi/nI6FbQ6GtieBtJhz6j7wmZP3K69yW1WOMNrwkpeKN0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7745 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 12/16/2022 5:18 PM, luca.boccassi@gmail.com wrote: > From: Luca Boccassi > > Reported-by: Paolo Pisati > Signed-off-by: Luca Boccassi > --- > Only build-tested. > > linux/igb_uio/igb_uio.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c > index 33e0e02..3d8a8a8 100644 > --- a/linux/igb_uio/igb_uio.c > +++ b/linux/igb_uio/igb_uio.c > @@ -512,13 +512,21 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) > goto fail_release_iomem; > > /* set 64-bit DMA mask */ > +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0) > err = pci_set_dma_mask(dev, DMA_BIT_MASK(64)); > +#else > + err = dma_set_mask(&dev->dev, DMA_BIT_MASK(64)); > +#endif Hi Luca, Can you please check following, I guess these patches are for same issue: https://patches.dpdk.org/project/dpdk/patch/20221216115732.3552650-1-ferruh.yigit@amd.com/ > if (err != 0) { > dev_err(&dev->dev, "Cannot set DMA mask\n"); > goto fail_release_iomem; > } > > +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0) > err = pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64)); > +#else > + err = dma_set_coherent_mask(&dev->dev, DMA_BIT_MASK(64)); > +#endif > if (err != 0) { > dev_err(&dev->dev, "Cannot set consistent DMA mask\n"); > goto fail_release_iomem;