Skip to content

sk_buff: optimize GRO for the common case

Paolo Abeni netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (refs/heads/master):

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 2 repliesApplied 6/6

Patches in v1 All 6 applied

#Subject and filesSizeRepliesApplied
1/6sk_buff: introduce 'slow_gro' flagsinclude/linux/skbuff.h+4 -00 repliesApplied
2/6sk_buff: track dst status in slow_groinclude/linux/skbuff.h include/net/dst.h+4 -02 repliesApplied
3/6sk_buff: track extension status in slow_gronet/core/skbuff.c+1 -00 repliesApplied
4/6net: optimize GRO for the common case.net/core/dev.c net/core/skbuff.c+28 -110 repliesApplied
5/6skbuff: allow 'slow_gro' for skb carring sock referenceinclude/net/sock.h net/core/dev.c net/core/skbuff.c+24 -40 repliesApplied
6/6veth: use skb_prepare_for_gro()drivers/net/veth.c+1 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/6] sk_buff: optimize GRO for the common case

This is a trimmed down revision of "sk_buff: optimize layout for GRO", specifically dropping the changes to the sk_buff layout[1].

This series tries to accomplish 2 goals:
- optimize the GRO stage for the most common scenario, avoiding a bunch of conditional and some more code
- let owned skbs entering the GRO engine, allowing backpressure in the veth GRO forward path.

A new sk_buff flag (!!!) is introduced and maintained for GRO's sake. Such field uses an existing hole, so there is no change to the sk_buff size.

[1] two main reasons:
- move skb->inner_ field requires some extra care, as some in kernel users access and the fields regardless of skb->encapsulation.
- extending secmark size clash with ct and nft uAPIs

address the all above is possible, I think, but for sure not in a single series.

Paolo Abeni (6):
sk_buff: introduce 'slow_gro' flags
sk_buff: track dst status in slow_gro
sk_buff: track extension status in slow_gro
net: optimize GRO for the common case.
skbuff: allow 'slow_gro' for skb carring sock reference
veth: use skb_prepare_for_gro()

 drivers/net/veth.c     |  2 +-
 include/linux/skbuff.h |  6 ++++++
 include/net/dst.h      |  2 ++
 include/net/sock.h     |  9 +++++++++
 net/core/dev.c         | 32 ++++++++++++++++++++++++--------
 net/core/skbuff.c      | 27 ++++++++++++++++++++-------
 6 files changed, 62 insertions(+), 16 deletions(-)
Signature · 1 line
2.26.3