netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/4] net: Avoid the memory waste in some Ethernet drivers
@ 2021-02-04 10:56 Kevin Hao
  2021-02-04 10:56 ` [PATCH net-next v3 1/4] mm: page_frag: Introduce page_frag_alloc_align() Kevin Hao
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Kevin Hao @ 2021-02-04 10:56 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Andrew Morton; +Cc: netdev, linux-mm

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(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-06 20:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 10:56 [PATCH net-next v3 0/4] net: Avoid the memory waste in some Ethernet drivers Kevin Hao
2021-02-04 10:56 ` [PATCH net-next v3 1/4] mm: page_frag: Introduce page_frag_alloc_align() Kevin Hao
2021-02-04 16:11   ` Alexander Duyck
2021-02-04 10:56 ` [PATCH net-next v3 2/4] net: Introduce {netdev,napi}_alloc_frag_align() Kevin Hao
2021-02-04 16:19   ` Alexander Duyck
2021-02-04 10:56 ` [PATCH net-next v3 3/4] net: octeontx2: Use napi_alloc_frag_align() to avoid the memory waste Kevin Hao
2021-02-04 10:56 ` [PATCH net-next v3 4/4] net: dpaa2: " Kevin Hao
2021-02-06 20:20 ` [PATCH net-next v3 0/4] net: Avoid the memory waste in some Ethernet drivers patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).