Skip to content

net: Avoid the memory waste in some Ethernet drivers

Kevin Hao linux-mm netdev 3 versions – 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 · linked by author and title

  1. v3 Latest4 patches 2 repliesApplied 4/4
  2. v24 patches 9 repliesSuperseded
  3. v14 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- Adjust patch 1 and 2 according to Alexander's suggestion.
- Add Tested-by from Subbaraya.
- Add Reviewed-by from Ioana.

Patches in v3 All 4 applied

#Subject and filesSizeRepliesApplied
1/4mm: page_frag: Introduce page_frag_alloc_align()include/linux/gfp.h mm/page_alloc.c+15 -51 replyApplied
2/4net: Introduce {netdev,napi}_alloc_frag_align()include/linux/skbuff.h net/core/skbuff.c+44 -181 replyApplied
3/4net: octeontx2: Use napi_alloc_frag_align() to avoid the memory wastedrivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c+1 -20 repliesApplied
4/4net: dpaa2: Use napi_alloc_frag_align() to avoid the memory wastedrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c+1 -20 repliesApplied

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchVlastimil BabkaSubbaraya SundeepIoana CiorneiAlexander Duyck
1/4A-b R-b
2/4R-b
3/4T-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH net-next v3 0/4] net: Avoid the memory waste in some Ethernet drivers

Hi,

v3:
- Adjust patch 1 and 2 according to Alexander's suggestion.
- Add Tested-by from Subbaraya.
- Add Reviewed-by from Ioana.

v2:
- Inline page_frag_alloc() and {netdev,napi}_alloc_frag()
- Adopt Vlastimil's suggestion and add his Acked-by

In the current implementation of napi_alloc_frag(), it doesn't have any align guarantee for the returned buffer address. We would have to use some ugly workarounds to make sure that we can get a align buffer address for some Ethernet drivers. This patch series tries to introduce some helper functions to make sure that an align buffer is returned. Then we can drop the ugly workarounds and avoid the unnecessary memory waste.

Kevin Hao (4):
mm: page_frag: Introduce page_frag_alloc_align()
net: Introduce {netdev,napi}_alloc_frag_align()
net: octeontx2: Use napi_alloc_frag_align() to avoid the memory waste
net: dpaa2: Use napi_alloc_frag_align() to avoid the memory waste

 .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  |  3 +-
 .../marvell/octeontx2/nic/otx2_common.c       |  3 +-
 include/linux/gfp.h                           | 12 +++++--
 include/linux/skbuff.h                        | 36 +++++++++++++++++--
 mm/page_alloc.c                               |  8 +++--
 net/core/skbuff.c                             | 26 ++++++--------
 6 files changed, 61 insertions(+), 27 deletions(-)
Signature · 1 line
2.29.2