Hi Marvin,

> -----Original Message-----
> From: Liu, Yong
> Sent: Thursday, January 9, 2020 3:29 PM
> To: Jiang, Cheng1 <[email protected]>; [email protected]
> Cc: [email protected]; Bie, Tiwei <[email protected]>; Wang,
> Zhihong <[email protected]>; Jiang, Cheng1
> <[email protected]>
> Subject: RE: [dpdk-dev] [DPDK] net/virtio: packed ring notification data
> feature support
> 
> 
> 
> > -----Original Message-----
> > From: dev <[email protected]> On Behalf Of Cheng Jiang
> > Sent: Wednesday, December 04, 2019 11:03 PM
> > To: [email protected]
> > Cc: [email protected]; Bie, Tiwei <[email protected]>;
> > Wang, Zhihong <[email protected]>; Jiang, Cheng1
> > <[email protected]>
> > Subject: [dpdk-dev] [DPDK] net/virtio: packed ring notification data
> > feature support
> >
> > This patch supports the feature that the driver passes extra data
> > (besides identifying the virtqueue) in its device notifications.
> >
> > Signed-off-by: Cheng Jiang <[email protected]>
> > ---
> >  drivers/net/virtio/virtio_ethdev.h |  3 ++-
> >  drivers/net/virtio/virtio_pci.c    | 15 ++++++++++++++-
> >  drivers/net/virtio/virtio_pci.h    |  6 ++++++
> >  3 files changed, 22 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/virtio/virtio_ethdev.h
> > b/drivers/net/virtio/virtio_ethdev.h
> > index a10111758..cd8947656 100644
> > --- a/drivers/net/virtio/virtio_ethdev.h
> > +++ b/drivers/net/virtio/virtio_ethdev.h
> > +   if (vtpci_with_feature(hw, VIRTIO_F_RING_PACKED))
> > +           notify_data = ((((uint32_t)vq-
> >vq_packed.used_wrap_counter <<
> > 15) |
> > +                           vq->vq_avail_idx) << 16) | vq-
> >vq_queue_index;
> > +   else
> > +           notify_data = ((uint32_t)vq->vq_avail_idx << 16) |
> > +                           vq->vq_queue_index;
> 
> Hi Cheng,
> According to virtio1.1 spec, wrap counter should refer to next available
> descriptor.
> So used_wrap_counter should be replaced with avail_wrap_counter. Sorry
> for late noticing.
> 
> Thanks,
> Marvin
> 

Sure, I'm going to modify it in the next version.
Thanks very much.

Cheng

> > +   rte_write32(notify_data, vq->notify_addr);
> >  }
> >

Reply via email to