#include <string.h>
#include <errno.h>
-#include <altivec.h>
-
+#include <rte_altivec.h>
#include <rte_byteorder.h>
#include <rte_branch_prediction.h>
#include <rte_cycles.h>
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;
if (unlikely(nb_pkts < RTE_VIRTIO_DESC_PER_LOOP))
return 0;
- nb_used = VIRTQUEUE_NUSED(vq);
+ nb_used = virtqueue_nused(vq);
rte_compiler_barrier();
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];