Charlet, Ricky
2015-04-24 21:44:23 UTC
Howdy,
I was suffering duplicate tpc acks. It seems trivial to duplicate.... Any time I receive a non-zero len tcp packet, I ack it twice. Note that I'm using a window scale of 3 and that may or may come into play.
Anyway, did some debugging and some comparing. I found a patch for this problem in freebsd.
https://svnweb.freebsd.org/base/head/sys/netinet/tcp_output.c?r1=216758&r2=220794
Here is how I applied it to netbsd (diff included below). It works for me. But I'm on an embedded system with a funky compiler and modified source. I'm giving this patch to the list in hopes that someone will feel like compiling / testing it in a truer netbsd kernel.
Index: src/sys/netinet/tcp_output.c
===================================================================
RCS file: /cvsroot/src/sys/netinet/tcp_output.c,v
retrieving revision 1.173
diff -r1.173 tcp_output.c
1023,1024c1023,1038
< long adv = min(win, (long)TCP_MAXWIN << tp->rcv_scale) -
< (tp->rcv_adv - tp->rcv_nxt);
---
--
Ricky Charlet
Software Dev / Routing Dude: Aries team, Roseville CA
***@hp.com<mailto:***@hp.com>
USA: 916.785.2090
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
I was suffering duplicate tpc acks. It seems trivial to duplicate.... Any time I receive a non-zero len tcp packet, I ack it twice. Note that I'm using a window scale of 3 and that may or may come into play.
Anyway, did some debugging and some comparing. I found a patch for this problem in freebsd.
https://svnweb.freebsd.org/base/head/sys/netinet/tcp_output.c?r1=216758&r2=220794
Here is how I applied it to netbsd (diff included below). It works for me. But I'm on an embedded system with a funky compiler and modified source. I'm giving this patch to the list in hopes that someone will feel like compiling / testing it in a truer netbsd kernel.
Index: src/sys/netinet/tcp_output.c
===================================================================
RCS file: /cvsroot/src/sys/netinet/tcp_output.c,v
retrieving revision 1.173
diff -r1.173 tcp_output.c
1023,1024c1023,1038
< long adv = min(win, (long)TCP_MAXWIN << tp->rcv_scale) -
< (tp->rcv_adv - tp->rcv_nxt);
---
long adv;
int oldwin;
adv = fp_min(win, (long)FP_TCP_MAXWIN << tp->rcv_scale);
if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt)) {
oldwin = (tp->rcv_adv - tp->rcv_nxt);
adv -= oldwin;
} else
oldwin = 0;
/*
* If the new window size ends up being the same as the old
* size when it is scaled, then don't force a window update.
*/
if (oldwin >> tp->rcv_scale == (adv + oldwin) >> tp->rcv_scale)
goto dontupdate;
1030a1045int oldwin;
adv = fp_min(win, (long)FP_TCP_MAXWIN << tp->rcv_scale);
if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt)) {
oldwin = (tp->rcv_adv - tp->rcv_nxt);
adv -= oldwin;
} else
oldwin = 0;
/*
* If the new window size ends up being the same as the old
* size when it is scaled, then don't force a window update.
*/
if (oldwin >> tp->rcv_scale == (adv + oldwin) >> tp->rcv_scale)
goto dontupdate;
--
Ricky Charlet
Software Dev / Routing Dude: Aries team, Roseville CA
***@hp.com<mailto:***@hp.com>
USA: 916.785.2090
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de