DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: Jim Murphy <jmurphy@arista.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/virtio-user: fix not working on 32-bit	system
Date: Wed, 20 Sep 2017 02:17:24 +0000	[thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E36512EB0C4@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <CAJC5fi0em1nssBTROzqkG1QCSc20vUybBodKUuspaFOBsxLTyQ@mail.gmail.com>

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?

> 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.

> 
> 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.

Thanks,
Jianfeng


  reply	other threads:[~2017-09-20  2:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 22:24 Jim Murphy
2017-09-20  2:17 ` Tan, Jianfeng [this message]
2017-09-20  2:55   ` Jim Murphy
  -- strict thread matches above, loose matches on Subject: below --
2017-04-13 14:12 [dpdk-dev] [PATCH] " Jianfeng Tan
2017-04-19  2:30 ` [dpdk-dev] [PATCH v2] " Jianfeng Tan
2017-04-19  5:53   ` Yuanhan Liu
2017-04-19  6:21     ` Tan, Jianfeng
2017-04-19  6:24       ` Yuanhan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ED26CBA2FAD1BF48A8719AEF02201E36512EB0C4@SHSMSX103.ccr.corp.intel.com \
    --to=jianfeng.tan@intel.com \
    --cc=dev@dpdk.org \
    --cc=jmurphy@arista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).