From: =?ISO-8859-1?q?Ilpo_J=E4rvinen?= <[EMAIL PROTECTED]>
This is necessary when SACKed and non-SACKed spaces become
separate in the later patch.
However, callers should be converted to behave without this
later on.
Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]>
---
include/net/tcp.h | 8 ++++++++
net/ipv4/tcp_input.c | 4 ++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 117fcc4..5bb2de6 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1214,6 +1214,14 @@ static inline struct sk_buff
*tcp_write_queue_head(struct sock *sk)
return skb;
}
+/* FIXME, this should eventually vanish because callers likely benefit
+ * from scanning the non-SACKed and SACKed spaces separately.
+ */
+static inline struct sk_buff *tcp_real_queue_head(struct sock *sk)
+{
+ return tcp_write_queue_head(sk);
+}
+
static inline struct sk_buff *tcp_write_queue_tail(struct sock *sk)
{
struct sk_buff *skb = sk->sk_write_queue.prev;
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 7d5d316..1187dfa 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1928,7 +1928,7 @@ static int tcp_check_sack_reneging(struct sock *sk)
* receiver _host_ is heavily congested (or buggy).
* Do processing similar to RTO timeout.
*/
- if ((skb = tcp_write_queue_head(sk)) != NULL &&
+ if ((skb = tcp_real_queue_head(sk)) != NULL &&
(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) {
struct inet_connection_sock *icsk = inet_csk(sk);
NET_INC_STATS_BH(LINUX_MIB_TCPSACKRENEGING);
@@ -2773,7 +2773,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32
*seq_rtt_p,
s32 seq_rtt = -1;
ktime_t last_ackt = net_invalid_timestamp();
- while ((skb = tcp_write_queue_head(sk)) && skb != tcp_send_head(sk)) {
+ while ((skb = tcp_real_queue_head(sk)) && skb != tcp_send_head(sk)) {
struct tcp_skb_cb *scb = TCP_SKB_CB(skb);
u32 end_seq;
u32 acked_pcount;
--
1.5.0.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html