X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fvirtio%2Fvirtio_rxtx_packed_neon.h;h=f19e6186357a6844f6cac61f9542dfd5e890c915;hb=c5a49265fc232ac382d4609b264b57b3d65dbbe3;hp=ae2d099c0b5afb9fc2ae65c9eecc3a01a3fff0b7;hpb=17043a2909bb366c57640b5816a86f02d67f807b;p=dpdk.git diff --git a/drivers/net/virtio/virtio_rxtx_packed_neon.h b/drivers/net/virtio/virtio_rxtx_packed_neon.h index ae2d099c0b..f19e618635 100644 --- a/drivers/net/virtio/virtio_rxtx_packed_neon.h +++ b/drivers/net/virtio/virtio_rxtx_packed_neon.h @@ -12,7 +12,7 @@ #include #include "virtio_ethdev.h" -#include "virtio_pci.h" +#include "virtio.h" #include "virtio_rxtx_packed.h" #include "virtqueue.h" @@ -20,7 +20,7 @@ static inline int virtqueue_enqueue_batch_packed_vec(struct virtnet_tx *txvq, struct rte_mbuf **tx_pkts) { - struct virtqueue *vq = txvq->vq; + struct virtqueue *vq = virtnet_txq_to_vq(txvq); uint16_t head_size = vq->hw->vtnet_hdr_size; uint16_t idx = vq->vq_avail_idx; struct virtio_net_hdr *hdr; @@ -71,8 +71,8 @@ virtqueue_enqueue_batch_packed_vec(struct virtnet_tx *txvq, uint32x4_t def_ref_seg = vdupq_n_u32(0x10001); /* Check refcnt and nb_segs. */ uint32x4_t ref_seg = vreinterpretq_u32_u8(vqtbl2q_u8(mbuf, ref_seg_msk)); - poly128_t cmp1 = vreinterpretq_p128_u32(~vceqq_u32(ref_seg, def_ref_seg)); - if (unlikely(cmp1)) + uint64x2_t cmp1 = vreinterpretq_u64_u32(~vceqq_u32(ref_seg, def_ref_seg)); + if (unlikely(vgetq_lane_u64(cmp1, 0) || vgetq_lane_u64(cmp1, 1))) return -1; /* Check headroom is enough. */ @@ -134,7 +134,7 @@ virtqueue_enqueue_batch_packed_vec(struct virtnet_tx *txvq, virtio_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) { hdr = rte_pktmbuf_mtod_offset(tx_pkts[i], struct virtio_net_hdr *, -head_size); - virtqueue_xmit_offload(hdr, tx_pkts[i], true); + virtqueue_xmit_offload(hdr, tx_pkts[i]); } } @@ -163,7 +163,7 @@ static inline int virtqueue_dequeue_batch_packed_vec(struct virtnet_rx *rxvq, struct rte_mbuf **rx_pkts) { - struct virtqueue *vq = rxvq->vq; + struct virtqueue *vq = virtnet_rxq_to_vq(rxvq); struct virtio_hw *hw = vq->hw; uint16_t head_size = hw->vtnet_hdr_size; uint16_t id = vq->vq_used_cons_idx; @@ -225,10 +225,10 @@ virtqueue_dequeue_batch_packed_vec(struct virtnet_rx *rxvq, if (vq->vq_packed.used_wrap_counter) v_used_flag = vdupq_n_u32(PACKED_FLAGS_MASK); - poly128_t desc_stats = vreinterpretq_p128_u32(~vceqq_u32(v_flag, v_used_flag)); + uint64x2_t desc_stats = vreinterpretq_u64_u32(~vceqq_u32(v_flag, v_used_flag)); /* Check all descs are used. */ - if (desc_stats) + if (unlikely(vgetq_lane_u64(desc_stats, 0) || vgetq_lane_u64(desc_stats, 1))) return -1; /* Load 2 mbuf pointers per time. */