diff mbox

[v2] test: l2fwd: prefetch packet data

Message ID 1467903147-32314-1-git-send-email-matias.elo@nokia.com
State Accepted
Commit 7f87f43fca88cac2cd36ed5fcffcea8ebee10694
Headers show

Commit Message

Elo, Matias (Nokia - FI/Espoo) July 7, 2016, 2:52 p.m. UTC
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.elo@nokia.com>

---

V2:
- Use ODPH_ETHHDR_LEN define (Maxim)

 test/performance/odp_l2fwd.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
1.9.1

Comments

Maxim Uvarov July 8, 2016, 2:19 p.m. UTC | #1
Merged,
Maxim.

On 07/07/16 17:52, 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 <matias.elo@nokia.com>

> ---

>

> V2:

> - Use ODPH_ETHHDR_LEN define (Maxim)

>

>   test/performance/odp_l2fwd.c | 3 +++

>   1 file changed, 3 insertions(+)

>

> diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c

> index 164f7f5..e296b94 100644

> --- a/test/performance/odp_l2fwd.c

> +++ b/test/performance/odp_l2fwd.c

> @@ -255,6 +255,9 @@ static inline void fill_eth_addrs(odp_packet_t pkt_tbl[],

>   

>   	for (i = 0; i < num; ++i) {

>   		pkt = pkt_tbl[i];

> +

> +		odp_packet_prefetch(pkt, 0, ODPH_ETHHDR_LEN);

> +

>   		if (odp_packet_has_eth(pkt)) {

>   			eth = (odph_ethhdr_t *)odp_packet_l2_ptr(pkt, NULL);

>
diff mbox

Patch

diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
index 164f7f5..e296b94 100644
--- a/test/performance/odp_l2fwd.c
+++ b/test/performance/odp_l2fwd.c
@@ -255,6 +255,9 @@  static inline void fill_eth_addrs(odp_packet_t pkt_tbl[],
 
 	for (i = 0; i < num; ++i) {
 		pkt = pkt_tbl[i];
+
+		odp_packet_prefetch(pkt, 0, ODPH_ETHHDR_LEN);
+
 		if (odp_packet_has_eth(pkt)) {
 			eth = (odph_ethhdr_t *)odp_packet_l2_ptr(pkt, NULL);