From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f177.google.com (mail-qk0-f177.google.com [209.85.220.177]) by dpdk.org (Postfix) with ESMTP id 3FE6423B for ; Wed, 20 Sep 2017 04:55:13 +0200 (CEST) Received: by mail-qk0-f177.google.com with SMTP id t67so588067qkl.12 for ; Tue, 19 Sep 2017 19:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=a0i5LNXG0hT8liCDf+ASoMw0fx7VlQvcx1ohe3HYhB8=; b=YB2J/jP1Wg/vTgMY1nAUXH0CSjAkwHc5a1R28meBZrRbt3VR9sW2jHKdlkOqJdfftO eWN3ubBwHYuLwwC/DtjrTQiEdzkRtlBpkitdliv/KiukjNI5Xj9v2IrOIHLVU7uA3t5T i6srv9G6YM0AtY3IuwKyexrJiIwyo4Zp+ri7Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=a0i5LNXG0hT8liCDf+ASoMw0fx7VlQvcx1ohe3HYhB8=; b=AVm/ZLy/epdVwpMe6S88f0+g2YJrVbqK/BjxjKZ9URDEcy8NXNoF1fcD6mCUB2Vg08 Pmnpr4hRBB5jJqoDlVg0YMKYLYt0BWLnmrmNsuX9baWYIRrDv/Vn1zgJvllS8cgNkadT y23FfdPIf3inOWQ5JCZY3i9ERN8e3hy8l2ofZnKOjXRiRudAX7iMyhGA/l8HcgyGMAv4 9mfcYwdQMUdOfIUG1lRHxvs+dxMWKuCYRiSbM1PytUPmKK9GZWsq6FT4SrO6TjdCxz5z CvmUIabITCbyTOry7n65EK/qwRFH2Aq6Iu7pT8zJl5P/Fvu+P1VvJa9aQcBbhSiY2lfU Nmmw== X-Gm-Message-State: AHPjjUim5PvJlYIaCIP7AEUxYZKjweGvX26TSgg0nSUPhdR2BPWEafGF t4eDQI9W1C+mqGsfkuPfsy/hLtogIt0HLz0al5loHe1D X-Google-Smtp-Source: AOwi7QDdwE+TPQ2H7nB9u2vtgk5PRNnba54C+WrudNtvY4TGwiPZY0amoS2mrPP//QFiGFve5EHzHbM1qDOWQdNAWao= X-Received: by 10.55.102.212 with SMTP id a203mr5217645qkc.272.1505876112674; Tue, 19 Sep 2017 19:55:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.101.16 with HTTP; Tue, 19 Sep 2017 19:55:12 -0700 (PDT) In-Reply-To: References: From: Jim Murphy Date: Tue, 19 Sep 2017 19:55:12 -0700 Message-ID: To: "Tan, Jianfeng" Cc: "dev@dpdk.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2] net/virtio-user: fix not working on 32-bit system X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 02:55:13 -0000 On Tue, Sep 19, 2017 at 7:17 PM, Tan, Jianfeng wrote: > Hi Jim, > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jim Murphy > > Sent: Wednesday, September 20, 2017 6:24 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH v2] net/virtio-user: fix not working on 32-bit > > system > > > > Hi, > > > > The fix contained in this patch breaks under the following scenario: > > > > 1. A 64 bit host and virtual machine. Therefore all physical addresses > are > > 64 bits. > > Host, VM and application are 64bit, then I suppose there's no problem? > Right, no problem. I was just describing this as my setup. > > > 2. A 32 bit user mode DPDK process running on a 64 bit virtual machine > (64 > > bit kernel). > > Ah, this is a case we fail to cover. > Yes. > > > > In this case, the physical address is 64bits but the virtual address of > the > > user process is 32 bits so uintptr_t is only 32 bits. As a result when: > > > > (uintptr_t)(mb) + (vq)->offset) > > > > is referenced, only 32 bits are copied into the descriptor but 64 bits > are > > required because in this scenario that is the size of a physical address. > > > > So it seems like we need a way to determine the size of the physical > > address and then VIRTIO_MBUF_ADDR should be written to copy that many > > bytes > > into the uint64_t. Does anyone know how to determine the size of the > > physical address? > > It's easy to find a way to decide the length (similar to _offset_), but > copying variable length of bytes seems not an efficient way. > > I agree regarding the efficiency issue. To get something at compile time does RTE_MACHINE or something derived from it help us? Thanks, Jim Thanks, > Jianfeng > >