Message ID | 20221216115732.3552650-1-ferruh.yigit@amd.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Thomas Monjalon |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06656A00C4; Fri, 16 Dec 2022 12:57:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E6D3442D22; Fri, 16 Dec 2022 12:57:52 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2043.outbound.protection.outlook.com [40.107.243.43]) by mails.dpdk.org (Postfix) with ESMTP id 3026B42D15 for <dev@dpdk.org>; Fri, 16 Dec 2022 12:57:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YGza/9S7yT6IBwVodbn12bwqFTdIgEHDf/m9FRtTbQKQ1i3QNj88IJq2JUG+Hw/pqv8uFSZsARFW8Za9af93Dvfzv/LAZx2uGpxiW5Fp8gYdboNlReX+iM3/7E2PQs/uRAeAvTnYV4PkU5p+qNz5vgW0yr6dkzbFBfa+ZI75otHgtQDhuh67NE/sE2QRcSu0FMQSztVOFo5UxQs42LuLGDrHNHrRUngYU83UDTpqKnBZqQqE0xDbywd57gCiIpywfxubKL7AagIXMs1yoZeQEBRaYedmvwvAJ6EvsBSfjXsgEp0i1oTfLXMGOhAm2g5ooXX2dSRUT0rsvTFy9mcEiw== 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=Cn9Vd8t2VwRnazi+YnGg+a1twsG2eld8AWHXkuy4ViI=; b=ogcxipoSr9VRrGFoIsNNVi/6WQmVOuAdj342hOk8wM2c65OitaTG0G4ifgB3SLpTNqRhm938+edIh8yhSWTU08BmHVRTKl+Vijclp28J7g97/K7EAuV78OoaGsDpO8hvYSabH2m9F8ZUIieRYhWaTo7xBy+u5sSBwYArTKsyYXpxfJ/L2lP/o7kLAFlo4XcQ2LhoFC/CicD2YrU3eB9whIl6HZCjiy1dRq28/8WT7xQasFAGm+Ztb+0ExHKzlvyTqUisAE4UVsUQsSQXncAI37CyqlfYsoTi2EDukpB+M/XpwcN4hHVHXm0/CpdPMjjQ8oJ1DmS0pjIyPg7QYGFa2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=monjalon.net smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=Cn9Vd8t2VwRnazi+YnGg+a1twsG2eld8AWHXkuy4ViI=; b=paC/OjNlCCIJQxFQwDHyO42CVH9PANdcliCGIyIet4MZnO5PZqeEXtfn/avMYxND4aITDBDX3DeDyvLf6VyUMd4BvlLhMhzK4mb2CSqBYpff7N5B8UXJkyxIiodkNRe8cekpxEBkFHSDxcFMksTzxbj6Zf+G2EHnAGo+H3sHm9E= Received: from MW4PR02CA0027.namprd02.prod.outlook.com (2603:10b6:303:16d::32) by DM4PR12MB7597.namprd12.prod.outlook.com (2603:10b6:8:10b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.12; Fri, 16 Dec 2022 11:57:49 +0000 Received: from CO1NAM11FT073.eop-nam11.prod.protection.outlook.com (2603:10b6:303:16d:cafe::c4) by MW4PR02CA0027.outlook.office365.com (2603:10b6:303:16d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.15 via Frontend Transport; Fri, 16 Dec 2022 11:57:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT073.mail.protection.outlook.com (10.13.174.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5924.12 via Frontend Transport; Fri, 16 Dec 2022 11:57:48 +0000 Received: from telcodpdk.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 16 Dec 2022 05:57:46 -0600 From: Ferruh Yigit <ferruh.yigit@amd.com> To: Thomas Monjalon <thomas@monjalon.net> CC: <dev@dpdk.org>, David Marchand <david.marchand@redhat.com>, Daxue Gao <daxuex.gao@intel.com>, Christian Ehrhardt <christian.ehrhardt@canonical.com> Subject: [PATCH dpdk-kmod] linux/igb_uio: fix build with kernel 5.18 Date: Fri, 16 Dec 2022 11:57:32 +0000 Message-ID: <20221216115732.3552650-1-ferruh.yigit@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT073:EE_|DM4PR12MB7597:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e7f46dc-2c7f-4770-ae01-08dadf5cc077 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1N6BA5NXwTpAe+8QgrjPqWGngCiMQ4shDsClFg2d0RpqGD5/alNczaBwOqFgZWq9Vc9eRoOrKtd3i2tOvvWSgPzR2tjqBxjy+7dFDf1xurN96tADYXrnsqX2vDGsauvLHEvxUqEoCxLdSJmFvPpnli+tU2V3k+2+mWuUFhuXqfLFcCPYj9GB9ZqXLlUVJC4mXiE1XPBZwAsUna0QtCd+c4CLd2GwqwC4h4keXVeevRpBIUwNHvKaN7i3P1f5nCAWupNQeUBImPfvbxNqAWLXNkV2JbpVnTR4eKpInPSdkpHYUpiGiwKk+dcgch52JIW4x2ZjAizLp1po+SrWFIIqwllG+4uaFa+C5eVpl/MeeDjIMvxUnAINJcgPJfMOatU1RhK8drWugrA30whjoxtPfYrGxpfAvEWtF/3APAJEuAiXkagnFESYoYKbaT/qAtD4+jzFO3YdHa6N8cSItKK0dKX/9jwjvdnkhwedyCmiJQ+PyQozHAvrSlGu2TX/PWSZ+aisafxt+iOoPDcqZMXtN7PtU4gS1mWm/9KlZ6pUcGAHUlZWmiQXC/ujGviJBWlJFROgz8hC+Athjs/nVP0eEncidLNosEvyOMo6iV1s1ZgfKIsWE7QaZYSiRQg69ApCd1s7iv13//sDXad8QAcLjgVgtTh+xcpAJhZfdqENvEAJzDbsFpECIiQyydptlnlAoF3eq9GgG9/lvnd0Eg4tg4cZ2PeNi5m6FDaCMuWhB58= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(396003)(346002)(39860400002)(376002)(451199015)(40470700004)(36840700001)(46966006)(82310400005)(2616005)(16526019)(82740400003)(1076003)(336012)(36860700001)(86362001)(47076005)(426003)(40480700001)(83380400001)(40460700003)(356005)(81166007)(36756003)(44832011)(2906002)(316002)(8936002)(41300700001)(70206006)(70586007)(4326008)(5660300002)(8676002)(186003)(26005)(478600001)(7696005)(6666004)(54906003)(6916009)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2022 11:57:48.3681 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e7f46dc-2c7f-4770-ae01-08dadf5cc077 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT073.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7597 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
[dpdk-kmod] linux/igb_uio: fix build with kernel 5.18
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/loongarch-compilation | warning | apply patch failure |
ci/Intel-compilation | warning | apply issues |
ci/iol-testing | warning | apply patch failure |
Commit Message
Ferruh Yigit
Dec. 16, 2022, 11:57 a.m. UTC
In Linux kernel v5.18, "pci-dma-compat.h" wrapper file is removed [1].
Some APIs in that wrapper file were used by igb_uio kernel module and
kernel module build fails after mentioned commit.
Fixed build for v5.18 by replacing APIs in igb_uio.
Replaced APIs are available in Linux v4.4 (minimum Linux kernel version
supported by DPDK), so no Linux version check is needed.
[1]
Commit 7968778914e5 ("PCI: Remove the deprecated "pci-dma-compat.h" API")
Bugzilla ID: 1142
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
Cc: Daxue Gao <daxuex.gao@intel.com>
Cc: Christian Ehrhardt <christian.ehrhardt@canonical.com>
This also needs to be backported to v19.11 LTS
---
linux/igb_uio/igb_uio.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
Comments
On Fri, 16 Dec 2022 11:57:32 +0000 Ferruh Yigit <ferruh.yigit@amd.com> wrote: > In Linux kernel v5.18, "pci-dma-compat.h" wrapper file is removed [1]. > > Some APIs in that wrapper file were used by igb_uio kernel module and > kernel module build fails after mentioned commit. > > Fixed build for v5.18 by replacing APIs in igb_uio. > > Replaced APIs are available in Linux v4.4 (minimum Linux kernel version > supported by DPDK), so no Linux version check is needed. > Makes sense, but lets put the correct versions in the commit description. DPDK should not be trying to support unsupported kernel versions. 5.18 is End of Life now and so the one that matters is really 6.0. Current DPDK 22 should be supporting last supported LTS which in January will be 4.14
On 12/16/2022 5:33 PM, Stephen Hemminger wrote: > On Fri, 16 Dec 2022 11:57:32 +0000 > Ferruh Yigit <ferruh.yigit@amd.com> wrote: > >> In Linux kernel v5.18, "pci-dma-compat.h" wrapper file is removed [1]. >> >> Some APIs in that wrapper file were used by igb_uio kernel module and >> kernel module build fails after mentioned commit. >> >> Fixed build for v5.18 by replacing APIs in igb_uio. >> >> Replaced APIs are available in Linux v4.4 (minimum Linux kernel version >> supported by DPDK), so no Linux version check is needed. >> > > Makes sense, but lets put the correct versions in the commit description. > DPDK should not be trying to support unsupported kernel versions. > > 5.18 is End of Life now and so the one that matters is really 6.0. > > Current DPDK 22 should be supporting last supported LTS which > in January will be 4.14 Agree on this, but officially in documents it still says 4.4, when doc updated I can update commit log too.
On Fri, 16 Dec 2022 at 12:57, Ferruh Yigit <ferruh.yigit@amd.com> wrote: > > In Linux kernel v5.18, "pci-dma-compat.h" wrapper file is removed [1]. > > Some APIs in that wrapper file were used by igb_uio kernel module and > kernel module build fails after mentioned commit. > > Fixed build for v5.18 by replacing APIs in igb_uio. > > Replaced APIs are available in Linux v4.4 (minimum Linux kernel version > supported by DPDK), so no Linux version check is needed. > > [1] > Commit 7968778914e5 ("PCI: Remove the deprecated "pci-dma-compat.h" API") > > Bugzilla ID: 1142 > > Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com> > --- > Cc: Daxue Gao <daxuex.gao@intel.com> > > Cc: Christian Ehrhardt <christian.ehrhardt@canonical.com> > This also needs to be backported to v19.11 LTS > --- > linux/igb_uio/igb_uio.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) Tested-by: Luca Boccassi <bluca@debian.org>
16/12/2022 12:57, Ferruh Yigit: > In Linux kernel v5.18, "pci-dma-compat.h" wrapper file is removed [1]. > > Some APIs in that wrapper file were used by igb_uio kernel module and > kernel module build fails after mentioned commit. > > Fixed build for v5.18 by replacing APIs in igb_uio. > > Replaced APIs are available in Linux v4.4 (minimum Linux kernel version > supported by DPDK), so no Linux version check is needed. > > [1] > Commit 7968778914e5 ("PCI: Remove the deprecated "pci-dma-compat.h" API") > > Bugzilla ID: 1142 > > Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com> The patch from Georg is doing the same and was sent earlier: https://patches.dpdk.org/project/dpdk/patch/20221006185136.1634218-1-georgmueller@gmx.net/
diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c index 33e0e0286b69..0045e0fb737a 100644 --- a/linux/igb_uio/igb_uio.c +++ b/linux/igb_uio/igb_uio.c @@ -512,18 +512,12 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) goto fail_release_iomem; /* set 64-bit DMA mask */ - err = pci_set_dma_mask(dev, DMA_BIT_MASK(64)); + err = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(64)); if (err != 0) { dev_err(&dev->dev, "Cannot set DMA mask\n"); goto fail_release_iomem; } - err = pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64)); - if (err != 0) { - dev_err(&dev->dev, "Cannot set consistent DMA mask\n"); - goto fail_release_iomem; - } - /* fill uio infos */ udev->info.name = "igb_uio"; udev->info.version = "0.1";