Skip to content

Bring sizeof(net_device) down to < 2K bytes

Thomas Graf intel-wired-lan netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v13 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- Moved pm_qos_req to e1000e adapter entirely as suggested by Daniel
- Dropped patch 2 based on comment from Eric. __alignof__ is not reliable to derive alignment of kmalloc returned pointer.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2e1000e: Move pm_qos_req to e1000e adapterdrivers/net/ethernet/intel/e1000e/e1000.h drivers/net/ethernet/intel/e1000e/netdev.c include/linux/netdevice.h+5 -51 reply
2/2net_device: Reorder members to fill holesinclude/linux/netdevice.h+21 -241 reply

Reviews trailers per patch

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

PatchJeff KirsherEric Dumazet
1/2A-b
2/2A-b

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

Read the v2 thread

Cover letter [PATCH 0/2 net-next v2] Bring sizeof(net_device) down to < 2K bytes

The size of struct net_device crossed the 2K boundary a while ago which is a waste in combination with many net namespaces. This series brings the size of struct net_device down to well below 2K in total size with a typical configuration. Some reserves a several holes leave room for further expansion.

Before:
/* size: 2176, cachelines: 34, members: 121 */

After:
/* size: 1984, cachelines: 31, members: 120 */

Thomas Graf (2):
e1000e: Move pm_qos_req to e1000e adapter
net_device: Reorder members to fill holes

 drivers/net/ethernet/intel/e1000e/e1000.h  |  1 +
 drivers/net/ethernet/intel/e1000e/netdev.c |  8 +++---
 include/linux/netdevice.h                  | 46 ++++++++++++++----------------
 3 files changed, 26 insertions(+), 29 deletions(-)

---
v2:
- Moved pm_qos_req to e1000e adapter entirely as suggested by Daniel
- Dropped patch 2 based on comment from Eric. __alignof__ is not reliable to derive alignment of kmalloc returned pointer.