examples/distributor: fix build for non-x86 arch
_mm_prefetch is defined only in x86 compilers. Use rte_prefetch_non_temporal() abstraction instead of _mm_prefetch(x, 0) to in-order to build distributor application for non x86 platforms Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
This commit is contained in:
parent
ab3af0959d
commit
64502fab90
@ -42,6 +42,7 @@
|
|||||||
#include <rte_cycles.h>
|
#include <rte_cycles.h>
|
||||||
#include <rte_malloc.h>
|
#include <rte_malloc.h>
|
||||||
#include <rte_debug.h>
|
#include <rte_debug.h>
|
||||||
|
#include <rte_prefetch.h>
|
||||||
#include <rte_distributor.h>
|
#include <rte_distributor.h>
|
||||||
|
|
||||||
#define RX_RING_SIZE 256
|
#define RX_RING_SIZE 256
|
||||||
@ -335,13 +336,13 @@ lcore_tx(struct rte_ring *in_r)
|
|||||||
|
|
||||||
/* for traffic we receive, queue it up for transmit */
|
/* for traffic we receive, queue it up for transmit */
|
||||||
uint16_t i;
|
uint16_t i;
|
||||||
_mm_prefetch((void *)bufs[0], 0);
|
rte_prefetch_non_temporal((void *)bufs[0]);
|
||||||
_mm_prefetch((void *)bufs[1], 0);
|
rte_prefetch_non_temporal((void *)bufs[1]);
|
||||||
_mm_prefetch((void *)bufs[2], 0);
|
rte_prefetch_non_temporal((void *)bufs[2]);
|
||||||
for (i = 0; i < nb_rx; i++) {
|
for (i = 0; i < nb_rx; i++) {
|
||||||
struct output_buffer *outbuf;
|
struct output_buffer *outbuf;
|
||||||
uint8_t outp;
|
uint8_t outp;
|
||||||
_mm_prefetch((void *)bufs[i + 3], 0);
|
rte_prefetch_non_temporal((void *)bufs[i + 3]);
|
||||||
/*
|
/*
|
||||||
* workers should update in_port to hold the
|
* workers should update in_port to hold the
|
||||||
* output port value
|
* output port value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user