examples/l3fwd: remove useless reloads in LPM main loop
authorRuifeng Wang <ruifeng.wang@arm.com>
Thu, 10 Jun 2021 06:57:40 +0000 (06:57 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 5 Jul 2021 09:30:58 +0000 (11:30 +0200)
commit74fb854a3de6899f1846c2e929462d830cf04d83
tree664426d48507ad32f3a182aa0a7071abc991632a
parentd76d65060c31900959c8b42f958da6441603e660
examples/l3fwd: remove useless reloads in LPM main loop

Number of rx queue and number of rx port in lcore config are constants
during the period of l3 forward application running. But compiler has
no this information.

Copied values from lcore config to local variables and used the local
variables for iteration. Compiler can see that the local variables are
not changed, so qconf reloads at each iteration can be eliminated.

The change showed 1.8% performance uplift in single core, single port,
single queue test on N1SDP platform with MLX5 NIC.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
examples/l3fwd/l3fwd_lpm.c