Skip to content

First pass of cleanups for pskb_expand_head

Alexander Duyck netdev 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3skb: Drop bad code from pskb_expand_headnet/core/skbuff.c+0 -122 replies
2/3skb: Drop "fastpath" variable for skb_cloned check in pskb_expand_headnet/core/skbuff.c+8 -142 replies
3/3skb: Add inline helper for getting the skb end offset from headdrivers/atm/ambassador.c drivers/atm/idt77252.c drivers/net/wimax/i2400m/usb-rx.c +3 more+21 -112 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchEric Dumazet
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] First pass of cleanups for pskb_expand_head

After looking over the tcp coalesing and GRO code a couple of days ago it occurred to me that pskb_expand_head has a few flaws. A few of which are addressed in this patch series.

This change set takes care of some of the minor cleanup items. One thing that caught my eye is the fact the memmove code in the fast-path is likely no longer doing any thing but burning cycles on a call that doesn't actually move any memory.

The other change is a follow on to that to drop the fastpath variable which really just means if the skb is cloned or not.

The final change in this set just adds an inline for getting the end offset since there were multiple places where we were computing end - head to get the offset and if we are storing it as an offset it makes more sense to just pull the actual value.

There are a few more items that I will try to get to next week. The big one is the fact that pskb_expand_head can mess up the truesize since it can allocate a new head but never updates the truesize. I plan on adding a helper function for the cases where we are just using it unshare the head so I can identify the places where we are actually modifying the size.

---

Alexander Duyck (3):
skb: Add inline helper for getting the skb end offset from head
skb: Drop "fastpath" variable for skb_cloned check in pskb_expand_head
skb: Drop bad code from pskb_expand_head

 drivers/atm/ambassador.c             |    2 +
 drivers/atm/idt77252.c               |    2 +
 drivers/net/wimax/i2400m/usb-rx.c    |    2 +
 drivers/staging/octeon/ethernet-tx.c |    2 +
 include/linux/skbuff.h               |   12 ++++++++-
 net/core/skbuff.c                    |   46 ++++++++++------------------------
 6 files changed, 29 insertions(+), 37 deletions(-)
Signature · 3 lines
Thanks,

Alex