On 07/07/16 16:56, Matias Elo wrote:
Prefetch ethernet addresses. This is a no-op on odp-linux but improves
performance significantly on odp-dpdk implementation.
Signed-off-by: Matias Elo <[email protected]>
---
test/performance/odp_l2fwd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
index 164f7f5..cd4789f 100644
--- a/test/performance/odp_l2fwd.c
+++ b/test/performance/odp_l2fwd.c
@@ -255,6 +255,10 @@ static inline void fill_eth_addrs(odp_packet_t pkt_tbl[],
for (i = 0; i < num; ++i) {
pkt = pkt_tbl[i];
+
+ /* Prefetch ethernet addresses */
+ odp_packet_prefetch(pkt, 0, 12);
+
_ODP_ETHHDR_LEN ?
if (odp_packet_has_eth(pkt)) {
eth = (odph_ethhdr_t *)odp_packet_l2_ptr(pkt, NULL);