Browse Source

Added tcp_kick(). This speed up LILO and GRUB booting by almost two

orders of magnitude.
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
f743de4858
3 changed files with 15 additions and 0 deletions
  1. 1
    0
      src/include/gpxe/tcp.h
  2. 13
    0
      src/net/tcp.c
  3. 1
    0
      src/net/tcp/iscsi.c

+ 1
- 0
src/include/gpxe/tcp.h View File

93
 extern void tcp_connect ( struct tcp_connection *conn );
93
 extern void tcp_connect ( struct tcp_connection *conn );
94
 extern void tcp_send ( struct tcp_connection *conn, const void *data,
94
 extern void tcp_send ( struct tcp_connection *conn, const void *data,
95
 		       size_t len );
95
 		       size_t len );
96
+extern void tcp_kick ( struct tcp_connection *conn );
96
 extern void tcp_close ( struct tcp_connection *conn );
97
 extern void tcp_close ( struct tcp_connection *conn );
97
 
98
 
98
 #endif /* _GPXE_TCP_H */
99
 #endif /* _GPXE_TCP_H */

+ 13
- 0
src/net/tcp.c View File

183
 	}
183
 	}
184
 }
184
 }
185
 
185
 
186
+/**
187
+ * Kick a connection into life
188
+ *
189
+ * @v conn	TCP connection
190
+ *
191
+ * Call this function when you have new data to send and are not
192
+ * already being called as part of TCP processing.
193
+ */
194
+void tcp_kick ( struct tcp_connection *conn __unused ) {
195
+	/* Just kick all the connections; this will work for now */
196
+	tcp_periodic();
197
+}
198
+
186
 /**
199
 /**
187
  * Single-step the TCP stack
200
  * Single-step the TCP stack
188
  *
201
  *

+ 1
- 0
src/net/tcp/iscsi.c View File

768
 
768
 
769
 	if ( iscsi->status & ISCSI_STATUS_CONNECTED ) {
769
 	if ( iscsi->status & ISCSI_STATUS_CONNECTED ) {
770
 		iscsi_start_command ( iscsi );
770
 		iscsi_start_command ( iscsi );
771
+		tcp_kick ( &iscsi->tcp );
771
 	} else {
772
 	} else {
772
 		iscsi->tcp.tcp_op = &iscsi_tcp_operations;
773
 		iscsi->tcp.tcp_op = &iscsi_tcp_operations;
773
 		tcp_connect ( &iscsi->tcp );
774
 		tcp_connect ( &iscsi->tcp );

Loading…
Cancel
Save