]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[TCP]: Remove num_acked>0 checks from cong.ctrl mods pkts_acked
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Thu, 31 May 2007 07:16:47 +0000 (10:16 +0300)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:47:55 +0000 (16:47 -0700)
There is no need for such check in pkts_acked because the
callback is not invoked unless at least one segment got fully
ACKed (i.e., the snd_una moved past skb's end_seq) by the
cumulative ACK's snd_una advancement.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_bic.c
net/ipv4/tcp_cubic.c

index 4586211e3757f9b30c78b95bdbe1d1a858ea9070..5dba0fc8f579f8b5b31ca47b0e458a440d524de1 100644 (file)
@@ -210,7 +210,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt)
 {
        const struct inet_connection_sock *icsk = inet_csk(sk);
 
-       if (cnt > 0 && icsk->icsk_ca_state == TCP_CA_Open) {
+       if (icsk->icsk_ca_state == TCP_CA_Open) {
                struct bictcp *ca = inet_csk_ca(sk);
                cnt -= ca->delayed_ack >> ACK_RATIO_SHIFT;
                ca->delayed_ack += cnt;
index 485d7ea35f75598ed2da741f4a9f376da20284ea..80bd084a9f9198d5b4c31f380ffcd5448a8390b0 100644 (file)
@@ -314,7 +314,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us)
        struct bictcp *ca = inet_csk_ca(sk);
        u32 delay;
 
-       if (cnt > 0 && icsk->icsk_ca_state == TCP_CA_Open) {
+       if (icsk->icsk_ca_state == TCP_CA_Open) {
                cnt -= ca->delayed_ack >> ACK_RATIO_SHIFT;
                ca->delayed_ack += cnt;
        }