git: mbuf: Save 16 bytes from pkthdr on x86_64

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Mon Jun 17 02:32:33 PDT 2013


commit b4e5a1079d852748f03f32aae87ecdda27a538d2
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Mon Jun 17 17:28:26 2013 +0800

    mbuf: Save 16 bytes from pkthdr on x86_64
    
    - 'wlan_seqno' is not necessary, reuse the 'ether_vlantag'
    - Not all parts of 'pkthdr_br' is useful; save the ethernet source
      address should be enough.
    - Move 'len' after 'header', on x86_64:
      o  Remove the implicit 4 bytes padding
      o  'len' is still in the same cacheline as before this commit
         (m_hdr is 160 bytes as of this commit)
      o  Make the size of the fields after 'header' but before the 'pf'
         8 bytes aligned, so there will be on implicit padding before 'pf'

Summary of changes:
 sys/net/bridge/if_bridge.c                |  4 ++--
 sys/netproto/802_11/ieee80211_dragonfly.h |  4 ++--
 sys/sys/mbuf.h                            | 19 +++++++------------
 3 files changed, 11 insertions(+), 16 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b4e5a1079d852748f03f32aae87ecdda27a538d2


-- 
DragonFly BSD source repository



More information about the Commits mailing list