[PATCH] examples/l2fwd: add check of Rx packets count

Stephen Hemminger stephen at networkplumber.org
Wed Jul 20 19:32:54 CEST 2022


On Wed, 25 May 2022 14:43:27 +0530
Rahul Bhansali <rbhansali at marvell.com> wrote:

> An additional check is added to avoid extra processing if
> receive packets are 0.
> 
> Performance impact: with Marvell OCTEON TX2 platform, observed an
> improvement by ~14%.
> 
> Signed-off-by: Rahul Bhansali <rbhansali at marvell.com>

This makes sense. Could drop the unlikely() since in general unlikely
should be reserved for error cases. But doubt it matters at all.

Did a quick check the other examples do similar thing already.

Acked-by: Stephen Hemminger <stephen at networkplumber.org>


More information about the dev mailing list