]> git.baikalelectronics.ru Git - kernel.git/commit
net: move skb->dropcount to skb->cb[]
authorEyal Birger <eyal.birger@gmail.com>
Sun, 1 Mar 2015 12:58:31 +0000 (14:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2015 05:19:30 +0000 (00:19 -0500)
commitec7bfd1e4e985fa7f4d4632cbfc97b2e66b573c2
treee8e54af77636cf51a1146cd638275f940bfe3db9
parent80ef4edf2d633e44975dc90f53bc4899ac6c7735
net: move skb->dropcount to skb->cb[]

Commit 4b816063eadc ("af_packet: add interframe drop cmsg (v6)")
unionized skb->mark and skb->dropcount in order to allow recording
of the socket drop count while maintaining struct sk_buff size.

skb->dropcount was introduced since there was no available room
in skb->cb[] in packet sockets. However, its introduction led to
the inability to export skb->mark, or any other aliased field to
userspace if so desired.

Moving the dropcount metric to skb->cb[] eliminates this problem
at the expense of 4 bytes less in skb->cb[] for protocol families
using it.

Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
include/net/sock.h
net/socket.c