[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1429807692.22254.59.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 23 Apr 2015 09:48:12 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: johunt@...mai.com, netdev@...r.kernel.org, edumazet@...gle.com
Subject: Re: [PATCH] fix tcp fin memory accounting
On Thu, 2015-04-23 at 09:16 -0700, Eric Dumazet wrote:
> On Thu, 2015-04-23 at 11:54 -0400, David Miller wrote:
> > From: Eric Dumazet <eric.dumazet@...il.com>
> > Date: Thu, 23 Apr 2015 07:02:47 -0700
> >
> > > + if (!tcp_send_head(sk)) {
> > > + tp->snd_nxt++;
> > > + return;
> > > + }
> >
> > I'm not so sure about this. Why is this needed?
> >
> > Otherwise patch looks fine to me.
> >
>
> I guess I need to add a comment then ;)
>
> If we want to pretend FIN was sent, we also need to tweak tp->snd_nxt to
> match new tskb->end_seq (or tp->write_seq).
>
> I tested following packetdrill script and confirmed that if I do not
> tweak snd_nxt, last packet sent is incorrect :
>
> > . 5001:5001(0) ack 2
>
> This might be because our stack relies that we never coalesce something
> on one already sent skb (we do this check in tcp_sendmsg() for example)
Well, real reason is that tp->snd_nxt is not touched in retransmit
paths, but when new data is sent (tcp_event_new_data_sent())
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists