DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Fu, Patrick" <patrick.fu@intel.com>
To: "Xia, Chenbo" <chenbo.xia@intel.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"amorenoz@redhat.com" <amorenoz@redhat.com>
Subject: Re: [dpdk-dev] [PATCH 7/7] net/virtio: introduce Vhost-vDPA backend
Date: Thu, 24 Sep 2020 05:43:55 +0000	[thread overview]
Message-ID: <MWHPR11MB00325670662B3B88836E3DD084390@MWHPR11MB0032.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MN2PR11MB40637BDE1AD9796618DAA3E99C390@MN2PR11MB4063.namprd11.prod.outlook.com>

> -----Original Message-----
> From: Xia, Chenbo <chenbo.xia@intel.com>
> Sent: Thursday, September 24, 2020 1:26 PM
> To: Maxime Coquelin <maxime.coquelin@redhat.com>; dev@dpdk.org; Fu,
> Patrick <patrick.fu@intel.com>; amorenoz@redhat.com
> Subject: RE: [dpdk-dev] [PATCH 7/7] net/virtio: introduce Vhost-vDPA
> backend
> 
> Hi Maxime,
> 
> > +
> > +/**
> > + * Set up environment to talk with a vhost vdpa backend.
> > + *
> > + * @return
> > + *   - (-1) if fail to set up;
> > + *   - (>=0) if successful.
> > + */
> > +static int
> > +vhost_vdpa_setup(struct virtio_user_dev *dev)
> > +{
> > +	uint32_t did = (uint32_t)-1;
> 
> I see in kernel, 'did' should be u8:
> 
> static long vhost_vdpa_get_device_id(struct vhost_vdpa *v, u8 __user *argp)
> 
> So I think here did should be uint8_t?
> 

Actually `did` is u32 in kernel. argp is just a user pointer. Whether it's u8* or u32* has nothing to do with the `did` data size 

refer to control code def:
#define VHOST_VDPA_GET_DEVICE_ID	_IOR(VHOST_VIRTIO, 0x70, __u32)

Thanks,

Patrick

  reply	other threads:[~2020-09-24  5:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 15:07 [dpdk-dev] [PATCH 0/7]virtio-user: introduce vhost-vdpa backend Maxime Coquelin
2020-09-11 15:07 ` [dpdk-dev] [PATCH 1/7] bus/vdev: add DMA mapping ops Maxime Coquelin
2020-09-24  5:25   ` Xia, Chenbo
2020-09-24  7:40     ` Maxime Coquelin
2020-09-11 15:08 ` [dpdk-dev] [PATCH 2/7] net/virtio: introduce DMA ops Maxime Coquelin
2020-09-11 15:08 ` [dpdk-dev] [PATCH 3/7] net/virtio: introduce Vhost-vDPA backend type Maxime Coquelin
2020-09-11 15:08 ` [dpdk-dev] [PATCH 4/7] net/virtio: adapt Virtio-user status size Maxime Coquelin
2020-09-24  5:25   ` Xia, Chenbo
2020-09-24  8:05     ` Maxime Coquelin
2020-09-11 15:08 ` [dpdk-dev] [PATCH 5/7] net/virtio: check protocol feature in user backend Maxime Coquelin
2020-09-11 15:08 ` [dpdk-dev] [PATCH 6/7] net/virtio: split virtio-user start Maxime Coquelin
2020-09-11 15:08 ` [dpdk-dev] [PATCH 7/7] net/virtio: introduce Vhost-vDPA backend Maxime Coquelin
2020-09-24  5:25   ` Xia, Chenbo
2020-09-24  5:43     ` Fu, Patrick [this message]
2020-09-24  5:52       ` Xia, Chenbo
2020-09-24  8:07     ` Maxime Coquelin

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=MWHPR11MB00325670662B3B88836E3DD084390@MWHPR11MB0032.namprd11.prod.outlook.com \
    --to=patrick.fu@intel.com \
    --cc=amorenoz@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.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).