Skip to content

Commit

Permalink
[DCCP] ACKVEC: Optimization - Do not traverse records if none will be…
Browse files Browse the repository at this point in the history
… found

Do not traverse the list of ack vector records [proportional to window size]
when we know we will not find what we are looking for.  This is especially
useful because ack vectors are checked twice:
1) Upon parsing of options.
2) Upon notification of a new ack.

All of the work will occur during check #1.  Therefore, when check #2 is
performed, no new work will be done.  This is now "detected" and there is no
performance hit when doing #2.

Signed-off-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
  • Loading branch information
Andrea Bittau authored and David S. Miller committed Dec 3, 2006
1 parent 09dbc38 commit d23ca15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/dccp/ackvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ void dccp_ackvec_check_rcv_ackno(struct dccp_ackvec *av, struct sock *sk,
(unsigned long long)avr->dccpavr_ack_ackno);
dccp_ackvec_throw_record(av, avr);
break;
}
} else if (avr->dccpavr_ack_seqno > ackno)
break; /* old news */
}
}

Expand Down

0 comments on commit d23ca15

Please sign in to comment.