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 DC119A0A0E; Tue, 11 May 2021 15:33:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C0D7340140; Tue, 11 May 2021 15:33:54 +0200 (CEST) Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) by mails.dpdk.org (Postfix) with ESMTP id 329854003E for ; Tue, 11 May 2021 15:33:53 +0200 (CEST) Received: by mail-ot1-f51.google.com with SMTP id u19-20020a0568302493b02902d61b0d29adso16711287ots.10 for ; Tue, 11 May 2021 06:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DSaoYccUTB7Dh4NBpB6bgKRKy1mVIsMa+uOzGGwyOzc=; b=EMTklauyNLMN14eUX+B9IqItY48gsRTmgm6WojSahF+W+vLU7AcyCd+fsrG6cH2tb/ x7r+gMH+jHDe5aiGPC1PL1LcOehU5ZRLwDt4rAvAzCENl6sxKDIPnmSCm9FGG2LqVvdV mpEUT7KePZFWSnFiMeQWjd9lhFGYf3ehkCDnI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DSaoYccUTB7Dh4NBpB6bgKRKy1mVIsMa+uOzGGwyOzc=; b=JZOebzNafm3pLvOjvpviQnJilZi/VLGOqdYrX4TErRO90BGprK38dFqv/JKemUAe8U YQtiF0/LYOGPGOnNJ8LdQvSiRLWaJsLR6cBXQAgxFtaC3HpkIkrsPIdBWZvmqc+6rVRR 7E59bMdGi0l1ZEQ494tvj+rqkz07+ITd0CLcGIow+OOwZ6cqFRpjeonlFyM5peLVI4uD p7sW5lJm1XsICpqIfLl8kaLBRw5ZbTeuoWi3Modqt7rjPHVW3ci0TanAMt3pwHWVn14o HRYl+TlpiYrzVeDgdHUi0ZgskCNWhU97WGw4He1Fa4o4usnkWXeRWuneke+WhqB8Dq7L 2D2A== X-Gm-Message-State: AOAM530kuUTCiXoOfXT+GoBhjxj9M+bk6Go/fDvjMWLNuQANVRG4j+dM qdnqi47bPF+sC+HtD5rzprdLAIQTOO3NiCZwuAD1qw== X-Google-Smtp-Source: ABdhPJwEKR15cdj4ZvY9ooO8iLGJ+n3KSnMgSG5zKb1F4K8pb36jaoUpQzNQ06hDomeOMQDy0hNSv3+wuEl10Vj6yEQ= X-Received: by 2002:a9d:6b85:: with SMTP id b5mr25681868otq.172.1620740032441; Tue, 11 May 2021 06:33:52 -0700 (PDT) MIME-Version: 1.0 References: <20210507181025.84012-1-lance.richardson@broadcom.com> <20210508142753.114343-1-lance.richardson@broadcom.com> <2578949.o3yKfYDW1X@thomas> In-Reply-To: <2578949.o3yKfYDW1X@thomas> From: Lance Richardson Date: Tue, 11 May 2021 09:33:41 -0400 Message-ID: To: Thomas Monjalon Cc: Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , dev@dpdk.org, dpdk stable , talshn@nvidia.com Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000ed222105c20df1ea" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v3] eal: fix memory mapping for 32-bit targets 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 Sender: "dev" --000000000000ed222105c20df1ea Content-Type: text/plain; charset="UTF-8" On Tue, May 11, 2021 at 4:18 AM Thomas Monjalon wrote: > > 08/05/2021 16:27, Lance Richardson: > > For 32-bit targets, size_t is normally a 32-bit type and > > does not have sufficient range to represent 64-bit offsets > > that can are needed when mapping PCI addresses. Use uint64_t > > instead. > > > > Found when attempting to run 32-bit Linux dpdk-testpmd > > using VFIO driver: > > > > EAL: pci_map_resource(): cannot map resource(63, 0xc0010000, \ > > 0x200000, 0x20000000000): Invalid argument ((nil)) > > > > Fixes: c4b89ecb64ea ("eal: introduce memory management wrappers") > > Cc: stable@dpdk.org > > Signed-off-by: Lance Richardson > > --- > > v3: Use PRIx64 instead of llx to format offset in log message. > > v2: Use uint64_t instead of off_t (off_t is unknown to Windows). > > off_t is referenced in drivers/bus/pci/windows/pci.c > (for unused parameter) so it should be fine? > If not, we could add it? v1 of the patch had the following build error in CI: *Build Failed #1: OS: WIN10-64 Target: x86_64-windows-clang FAILED: lib/librte_eal.a.p/eal_common_eal_common_fbarray.c.obj .... In file included from ../lib/eal/common/eal_common_fbarray.c:14: ..\lib\eal\include\rte_eal_paging.h:64:10: error: unknown type name 'off_t' int fd, off_t offset); --000000000000ed222105c20df1ea--