summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2006-05-27 21:01:20 +0200
committerMichael Brown2006-05-27 21:01:20 +0200
commitf743de4858857029bd04e5642134d14546ad1393 (patch)
treedfe815f21296162cccd08dbdd2e930a1c9725ef6 /src
parentAvoid causing TX overflow on small TX queues. (diff)
downloadipxe-f743de4858857029bd04e5642134d14546ad1393.tar.gz
ipxe-f743de4858857029bd04e5642134d14546ad1393.tar.xz
ipxe-f743de4858857029bd04e5642134d14546ad1393.zip
Added tcp_kick(). This speed up LILO and GRUB booting by almost two
orders of magnitude.
Diffstat (limited to 'src')
-rw-r--r--src/include/gpxe/tcp.h1
-rw-r--r--src/net/tcp.c13
-rw-r--r--src/net/tcp/iscsi.c1
3 files changed, 15 insertions, 0 deletions
diff --git a/src/include/gpxe/tcp.h b/src/include/gpxe/tcp.h
index 699512bd8..6c07f4ae9 100644
--- a/src/include/gpxe/tcp.h
+++ b/src/include/gpxe/tcp.h
@@ -93,6 +93,7 @@ extern size_t tcp_buflen;
extern void tcp_connect ( struct tcp_connection *conn );
extern void tcp_send ( struct tcp_connection *conn, const void *data,
size_t len );
+extern void tcp_kick ( struct tcp_connection *conn );
extern void tcp_close ( struct tcp_connection *conn );
#endif /* _GPXE_TCP_H */
diff --git a/src/net/tcp.c b/src/net/tcp.c
index ea26f0196..06ab2eea2 100644
--- a/src/net/tcp.c
+++ b/src/net/tcp.c
@@ -184,6 +184,19 @@ static void tcp_periodic ( void ) {
}
/**
+ * Kick a connection into life
+ *
+ * @v conn TCP connection
+ *
+ * Call this function when you have new data to send and are not
+ * already being called as part of TCP processing.
+ */
+void tcp_kick ( struct tcp_connection *conn __unused ) {
+ /* Just kick all the connections; this will work for now */
+ tcp_periodic();
+}
+
+/**
* Single-step the TCP stack
*
* @v process TCP process
diff --git a/src/net/tcp/iscsi.c b/src/net/tcp/iscsi.c
index 5fa021183..49ccb0260 100644
--- a/src/net/tcp/iscsi.c
+++ b/src/net/tcp/iscsi.c
@@ -768,6 +768,7 @@ int iscsi_issue ( struct iscsi_session *iscsi,
if ( iscsi->status & ISCSI_STATUS_CONNECTED ) {
iscsi_start_command ( iscsi );
+ tcp_kick ( &iscsi->tcp );
} else {
iscsi->tcp.tcp_op = &iscsi_tcp_operations;
tcp_connect ( &iscsi->tcp );