tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

RE: patch for duplicate tcp acks



Hi Christos,
	Thanks for your reply.  So, about applying patches and starting bugs....   I did not do those things because I'm totally new here having only singed up the day I started this thread. And honestly, I probably won't mature into anything like a regular contributor. Please do start a PR... I don't know how.  

	What I'm asking for is sanity checking... is this 'the right thing' to do? If it is 'the right thing' then I hope that regular contributors will pick up the notion, file the paperwork and apply patches. 

	If you want me to contribute by filing the PR, I'll go figure that out (hopefully explained on the netbsd:developers web page). 

--
Ricky Charlet


-----Original Message-----
From: tech-net-owner%NetBSD.org@localhost [mailto:tech-net-owner%NetBSD.org@localhost] On Behalf Of Christos Zoulas
Sent: Monday, April 27, 2015 8:07 AM
To: tech-net%netbsd.org@localhost
Subject: Re: patch for duplicate tcp acks

In article <2589BE5ABD3B654682A529F416483CD809F5F879%G4W3227.americas.hpqcorp.net@localhost>,
Charlet, Ricky <ricky.charlet%hp.com@localhost> wrote:
>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.

Why didn't you just apply the FreeBSD patch? Are you trying to fix something else? Can you please file a PR about this, or do you mind if I file one using this information?

thanks,

christos

>
>
>
>
>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;
>1030a1045
>>       dontupdate:
>
>
>
>--
>Ricky Charlet
>Software Dev / Routing Dude: Aries team, Roseville CA 
>ricky.charlet%hp.com@localhost<mailto:ricky.charlet%hp.com@localhost>
>USA: 916.785.2090
>
>
>
>





Home | Main Index | Thread Index | Old Index