diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2007-11-15 22:41:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:54:03 -0500 |
commit | a47e5a988a575e64c8c9bae65a1dfe3dca7cba32 (patch) | |
tree | 30c389efb3a98a7af24150e5f6462f3c379d1e63 /include | |
parent | 85cc391c0e4584db594bfc4005c63c07c76c5077 (diff) |
[TCP]: Convert highest_sack to sk_buff to allow direct access
It is going to replace the sack fastpath hint quite soon... :-)
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/tcp.h | 6 | ||||
-rw-r--r-- | include/net/tcp.h | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index bac17c59b24e..34acee662230 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -332,8 +332,10 @@ struct tcp_sock { | |||
332 | 332 | ||
333 | struct tcp_sack_block_wire recv_sack_cache[4]; | 333 | struct tcp_sack_block_wire recv_sack_cache[4]; |
334 | 334 | ||
335 | u32 highest_sack; /* Start seq of globally highest revd SACK | 335 | struct sk_buff *highest_sack; /* highest skb with SACK received |
336 | * (validity guaranteed only if sacked_out > 0) */ | 336 | * (validity guaranteed only if |
337 | * sacked_out > 0) | ||
338 | */ | ||
337 | 339 | ||
338 | /* from STCP, retrans queue hinting */ | 340 | /* from STCP, retrans queue hinting */ |
339 | struct sk_buff* lost_skb_hint; | 341 | struct sk_buff* lost_skb_hint; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index d893b4480769..0ede804b16d4 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1312,6 +1312,16 @@ static inline int tcp_write_queue_empty(struct sock *sk) | |||
1312 | return skb_queue_empty(&sk->sk_write_queue); | 1312 | return skb_queue_empty(&sk->sk_write_queue); |
1313 | } | 1313 | } |
1314 | 1314 | ||
1315 | /* Start sequence of the highest skb with SACKed bit, valid only if | ||
1316 | * sacked > 0 or when the caller has ensured validity by itself. | ||
1317 | */ | ||
1318 | static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp) | ||
1319 | { | ||
1320 | if (!tp->sacked_out) | ||
1321 | return tp->snd_una; | ||
1322 | return TCP_SKB_CB(tp->highest_sack)->seq; | ||
1323 | } | ||
1324 | |||
1315 | /* /proc */ | 1325 | /* /proc */ |
1316 | enum tcp_seq_states { | 1326 | enum tcp_seq_states { |
1317 | TCP_SEQ_STATE_LISTENING, | 1327 | TCP_SEQ_STATE_LISTENING, |