diff options
| author | David S. Miller <davem@davemloft.net> | 2015-06-11 16:33:11 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-06-11 16:33:11 -0700 |
| commit | c63264def3393dd123bfa630a7a46b5d6d2d6038 (patch) | |
| tree | 41407a1b7f806138bed09918c3d9fe55daf0decb /include | |
| parent | 57225e7720ac3d7ffcb0086c716753abf6e54e8d (diff) | |
| parent | b5e2c45783aa785cbb195e43d5f0c0c6b228bde4 (diff) | |
Merge branch 'tcp-gso-settings-defer'
Eric Dumazet says:
====================
tcp: defer shinfo->gso_size|type settings
We put shinfo->gso_segs in TCP_SKB_CB(skb) a while back for performance
reasons.
This was in commit cd7d8498c9a5 ("tcp: change tcp_skb_pcount() location")
This patch series complete the job for gso_size and gso_type, so that
we do not bring 2 extra cache lines in tcp write xmit fast path,
and making tcp_init_tso_segs() simpler and faster.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/tcp.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 978cebedd3fc..950cfecaad3c 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -730,11 +730,14 @@ struct tcp_skb_cb { /* Note : tcp_tw_isn is used in input path only * (isn chosen by tcp_timewait_state_process()) * - * tcp_gso_segs is used in write queue only, - * cf tcp_skb_pcount() + * tcp_gso_segs/size are used in write queue only, + * cf tcp_skb_pcount()/tcp_skb_mss() */ __u32 tcp_tw_isn; - __u32 tcp_gso_segs; + struct { + u16 tcp_gso_segs; + u16 tcp_gso_size; + }; }; __u8 tcp_flags; /* TCP header flags. (tcp[13]) */ @@ -790,10 +793,10 @@ static inline void tcp_skb_pcount_add(struct sk_buff *skb, int segs) TCP_SKB_CB(skb)->tcp_gso_segs += segs; } -/* This is valid iff tcp_skb_pcount() > 1. */ +/* This is valid iff skb is in write queue and tcp_skb_pcount() > 1. */ static inline int tcp_skb_mss(const struct sk_buff *skb) { - return skb_shinfo(skb)->gso_size; + return TCP_SKB_CB(skb)->tcp_gso_size; } /* Events passed to congestion control interface */ |
