aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-06-01 00:37:55 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-06-03 21:08:48 -0400
commit6418204f919c030ca0c943f6c77dc84aff2ec0d2 (patch)
tree5ffb244db0ac7a5dd36860a222092d2701f0d050 /net
parent75202e76893c11ce7f8bcc9a07f994d71e3d5113 (diff)
[TCP]: Fix GSO ignorance of pkts_acked arg (cong.cntrl modules)
The code used to ignore GSO completely, passing either way too small or zero pkts_acked when GSO skb or part of it got ACKed. In addition, there is no need to calculate the value in the loop but simple arithmetics after the loop is sufficient. There is no need to handle SYN case specially because congestion control modules are not yet initialized when FLAG_SYN_ACKED is set. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 38cb25b48bf3..74683d81c3f1 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2407,8 +2407,8 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p)
2407 struct sk_buff *skb; 2407 struct sk_buff *skb;
2408 __u32 now = tcp_time_stamp; 2408 __u32 now = tcp_time_stamp;
2409 int acked = 0; 2409 int acked = 0;
2410 int prior_packets = tp->packets_out;
2410 __s32 seq_rtt = -1; 2411 __s32 seq_rtt = -1;
2411 u32 pkts_acked = 0;
2412 ktime_t last_ackt = ktime_set(0,0); 2412 ktime_t last_ackt = ktime_set(0,0);
2413 2413
2414 while ((skb = tcp_write_queue_head(sk)) && 2414 while ((skb = tcp_write_queue_head(sk)) &&
@@ -2437,7 +2437,6 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p)
2437 */ 2437 */
2438 if (!(scb->flags & TCPCB_FLAG_SYN)) { 2438 if (!(scb->flags & TCPCB_FLAG_SYN)) {
2439 acked |= FLAG_DATA_ACKED; 2439 acked |= FLAG_DATA_ACKED;
2440 ++pkts_acked;
2441 } else { 2440 } else {
2442 acked |= FLAG_SYN_ACKED; 2441 acked |= FLAG_SYN_ACKED;
2443 tp->retrans_stamp = 0; 2442 tp->retrans_stamp = 0;
@@ -2481,6 +2480,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p)
2481 } 2480 }
2482 2481
2483 if (acked&FLAG_ACKED) { 2482 if (acked&FLAG_ACKED) {
2483 u32 pkts_acked = prior_packets - tp->packets_out;
2484 const struct tcp_congestion_ops *ca_ops 2484 const struct tcp_congestion_ops *ca_ops
2485 = inet_csk(sk)->icsk_ca_ops; 2485 = inet_csk(sk)->icsk_ca_ops;
2486 2486