X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fvirtio%2Fvirtio_rxtx_simple_altivec.c;h=a260ebdf5735436f9cd16cde1de5a15291e7928b;hb=c47d6e83334e656f85e4bb6881cf63da38276b0a;hp=f856396abefcd0ea5091ecd7fa39e610dba8bdd1;hpb=86d1afa12c49a6929133013ae689ebf1739e46ff;p=dpdk.git diff --git a/drivers/net/virtio/virtio_rxtx_simple_altivec.c b/drivers/net/virtio/virtio_rxtx_simple_altivec.c index f856396abe..a260ebdf57 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_altivec.c +++ b/drivers/net/virtio/virtio_rxtx_simple_altivec.c @@ -9,8 +9,7 @@ #include #include -#include - +#include #include #include #include @@ -44,7 +43,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, struct virtnet_rx *rxvq = rx_queue; struct virtqueue *vq = rxvq->vq; struct virtio_hw *hw = vq->hw; - uint16_t nb_used; + uint16_t nb_used, nb_total; uint16_t desc_idx; struct vring_used_elem *rused; struct rte_mbuf **sw_ring; @@ -86,7 +85,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, if (unlikely(nb_pkts < RTE_VIRTIO_DESC_PER_LOOP)) return 0; - nb_used = VIRTQUEUE_NUSED(vq); + nb_used = virtqueue_nused(vq); rte_compiler_barrier(); @@ -109,9 +108,10 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, virtqueue_notify(vq); } + nb_total = nb_used; ref_rx_pkts = rx_pkts; for (nb_pkts_received = 0; - nb_pkts_received < nb_used;) { + nb_pkts_received < nb_total;) { vector unsigned char desc[RTE_VIRTIO_DESC_PER_LOOP / 2]; vector unsigned char mbp[RTE_VIRTIO_DESC_PER_LOOP / 2]; vector unsigned char pkt_mb[RTE_VIRTIO_DESC_PER_LOOP];