<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openslx-ng/ipxe.git/src/net/tcp.c, branch v1.20.1</title>
<subtitle>Fork of ipxe; additional commands and features</subtitle>
<id>https://git.openslx.org/openslx-ng/ipxe.git/atom/src/net/tcp.c?h=v1.20.1</id>
<link rel='self' href='https://git.openslx.org/openslx-ng/ipxe.git/atom/src/net/tcp.c?h=v1.20.1'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/'/>
<updated>2019-03-10T17:29:06+00:00</updated>
<entry>
<title>[tcp] Display "connecting" status until connection is established</title>
<updated>2019-03-10T17:29:06+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2019-03-10T17:29:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=f6b2bf9507599709d30bcb74af9bffdb179e5338'/>
<id>urn:sha1:f6b2bf9507599709d30bcb74af9bffdb179e5338</id>
<content type='text'>
Provide increased visibility into the progress of TCP connections by
displaying an explicit "connecting" status message while waiting for
the TCP handshake to complete.

Signed-off-by: Michael Brown &lt;mcb30@ipxe.org&gt;
</content>
</entry>
<entry>
<title>[init] Show startup and shutdown function names in debug messages</title>
<updated>2019-01-25T14:53:43+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2019-01-25T14:53:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=36a4c85f911c85f5ab183331ff74d125f9a9ed32'/>
<id>urn:sha1:36a4c85f911c85f5ab183331ff74d125f9a9ed32</id>
<content type='text'>
Signed-off-by: Michael Brown &lt;mcb30@ipxe.org&gt;
</content>
</entry>
<entry>
<title>[tcp] Use correct length for memset()</title>
<updated>2017-03-22T13:11:05+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2017-03-22T13:11:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=75bb948008be207599fbb6534e282d45528f267b'/>
<id>urn:sha1:75bb948008be207599fbb6534e282d45528f267b</id>
<content type='text'>
Signed-off-by: Michael Brown &lt;mcb30@ipxe.org&gt;
</content>
</entry>
<entry>
<title>[tcp] Send TCP keepalives on idle established connections</title>
<updated>2016-06-13T08:58:32+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2016-06-10T16:27:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=188789eb3cb83496bd48847da59c74e3f06d413e'/>
<id>urn:sha1:188789eb3cb83496bd48847da59c74e3f06d413e</id>
<content type='text'>
In some circumstances, intermediate devices may lose state in a way
that temporarily prevents the successful delivery of packets from a
TCP peer.  For example, a firewall may drop a NAT forwarding table
entry.

Since iPXE spends most of its time downloading files (and hence purely
receiving data, sending only TCP ACKs), this can easily happen in a
situation in which there is no reason for iPXE's TCP stack to generate
any retransmissions.  The temporary loss of connectivity can therefore
effectively become permanent.

Work around this problem by sending TCP keepalives after a period of
inactivity on an established connection.

TCP keepalives usually send a single garbage byte in sequence number
space that has already been ACKed by the peer.  Since we do not need
to elicit a response from the peer, we instead send pure ACKs (with no
garbage data) in order to keep the transmit code path simple.

Originally-implemented-by: Ladi Prosek &lt;lprosek@redhat.com&gt;
Debugged-by: Ladi Prosek &lt;lprosek@redhat.com&gt;
Signed-off-by: Michael Brown &lt;mcb30@ipxe.org&gt;
</content>
</entry>
<entry>
<title>[tcp] Guard against malformed TCP options</title>
<updated>2016-01-27T23:06:50+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2016-01-27T23:06:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=fef8e34b6f990de651002e00b60b2a6212369fb5'/>
<id>urn:sha1:fef8e34b6f990de651002e00b60b2a6212369fb5</id>
<content type='text'>
Signed-off-by: Michael Brown &lt;mcb30@ipxe.org&gt;
</content>
</entry>
<entry>
<title>[tcp] Ensure FIN is actually sent if connection is closed while idle</title>
<updated>2015-07-22T20:16:40+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2015-07-18T09:57:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=9546b0c17bfa01b7c3c0b3162187f4357c4c03d4'/>
<id>urn:sha1:9546b0c17bfa01b7c3c0b3162187f4357c4c03d4</id>
<content type='text'>
Signed-off-by: Michael Brown &lt;mcb30@ipxe.org&gt;
</content>
</entry>
<entry>
<title>[tcp] Gracefully close connections during shutdown</title>
<updated>2015-07-04T11:51:23+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2015-07-04T11:40:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=38afcc51ea6cccbbcc40cc4a5bae1213431943ec'/>
<id>urn:sha1:38afcc51ea6cccbbcc40cc4a5bae1213431943ec</id>
<content type='text'>
We currently do not wait for a received FIN before exiting to boot a
loaded OS.  In the common case of booting from an HTTP server, this
means that the TCP connection is left consuming resources on the
server side: the server will retransmit the FIN several times before
giving up.

Fix by initiating a graceful close of all TCP connections and waiting
(for up to one second) for all connections to finish closing
gracefully (i.e. for the outgoing FIN to have been sent and ACKed, and
for the incoming FIN to have been received and ACKed at least once).

Signed-off-by: Michael Brown &lt;mcb30@ipxe.org&gt;
</content>
</entry>
<entry>
<title>[tcp] Do not shrink window when discarding received packets</title>
<updated>2015-06-25T09:20:48+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2015-06-25T09:07:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=c117b25e0b7de2fd116f86dd6f105447dcc3d125'/>
<id>urn:sha1:c117b25e0b7de2fd116f86dd6f105447dcc3d125</id>
<content type='text'>
We currently shrink the TCP window permanently if we are ever forced
(by a low-memory condition) to discard a previously received TCP
packet.  This behaviour was intended to reduce the number of
retransmissions in a lossy network, since lost packets might
potentially result in the entire window contents being retransmitted.

Since commit e0fc8fe ("[tcp] Implement support for TCP Selective
Acknowledgements (SACK)") the cost of lost packets has been reduced by
around one order of magnitude, and the reduction in the window size
(which affects the maximum throughput) is now the more significant
cost.

Remove the code which reduces the TCP maximum window size when a
received packet is discarded.

Reported-by: Wissam Shoukair &lt;wissams@mellanox.com&gt;
Tested-by: Wissam Shoukair &lt;wissams@mellanox.com&gt;
Signed-off-by: Michael Brown &lt;mcb30@ipxe.org&gt;
</content>
</entry>
<entry>
<title>[tcp] Implement support for TCP Selective Acknowledgements (SACK)</title>
<updated>2015-03-11T23:14:39+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2015-03-11T17:53:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=e0fc8fe781b81083298dcddb08744c4c1ddf41ff'/>
<id>urn:sha1:e0fc8fe781b81083298dcddb08744c4c1ddf41ff</id>
<content type='text'>
The TCP Selective Acknowledgement option (specified in RFC2018)
provides a mechanism for the receiver to indicate packets that have
been received out of order (e.g. due to earlier dropped packets).

iPXE often operates in environments in which there is a high
probability of packet loss.  For example, the legacy USB keyboard
emulation in some BIOSes involves polling the USB bus from within a
system management interrupt: this introduces an invisible delay of
around 500us which is long enough for around 40 full-length packets to
be dropped.  Similarly, almost all 1Gbps USB2 devices will eventually
end up dropping packets because the USB2 bus does not provide enough
bandwidth to sustain a 1Gbps stream, and most devices will not provide
enough internal buffering to hold a full TCP window's worth of
received packets.

Add support for sending TCP Selective Acknowledgements.  This provides
the sender with more detailed information about which packets have
been lost, and so allows for a more efficient retransmission strategy.

We include a SACK-permitted option in our SYN packet, since
experimentation shows that at least Linux peers will not include a
SACK-permitted option in the SYN-ACK packet if one was not present in
the initial SYN.  (RFC2018 does not seem to mandate this behaviour,
but it is consistent with the approach taken in RFC1323.)  We ignore
any received SACK options; this is safe to do since SACK is only ever
advisory and we never have to send non-trivial amounts of data.

Since our TCP receive queue is a candidate for cache discarding under
low memory conditions, we may end up discarding data that has been
reported as received via a SACK option.  This is permitted by RFC2018.
We follow the stricture that SACK blocks must not report data which is
no longer held by the receiver: previously-reported blocks are
validated against the current receive queue before being included
within the current SACK block list.

Experiments in a qemu VM using forced packet drops (by setting
NETDEV_DISCARD_RATE to 32) show that implementing SACK improves
throughput by around 400%.

Experiments with a USB2 NIC (an SMSC7500) show that implementing SACK
improves throughput by around 700%, increasing the download rate from
35Mbps up to 250Mbps (which is approximately the usable bandwidth
limit for USB2).

Signed-off-by: Michael Brown &lt;mcb30@ipxe.org&gt;
</content>
</entry>
<entry>
<title>[legal] Relicense files under GPL2_OR_LATER_OR_UBDL</title>
<updated>2015-03-02T16:35:29+00:00</updated>
<author>
<name>Michael Brown</name>
</author>
<published>2015-03-02T13:29:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/openslx-ng/ipxe.git/commit/?id=2f020a8df3ad24d0d0bac9295c9cecb2ebba92f4'/>
<id>urn:sha1:2f020a8df3ad24d0d0bac9295c9cecb2ebba92f4</id>
<content type='text'>
These files cannot be automatically relicensed by util/relicense.pl
since they either contain unusual but trivial contributions (such as
the addition of __nonnull function attributes), or contain lines
dating back to the initial git revision (and so require manual
knowledge of the code's origin).

Signed-off-by: Michael Brown &lt;mcb30@ipxe.org&gt;
</content>
</entry>
</feed>
