veth: refine napi usage
authorPaolo Abeni <pabeni@redhat.com>
Fri, 9 Apr 2021 11:04:39 +0000 (13:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Apr 2021 23:39:28 +0000 (16:39 -0700)
commit47e550e0105be9b716a3860545731735a67c6b3c
treea28fa40ac9662605aebf6c0387115e17c8b80e65
parentd3256efd8e8b234a6251e4d4580bd2c3c31fdc4c
veth: refine napi usage

After the previous patch, when enabling GRO, locally generated
TCP traffic experiences some measurable overhead, as it traverses
the GRO engine without any chance of aggregation.

This change refine the NAPI receive path admission test, to avoid
unnecessary GRO overhead in most scenarios, when GRO is enabled
on a veth peer.

Only skbs that are eligible for aggregation enter the GRO layer,
the others will go through the traditional receive path.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/veth.c