aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorLawrence Brakmo <brakmo@fb.com>2016-05-06 23:35:35 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-09 00:03:26 -0400
commitb75803d52a2ce1f6cbaf7ae0ae40a369210070cf (patch)
tree87760e042352445348961f6e4326d11a0e6b4a20 /include/net/tcp.h
parent7d945796754a0394b0c5c35d8f80a4a805c7dbb9 (diff)
tcp: refactor struct tcp_skb_cb
Refactor tcp_skb_cb to create two overlaping areas to store state for incoming or outgoing skbs based on comments by Neal Cardwell to tcp_nv patch: AFAICT this patch would not require an increase in the size of sk_buff cb[] if it were to take advantage of the fact that the tcp_skb_cb header.h4 and header.h6 fields are only used in the packet reception code path, and this in_flight field is only used on the transmit side. Signed-off-by: Lawrence Brakmo <brakmo@fb.com> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 24ec80483805..4775a1bba7f7 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -765,11 +765,16 @@ struct tcp_skb_cb {
765 unused:6; 765 unused:6;
766 __u32 ack_seq; /* Sequence number ACK'd */ 766 __u32 ack_seq; /* Sequence number ACK'd */
767 union { 767 union {
768 struct inet_skb_parm h4; 768 struct {
769 /* There is space for up to 20 bytes */
770 } tx; /* only used for outgoing skbs */
771 union {
772 struct inet_skb_parm h4;
769#if IS_ENABLED(CONFIG_IPV6) 773#if IS_ENABLED(CONFIG_IPV6)
770 struct inet6_skb_parm h6; 774 struct inet6_skb_parm h6;
771#endif 775#endif
772 } header; /* For incoming frames */ 776 } header; /* For incoming skbs */
777 };
773}; 778};
774 779
775#define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0])) 780#define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0]))