Ver código fonte

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

orders of magnitude.
tags/v0.9.3
Michael Brown 18 anos atrás
pai
commit
f743de4858
3 arquivos alterados com 15 adições e 0 exclusões
  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 Ver arquivo

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

+ 13
- 0
src/net/tcp.c Ver arquivo

@@ -183,6 +183,19 @@ static void tcp_periodic ( void ) {
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 200
  * Single-step the TCP stack
188 201
  *

+ 1
- 0
src/net/tcp/iscsi.c Ver arquivo

@@ -768,6 +768,7 @@ int iscsi_issue ( struct iscsi_session *iscsi,
768 768
 
769 769
 	if ( iscsi->status & ISCSI_STATUS_CONNECTED ) {
770 770
 		iscsi_start_command ( iscsi );
771
+		tcp_kick ( &iscsi->tcp );
771 772
 	} else {
772 773
 		iscsi->tcp.tcp_op = &iscsi_tcp_operations;
773 774
 		tcp_connect ( &iscsi->tcp );

Carregando…
Cancelar
Salvar