[ipxe-devel] [PATCH] [tcp] Send keepalive packets to prevent TCP stalls

Ladi Prosek lprosek at redhat.com
Mon Jun 13 07:33:48 UTC 2016


On Fri, Jun 10, 2016 at 6:41 PM, Michael Brown <mcb30 at ipxe.org> wrote:
> On 09/06/16 15:12, Ladi Prosek wrote:
>>
>> NAT losing state is definitely one plausible case. Another could be
>> some kind of a multi-path setup where failover has just happened and
>> the new path is unaware of the connection. Or a virtual machine that
>> has just been migrated to another part of the network and the
>> infrastructure is still learning its new location, whatever that means
>> :-p Hosts that have just come up and are booting could face all kinds
>> of network instability problems.
>>
>> That's all I can offer in terms of supporting arguments. I know that
>> it's been tried and it works. But I also know that there's no RFC to
>> refer to, it's a grey territory at best.
>
>
> Could you try out
>
>   http://git.ipxe.org/people/mcb30/ipxe.git/shortlog/refs/heads/keepalive
>
> and let me know if it has any issues?

Thanks! This branch seems to have an unrelated issue, imgfetch fails
with "No space left on device" so I tested your commit on top of
ipxe/master.

+       /* Hold off (or start) the keepalive timer, if applicable */
+       if ( ! ( tcp->tcp_state & TCP_STATE_SENT ( TCP_FIN ) ) )
+               start_timer_fixed ( &tcp->keepalive, TCP_KEEPALIVE_DELAY );
+

I'm curious if it's intentional that this is done only for ack_len >
0. With this logic a keepalive packet is sent every 15 seconds during
long-running downloads even if the download is progressing just fine.

Thanks,
Ladi



More information about the ipxe-devel mailing list