git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ixgbe: add vector stubs for RISC-V
[dpdk.git]
/
drivers
/
net
/
virtio
/
virtio_rxtx_simple_neon.c
diff --git
a/drivers/net/virtio/virtio_rxtx_simple_neon.c
b/drivers/net/virtio/virtio_rxtx_simple_neon.c
index
992e71f
..
7fd92d1
100644
(file)
--- a/
drivers/net/virtio/virtio_rxtx_simple_neon.c
+++ b/
drivers/net/virtio/virtio_rxtx_simple_neon.c
@@
-12,7
+12,7
@@
#include <rte_branch_prediction.h>
#include <rte_cycles.h>
#include <rte_ether.h>
#include <rte_branch_prediction.h>
#include <rte_cycles.h>
#include <rte_ether.h>
-#include <
rte_
ethdev_driver.h>
+#include <ethdev_driver.h>
#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_mempool.h>
@@
-36,11
+36,12
@@
* - nb_pkts < RTE_VIRTIO_DESC_PER_LOOP, just return no packet
*/
uint16_t
* - nb_pkts < RTE_VIRTIO_DESC_PER_LOOP, just return no packet
*/
uint16_t
-virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
- uint16_t nb_pkts)
+virtio_recv_pkts_vec(void *rx_queue,
+ struct rte_mbuf **__rte_restrict rx_pkts,
+ uint16_t nb_pkts)
{
struct virtnet_rx *rxvq = rx_queue;
{
struct virtnet_rx *rxvq = rx_queue;
- struct virtqueue *vq =
rxvq->vq
;
+ struct virtqueue *vq =
virtnet_rxq_to_vq(rxvq)
;
struct virtio_hw *hw = vq->hw;
uint16_t nb_used, nb_total;
uint16_t desc_idx;
struct virtio_hw *hw = vq->hw;
uint16_t nb_used, nb_total;
uint16_t desc_idx;
@@
-71,8
+72,8
@@
virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
*/
uint16x8_t len_adjust = {
0, 0,
*/
uint16x8_t len_adjust = {
0, 0,
- (uint16_t)
vq->
hw->vtnet_hdr_size, 0,
- (uint16_t)
vq->
hw->vtnet_hdr_size,
+ (uint16_t)hw->vtnet_hdr_size, 0,
+ (uint16_t)hw->vtnet_hdr_size,
0,
0, 0
};
0,
0, 0
};
@@
-83,9
+84,14
@@
virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
if (unlikely(nb_pkts < RTE_VIRTIO_DESC_PER_LOOP))
return 0;
if (unlikely(nb_pkts < RTE_VIRTIO_DESC_PER_LOOP))
return 0;
- nb_used = VIRTQUEUE_NUSED(vq);
+ if (vq->vq_free_cnt >= RTE_VIRTIO_VPMD_RX_REARM_THRESH) {
+ virtio_rxq_rearm_vec(rxvq);
+ if (unlikely(virtqueue_kick_prepare(vq)))
+ virtqueue_notify(vq);
+ }
- rte_rmb();
+ /* virtqueue_nused has a load-acquire or rte_io_rmb inside */
+ nb_used = virtqueue_nused(vq);
if (unlikely(nb_used == 0))
return 0;
if (unlikely(nb_used == 0))
return 0;
@@
-100,12
+106,6
@@
virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
rte_prefetch_non_temporal(rused);
rte_prefetch_non_temporal(rused);
- if (vq->vq_free_cnt >= RTE_VIRTIO_VPMD_RX_REARM_THRESH) {
- virtio_rxq_rearm_vec(rxvq);
- if (unlikely(virtqueue_kick_prepare(vq)))
- virtqueue_notify(vq);
- }
-
nb_total = nb_used;
ref_rx_pkts = rx_pkts;
for (nb_pkts_received = 0;
nb_total = nb_used;
ref_rx_pkts = rx_pkts;
for (nb_pkts_received = 0;