Skip to content

Commit

Permalink
[TCP]: Remove num_acked>0 checks from cong.ctrl mods pkts_acked
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Oct 10, 2007
1 parent af610b4 commit 35e8694
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_bic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_cubic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 35e8694

Please sign in to comment.