From f743de4858857029bd04e5642134d14546ad1393 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sat, 27 May 2006 19:01:20 +0000 Subject: [PATCH] Added tcp_kick(). This speed up LILO and GRUB booting by almost two orders of magnitude. --- src/include/gpxe/tcp.h | 1 + src/net/tcp.c | 13 +++++++++++++ src/net/tcp/iscsi.c | 1 + 3 files changed, 15 insertions(+) diff --git a/src/include/gpxe/tcp.h b/src/include/gpxe/tcp.h index 699512bd..6c07f4ae 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 ea26f019..06ab2eea 100644 --- a/src/net/tcp.c +++ b/src/net/tcp.c @@ -183,6 +183,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 * diff --git a/src/net/tcp/iscsi.c b/src/net/tcp/iscsi.c index 5fa02118..49ccb026 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 );