Skip to content

Commit 4398f3f

Browse files
kuba-moodavem330
authored andcommitted
net: skbuff: move alloc_cpu into a potential hole
alloc_cpu is currently between 4 byte fields, so it's almost guaranteed to create a 2B hole. It has a knock on effect of creating a 4B hole after @EnD (and @EnD and @tail being in different cachelines). None of this matters hugely, but for kernel configs which don't enable all the features there may well be a 2B hole after the bitfield. Move alloc_cpu there. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c24831a commit 4398f3f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

include/linux/skbuff.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,8 @@ struct sk_buff {
991991
__u16 tc_index; /* traffic control index */
992992
#endif
993993

994+
u16 alloc_cpu;
995+
994996
union {
995997
__wsum csum;
996998
struct {
@@ -1014,7 +1016,6 @@ struct sk_buff {
10141016
unsigned int sender_cpu;
10151017
};
10161018
#endif
1017-
u16 alloc_cpu;
10181019
#ifdef CONFIG_NETWORK_SECMARK
10191020
__u32 secmark;
10201021
#endif

0 commit comments

Comments
 (0)