Skip to content

Commit

Permalink
skbuff: Move rxhash and vlan_tci to consolidate holes in sk_buff
Browse files Browse the repository at this point in the history
This change helps to reduce the overall size of the sk_buff by moving
rxhash and vlan_tci so that the u16 values and u8 bitfields can be better
combined to create only one hole instead of multiple.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Feb 10, 2012
1 parent 8a0da21 commit 4031ae6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,15 +438,18 @@ struct sk_buff {
#endif

int skb_iif;

__u32 rxhash;

__u16 vlan_tci;

#ifdef CONFIG_NET_SCHED
__u16 tc_index; /* traffic control index */
#ifdef CONFIG_NET_CLS_ACT
__u16 tc_verd; /* traffic control verdict */
#endif
#endif

__u32 rxhash;

__u16 queue_mapping;
kmemcheck_bitfield_begin(flags2);
#ifdef CONFIG_IPV6_NDISC_NODETYPE
Expand All @@ -470,8 +473,6 @@ struct sk_buff {
__u32 dropcount;
};

__u16 vlan_tci;

sk_buff_data_t transport_header;
sk_buff_data_t network_header;
sk_buff_data_t mac_header;
Expand Down

0 comments on commit 4031ae6

Please sign in to comment.