[dpdk-dev] [PATCH 7/7] net/virtio: introduce Vhost-vDPA backend
Xia, Chenbo
chenbo.xia at intel.com
Thu Sep 24 07:52:41 CEST 2020
Hi Patrick,
> -----Original Message-----
> From: Fu, Patrick <patrick.fu at intel.com>
> Sent: Thursday, September 24, 2020 1:44 PM
> To: Xia, Chenbo <chenbo.xia at intel.com>; Maxime Coquelin
> <maxime.coquelin at redhat.com>; dev at dpdk.org; amorenoz at redhat.com
> Subject: RE: [dpdk-dev] [PATCH 7/7] net/virtio: introduce Vhost-vDPA
> backend
>
> > -----Original Message-----
> > From: Xia, Chenbo <chenbo.xia at intel.com>
> > Sent: Thursday, September 24, 2020 1:26 PM
> > To: Maxime Coquelin <maxime.coquelin at redhat.com>; dev at dpdk.org; Fu,
> > Patrick <patrick.fu at intel.com>; amorenoz at 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)
Yes, you are right!
@Maxime Coquelin Please ignore this comment 😊
>
> Thanks,
>
> Patrick
More information about the dev
mailing list