Thread (15 messages) 15 messages, 4 authors, 2011-08-25

Re: [PATCH v2] Proportional Rate Reduction for TCP.

flat view

From: Nandita Dukkipati <hidden>
Date: 2011-08-20 01:29:07

Forgot to turn off gmail's rich formatting, so re-sending to the list.

On Fri, Aug 19, 2011 at 3:25 AM, Ilpo Järvinen
[off-list ref] wrote:
On Fri, 19 Aug 2011, Nandita Dukkipati wrote:
quoted
+static void tcp_update_cwnd_in_recovery(struct sock *sk, int newly_acked_sacked,
+                                     int fast_rexmit, int flag)
+{
+     struct tcp_sock *tp = tcp_sk(sk);
+     int sndcnt = 0;
+     int delta = tp->snd_ssthresh - tcp_packets_in_flight(tp);
+
+     if (tcp_packets_in_flight(tp) > tp->snd_ssthresh) {
+             if (WARN_ON(!tp->prior_cwnd))
+                     tp->prior_cwnd = 1;
This should still be made larger to avoid problems if it ever will be
needed.
I am letting the value remain at 1, mainly because this is the valid
lowest non-zero value for snd_cwnd to take on. The main purpose of
this code is to catch any lurking bug outside of PRR which results in
an undesirable divide by 0 in PRR. I would like to fix that bug if I
find this code is executed.
quoted
+             sndcnt = DIV_ROUND_UP((u64)(tp->prr_delivered *
+                                         tp->snd_ssthresh),
+                                   (u64)tp->prior_cwnd) - tp->prr_out;
I think you should pick one from include/linux/math64.h instead of letting
gcc to do / operand all by itself. ...Obviosly then the ROUND_UP part
needs to be done manually (either using the remainder or pre-addition
like DIV_ROUND_UP does).
Done. patch v3 used div_u64.

Thanks
Nandita
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help