Prefetch ethernet addresses. This is a no-op on odp-linux but improves performance significantly on odp-dpdk implementation.
Signed-off-by: Matias Elo <matias....@nokia.com> --- 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); + if (odp_packet_has_eth(pkt)) { eth = (odph_ethhdr_t *)odp_packet_l2_ptr(pkt, NULL); -- 1.9.1