[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11965492972855-git-send-email-ilpo.jarvinen@helsinki.fi>
Date: Sun, 2 Dec 2007 00:48:09 +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 14/21] [TCP]: Added queue parameter to _for_write_queue helpers
From: =?ISO-8859-1?q?Ilpo_J=E4rvinen?= <ilpo.jarvinen@...sinki.fi>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>
---
include/net/tcp.h | 8 ++++----
net/ipv4/tcp_input.c | 18 +++++++++---------
net/ipv4/tcp_output.c | 8 ++++----
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 433c6a6..0883697 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1232,16 +1232,16 @@ static inline struct sk_buff *tcp_write_queue_prev(struct sock *sk, struct sk_bu
return skb->prev;
}
-#define tcp_for_write_queue(skb, sk) \
+#define tcp_for_write_queue(skb, sk, queue) \
for (skb = (sk)->sk_write_queue.next; \
(skb != (struct sk_buff *)&(sk)->sk_write_queue); \
skb = skb->next)
-#define tcp_for_write_queue_from(skb, sk) \
+#define tcp_for_write_queue_from(skb, sk, queue) \
for (; (skb != (struct sk_buff *)&(sk)->sk_write_queue);\
skb = skb->next)
-#define tcp_for_write_queue_from_safe(skb, tmp, sk) \
+#define tcp_for_write_queue_from_safe(skb, tmp, sk, queue) \
for (tmp = skb->next; \
(skb != (struct sk_buff *)&(sk)->sk_write_queue); \
skb = tmp, tmp = skb->next)
@@ -1364,7 +1364,7 @@ static inline void tcp_reset_fack_counts(struct sock *sk, struct sk_buff *skb)
if (prev != (struct sk_buff *) &sk->sk_write_queue)
fc = TCP_SKB_CB(prev)->fack_count + tcp_skb_pcount(prev);
- tcp_for_write_queue_from(skb, sk) {
+ tcp_for_write_queue_from(skb, sk, 0) {
if (!before(TCP_SKB_CB(skb)->seq, tcp_sk(sk)->snd_nxt) ||
TCP_SKB_CB(skb)->fack_count == fc)
break;
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 35753b7..8a02de2 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1132,7 +1132,7 @@ static void tcp_mark_lost_retrans(struct sock *sk)
icsk->icsk_ca_state != TCP_CA_Recovery)
return;
- tcp_for_write_queue(skb, sk) {
+ tcp_for_write_queue(skb, sk, 0) {
u32 ack_seq = TCP_SKB_CB(skb)->ack_seq;
if (skb == tcp_send_head(sk))
@@ -1331,7 +1331,7 @@ static struct sk_buff *tcp_sacktag_walk(struct sk_buff *skb, struct sock *sk,
int dup_sack_in, int *fack_count,
int *reord, int *flag)
{
- tcp_for_write_queue_from(skb, sk) {
+ tcp_for_write_queue_from(skb, sk, 0) {
int in_sack = 0;
int dup_sack = dup_sack_in;
@@ -1370,7 +1370,7 @@ static struct sk_buff *tcp_sacktag_walk(struct sk_buff *skb, struct sock *sk,
static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk,
u32 skip_to_seq)
{
- tcp_for_write_queue_from(skb, sk) {
+ tcp_for_write_queue_from(skb, sk, 0) {
if (skb == tcp_send_head(sk))
break;
@@ -1687,7 +1687,7 @@ int tcp_use_frto(struct sock *sk)
skb = tcp_write_queue_head(sk);
skb = tcp_write_queue_next(sk, skb); /* Skips head */
- tcp_for_write_queue_from(skb, sk) {
+ tcp_for_write_queue_from(skb, sk, 0) {
if (skb == tcp_send_head(sk))
break;
if (TCP_SKB_CB(skb)->sacked&TCPCB_RETRANS)
@@ -1794,7 +1794,7 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag)
if (tcp_is_reno(tp))
tcp_reset_reno_sack(tp);
- tcp_for_write_queue(skb, sk) {
+ tcp_for_write_queue(skb, sk, 0) {
if (skb == tcp_send_head(sk))
break;
@@ -1894,7 +1894,7 @@ void tcp_enter_loss(struct sock *sk, int how)
tcp_clear_all_retrans_hints(tp);
}
- tcp_for_write_queue(skb, sk) {
+ tcp_for_write_queue(skb, sk, 0) {
if (skb == tcp_send_head(sk))
break;
@@ -2145,7 +2145,7 @@ static void tcp_mark_head_lost(struct sock *sk, int packets, int fast_rexmit)
cnt = 0;
}
- tcp_for_write_queue_from(skb, sk) {
+ tcp_for_write_queue_from(skb, sk, 0) {
if (skb == tcp_send_head(sk))
break;
/* TODO: do this better */
@@ -2200,7 +2200,7 @@ static void tcp_update_scoreboard(struct sock *sk, int fast_rexmit)
skb = tp->scoreboard_skb_hint ? tp->scoreboard_skb_hint
: tcp_write_queue_head(sk);
- tcp_for_write_queue_from(skb, sk) {
+ tcp_for_write_queue_from(skb, sk, 0) {
if (skb == tcp_send_head(sk))
break;
if (!tcp_skb_timedout(sk, skb))
@@ -2398,7 +2398,7 @@ static int tcp_try_undo_loss(struct sock *sk)
if (tcp_may_undo(tp)) {
struct sk_buff *skb;
- tcp_for_write_queue(skb, sk) {
+ tcp_for_write_queue(skb, sk, 0) {
if (skb == tcp_send_head(sk))
break;
TCP_SKB_CB(skb)->sacked &= ~TCPCB_LOST;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 07907ce..202a48a 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1348,7 +1348,7 @@ static int tcp_mtu_probe(struct sock *sk)
tcp_insert_write_queue_before(nskb, skb, sk);
len = 0;
- tcp_for_write_queue_from_safe(skb, next, sk) {
+ tcp_for_write_queue_from_safe(skb, next, sk, 0) {
copy = min_t(int, skb->len, probe_size - len);
if (nskb->ip_summed)
skb_copy_bits(skb, 0, skb_put(nskb, copy), copy);
@@ -1761,7 +1761,7 @@ void tcp_simple_retransmit(struct sock *sk)
unsigned int mss = tcp_current_mss(sk, 0);
int lost = 0;
- tcp_for_write_queue(skb, sk) {
+ tcp_for_write_queue(skb, sk, 0) {
if (skb == tcp_send_head(sk))
break;
if (skb->len > mss &&
@@ -1937,7 +1937,7 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
/* First pass: retransmit lost packets. */
if (tp->lost_out) {
- tcp_for_write_queue_from(skb, sk) {
+ tcp_for_write_queue_from(skb, sk, 0) {
__u8 sacked = TCP_SKB_CB(skb)->sacked;
if (skb == tcp_send_head(sk))
@@ -2010,7 +2010,7 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
else
skb = tcp_write_queue_head(sk);
- tcp_for_write_queue_from(skb, sk) {
+ tcp_for_write_queue_from(skb, sk, 0) {
if (skb == tcp_send_head(sk))
break;
tp->forward_skb_hint = skb;
--
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