[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11965492972550-git-send-email-ilpo.jarvinen@helsinki.fi>
Date: Sun, 2 Dec 2007 00:48:14 +0200
From: "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To: David Miller <davem@...emloft.net>,
Herbert Xu <herbert@...dor.apana.org.au>
Cc: netdev@...r.kernel.org,
Stephen Hemminger <shemminger@...ux-foundation.org>,
"Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
Subject: [PATCH 19/21] [TCP]: Introduce tcp_real_queue_head(sk)
From: =?ISO-8859-1?q?Ilpo_J=E4rvinen?= <ilpo.jarvinen@...sinki.fi>
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 <ilpo.jarvinen@...sinki.fi>
---
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists