DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: <dev@dpdk.org>
Cc: viktorin@rehivetech.com
Subject: [dpdk-dev] [PATCH v2 2/2] examples/distributor: remove IA specific __mm_prefetch
Date: Fri, 12 Feb 2016 16:43:51 +0530	[thread overview]
Message-ID: <1455275631-30507-3-git-send-email-jerin.jacob@caviumnetworks.com> (raw)
In-Reply-To: <1455275631-30507-1-git-send-email-jerin.jacob@caviumnetworks.com>

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>
---
 examples/distributor/main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 4e74f8f..c0201a9 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -42,6 +42,7 @@
 #include <rte_cycles.h>
 #include <rte_malloc.h>
 #include <rte_debug.h>
+#include <rte_prefetch.h>
 #include <rte_distributor.h>
 
 #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 */
 			uint16_t i;
-			_mm_prefetch((void *)bufs[0], 0);
-			_mm_prefetch((void *)bufs[1], 0);
-			_mm_prefetch((void *)bufs[2], 0);
+			rte_prefetch_non_temporal((void *)bufs[0]);
+			rte_prefetch_non_temporal((void *)bufs[1]);
+			rte_prefetch_non_temporal((void *)bufs[2]);
 			for (i = 0; i < nb_rx; i++) {
 				struct output_buffer *outbuf;
 				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
 				 * output port value
-- 
2.1.0

  parent reply	other threads:[~2016-02-12 11:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-06 15:24 [dpdk-dev] [RFC PATCH 0/2] Fix examples/distributor build issue for non x86 Jerin Jacob
2015-12-06 15:24 ` [dpdk-dev] [PATCH 1/2] eal: introduce rte_prefetch_non_temporal Jerin Jacob
2016-02-11 11:00   ` Thomas Monjalon
2016-02-11 11:43   ` Jan Viktorin
2015-12-06 15:24 ` [dpdk-dev] [PATCH 2/2] examples/distributor: remove IA specific __mm_prefetch Jerin Jacob
2016-01-29  3:21 ` [dpdk-dev] [RFC PATCH 0/2] Fix examples/distributor build issue for non x86 Jerin Jacob
2016-01-29 15:03   ` Bruce Richardson
2016-01-29 16:53     ` Jerin Jacob
2016-02-12 11:13 ` [dpdk-dev] [PATCH v2 " Jerin Jacob
2016-02-12 11:13   ` [dpdk-dev] [PATCH v2 1/2] eal: introduce rte_prefetch_non_temporal Jerin Jacob
2016-02-12 11:13   ` Jerin Jacob [this message]
2016-02-16  6:28   ` [dpdk-dev] [PATCH v2 0/2] Fix examples/distributor build issue for non x86 Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455275631-30507-3-git-send-email-jerin.jacob@caviumnetworks.com \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=viktorin@rehivetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).