From: Eric Dumazet <eric.duma...@gmail.com> Date: Thu, 23 Apr 2015 09:48:12 -0700
> 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.duma...@gmail.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()) That makes sense, thanks for explaining. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html