On Thu, Oct 25, 2018 at 03:54:16PM +0200, Jens Freimann wrote:
> On Thu, Oct 25, 2018 at 05:39:09PM +0800, Tiwei Bie wrote:
> > On Wed, Oct 24, 2018 at 04:32:34PM +0200, Jens Freimann wrote:
> > > Implement the receive part.
> > > 
> > > Signed-off-by: Jens Freimann <jfreim...@redhat.com>
> > > ---
> > >  drivers/net/virtio/virtio_ethdev.c |  18 +-
> > >  drivers/net/virtio/virtio_ethdev.h |   2 +
> > >  drivers/net/virtio/virtio_rxtx.c   | 280 ++++++++++++++++++++++++++---
> > >  drivers/net/virtio/virtqueue.c     |  22 +++
> > >  drivers/net/virtio/virtqueue.h     |   2 +-
> > >  5 files changed, 297 insertions(+), 27 deletions(-)
> > > 
> > > diff --git a/drivers/net/virtio/virtio_ethdev.c 
> > > b/drivers/net/virtio/virtio_ethdev.c
> > > index d2118e6a9..7f81d24aa 100644
> > > --- a/drivers/net/virtio/virtio_ethdev.c
> > > +++ b/drivers/net/virtio/virtio_ethdev.c
> > > @@ -384,8 +384,10 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t 
> > > vtpci_queue_idx)
> > >   vq->hw = hw;
> > >   vq->vq_queue_index = vtpci_queue_idx;
> > >   vq->vq_nentries = vq_size;
> > > - if (vtpci_packed_queue(hw))
> > > + if (vtpci_packed_queue(hw)) {
> > >           vq->vq_ring.avail_wrap_counter = 1;
> > > +         vq->vq_ring.used_wrap_counter = 1;
> > 
> > Why just use used_wrap_counter in receive path?
> 
> You mean add it in a previous patch?
> 

Hmm, the used_wrap_counter is already used in the previous
patch, but it wasn't initialized until the receive path
is added. We should have a patch to introduce these packed
ring related generic fields (e.g. the wrap counters and
vring) in struct virtqueue and also do the corresponding
initializations in that patch too (maybe we can do this
in the current 1/8 patch).

Reply via email to