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 9A92CA0A0E; Mon, 10 May 2021 18:04:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 859294110A; Mon, 10 May 2021 18:04:43 +0200 (CEST) Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) by mails.dpdk.org (Postfix) with ESMTP id AFD2B41104 for ; Mon, 10 May 2021 18:04:42 +0200 (CEST) Received: by mail-oi1-f177.google.com with SMTP id z3so15012683oib.5 for ; Mon, 10 May 2021 09:04:42 -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=0YxnoSAtkWAy9fjQxVW1u/gbb73bRHx+P2IiHg3h5TU=; b=W+GMt5UI7JKp7MhEVQAWA+9nFl2eyFQeU9f2AKfphep1VUyPyEPE7j5WHjoup7zqc6 VqONTuwE8XjqhCPJIAY0OkUAP9qQpFbVaGGioRXdOgCGpjqO+4riaQr2jnzkeQVMrCQv MonGHfxv+KybN80Q2oumtexYwtwFaVu9AjopY= 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=0YxnoSAtkWAy9fjQxVW1u/gbb73bRHx+P2IiHg3h5TU=; b=SYAMxhuvzHX9Xu15xU1ecGkF4uABjhXgMCEjq1/bLY995ho9UJ+mdIU5RavFcni/iO +/XdDqGr6fXmtaaIjFS9NtZf2w7pP55HLXYxVu5F8T/pewz7ZMKqtL5RbI2zfnUKyYq3 0taKgeRABNEWly89/pGngdj4fMkvInYRNtrVECBb40uHpwLuQZz1Ul30SwESH4kaxJgN AWaLyWdfh2cWBDdmaEKl3GzewIHKanhd6skCvODmn3iL+wDVD+HiRFPpBIUJEVAEjq7k GdXO5i6Uq6mgQ7ThOyUKuj8ITqSpXeSORbRckTmCL1fgRHWshWWM0cScZ6AjMHRWj/Qw GdGQ== X-Gm-Message-State: AOAM532XbZOtlzZQKVUbp9lXtcG4KPanOCbAgF2niIwMSNDAv3RHOD4B 0fxT+rd5pu7ViD9WSPWuJgRxAvg4UCiQ6yZt7tHY9g== X-Google-Smtp-Source: ABdhPJydQNFmHnOR/329RbIPmayfRKjh5TI0rdbLDLrWSPXm5oeHAD1WfvaqI3iCOa526EdsvXGEPvjY6aavpkyQc7w= X-Received: by 2002:aca:211a:: with SMTP id 26mr18236366oiz.19.1620662681965; Mon, 10 May 2021 09:04:41 -0700 (PDT) MIME-Version: 1.0 References: <20210507181025.84012-1-lance.richardson@broadcom.com> <2003089.4ItjxMFgZf@thomas> <7d299b6c-80ba-cb35-f5ac-daf2a5670217@intel.com> <4580427.4aQfPY00Ab@thomas> In-Reply-To: <4580427.4aQfPY00Ab@thomas> From: Lance Richardson Date: Mon, 10 May 2021 12:04:31 -0400 Message-ID: To: Thomas Monjalon Cc: "Burakov, Anatoly" , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , dev@dpdk.org, dpdk stable Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000007987ab05c1fbefc3" 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" --0000000000007987ab05c1fbefc3 Content-Type: text/plain; charset="UTF-8" On Mon, May 10, 2021 at 11:55 AM Thomas Monjalon wrote: > 10/05/2021 17:31, Burakov, Anatoly: > > On 10-May-21 1:42 PM, Thomas Monjalon wrote: > > > +Cc Anatoly > > > > > > 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 > > >> --- > > > > LGTM, although the Fixes: tag is probably wrong because IIRC previous > > versions did have the same issue. > > What should be the right Fixes tag Anatoly? > I think this would be more appropriate (prior to this commit, pci_map_resource() called mmap() directly with off_t offset, with this commit offset was narrowed to size_t before calling mmap()): Fixes: 2fd3567e5425 ("pci: use OS generic memory mapping functions") --0000000000007987ab05c1fbefc3--