mbox series

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

Message ID 20210204105638.1584-1-haokexin@gmail.com (mailing list archive)
Headers show
Series net: Avoid the memory waste in some Ethernet drivers | expand

Message

Kevin Hao Feb. 4, 2021, 10:56 a.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 6, 2021, 8:20 p.m. UTC | #1
Hello:

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

On Thu,  4 Feb 2021 18:56:34 +0800 you wrote:
> Hi,
> 
> v3:
>   - Adjust patch 1 and 2 according to Alexander's suggestion.
>   - Add Tested-by from Subbaraya.
>   - Add Reviewed-by from Ioana.
> 
> [...]

Here is the summary with links:
  - [net-next,v3,1/4] mm: page_frag: Introduce page_frag_alloc_align()
    https://git.kernel.org/netdev/net-next/c/b358e2122b9d
  - [net-next,v3,2/4] net: Introduce {netdev,napi}_alloc_frag_align()
    https://git.kernel.org/netdev/net-next/c/3f6e687dff39
  - [net-next,v3,3/4] net: octeontx2: Use napi_alloc_frag_align() to avoid the memory waste
    https://git.kernel.org/netdev/net-next/c/1b041601c798
  - [net-next,v3,4/4] net: dpaa2: Use napi_alloc_frag_align() to avoid the memory waste
    https://git.kernel.org/netdev/net-next/c/d0dfbb9912d9

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html