<div><br></div>2012/11/15 Eric Dumazet <span dir="ltr"><<a href="mailto:eric.dumazet@gmail.com" target="_blank">eric.dumazet@gmail.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On Thu, 2012-11-15 at 18:03 +0400, Andrey Vagin wrote:<br>
> From: Andrew Vagin <<a href="mailto:avagin@openvz.org">avagin@openvz.org</a>><br>
><br>
> Currently if a socket was repaired with a few packet in a write queue,<br>
> a kernel bug may be triggered:<br>
><br>
> kernel BUG at net/ipv4/tcp_output.c:2330!<br>
> RIP: 0010:[<ffffffff8155784f>] tcp_retransmit_skb+0x5ff/0x610<br>
><br>
> According to the initial realization v3.4-rc2-963-gc0e88ff,<br>
> all skb-s should look like already posted. This patch fixes code<br>
> according with this sentence.<br>
><br>
> Here are three points, which were not done in the initial patch:<br>
> 1. A tcp send head should not be changed<br>
> 2. Initialize TSO state of a skb<br>
> 3. Reset the retransmission time<br>
><br>
> This patch moves logic from tcp_sendmsg to tcp_write_xmit. A packet<br>
> passes the ussual way, but isn't sent to network. This patch solves<br>
> all described problems and handles tcp_sendpages.<br>
><br>
> Cc: Pavel Emelyanov <<a href="mailto:xemul@parallels.com">xemul@parallels.com</a>><br>
> Cc: "David S. Miller" <<a href="mailto:davem@davemloft.net">davem@davemloft.net</a>><br>
> Cc: Alexey Kuznetsov <<a href="mailto:kuznet@ms2.inr.ac.ru">kuznet@ms2.inr.ac.ru</a>><br>
> Cc: James Morris <<a href="mailto:jmorris@namei.org">jmorris@namei.org</a>><br>
> Cc: Hideaki YOSHIFUJI <<a href="mailto:yoshfuji@linux-ipv6.org">yoshfuji@linux-ipv6.org</a>><br>
> Cc: Patrick McHardy <<a href="mailto:kaber@trash.net">kaber@trash.net</a>><br>
> Signed-off-by: Andrey Vagin <<a href="mailto:avagin@openvz.org">avagin@openvz.org</a>><br>
<br>
</div>Any chance these tcp repair hacks could be done outside of tcp fast<br>
path ?<br><br></blockquote><div> </div><div>Hello Eric,</div><div> </div><div>Do you like the attached patch? I would like to mention that tcp_repair_push is copied code from tcp_write_xmit.<br></div><div><br></div><div>
Thanks.</div></div></div>