summaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorIlpo Järvinen2007-11-16 04:41:46 +0100
committerDavid S. Miller2008-01-28 23:54:03 +0100
commita47e5a988a575e64c8c9bae65a1dfe3dca7cba32 (patch)
tree30c389efb3a98a7af24150e5f6462f3c379d1e63 /include/net/tcp.h
parent[TCP]: non-FACK SACK follows conservative SACK loss recovery (diff)
downloadkernel-qcow2-linux-a47e5a988a575e64c8c9bae65a1dfe3dca7cba32.tar.gz
kernel-qcow2-linux-a47e5a988a575e64c8c9bae65a1dfe3dca7cba32.tar.xz
kernel-qcow2-linux-a47e5a988a575e64c8c9bae65a1dfe3dca7cba32.zip
[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/net/tcp.h')
-rw-r--r--include/net/tcp.h10
1 files changed, 10 insertions, 0 deletions
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)
return skb_queue_empty(&sk->sk_write_queue);
}
+/* Start sequence of the highest skb with SACKed bit, valid only if
+ * sacked > 0 or when the caller has ensured validity by itself.
+ */
+static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp)
+{
+ if (!tp->sacked_out)
+ return tp->snd_una;
+ return TCP_SKB_CB(tp->highest_sack)->seq;
+}
+
/* /proc */
enum tcp_seq_states {
TCP_SEQ_STATE_LISTENING,