]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: switch back to proper tcp_skb_cb size check in tcp_init()
authorEric Dumazet <edumazet@google.com>
Tue, 20 Sep 2016 03:39:12 +0000 (23:39 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Sep 2016 04:23:00 +0000 (00:23 -0400)
commitc7b66ac65536d92145ecb426b4a5f6e1136501e6
tree3d854b9e251be86efe1d816201163f8f33c0c4b5
parentcb8c6b2c8ba094759b183d966afd331261bc83cf
tcp: switch back to proper tcp_skb_cb size check in tcp_init()

Revert to the tcp_skb_cb size check that tcp_init() had before commit
3b9dbb4dcb2f ("net: use common macro for assering skb->cb[] available
size in protocol families"). As related commit ec7bfd1e4e98 ("net:
move skb->dropcount to skb->cb[]") explains, the
sock_skb_cb_check_size() mechanism was added to ensure that there is
space for dropcount, "for protocol families using it". But TCP is not
a protocol using dropcount, so tcp_init() doesn't need to provision
space for dropcount in the skb->cb[], and thus we can revert to the
older form of the tcp_skb_cb size check. Doing so allows TCP to use 4
more bytes of the skb->cb[] space.

Fixes: 3b9dbb4dcb2f ("net: use common macro for assering skb->cb[] available size in protocol families")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c