mirror of https://github.com/ipxe/ipxe.git
Added tcp_kick(). This speed up LILO and GRUB booting by almost two
orders of magnitude.pull/1/head
parent
cd3ecac809
commit
f743de4858
|
@ -93,6 +93,7 @@ extern size_t tcp_buflen;
|
||||||
extern void tcp_connect ( struct tcp_connection *conn );
|
extern void tcp_connect ( struct tcp_connection *conn );
|
||||||
extern void tcp_send ( struct tcp_connection *conn, const void *data,
|
extern void tcp_send ( struct tcp_connection *conn, const void *data,
|
||||||
size_t len );
|
size_t len );
|
||||||
|
extern void tcp_kick ( struct tcp_connection *conn );
|
||||||
extern void tcp_close ( struct tcp_connection *conn );
|
extern void tcp_close ( struct tcp_connection *conn );
|
||||||
|
|
||||||
#endif /* _GPXE_TCP_H */
|
#endif /* _GPXE_TCP_H */
|
||||||
|
|
|
@ -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
|
* Single-step the TCP stack
|
||||||
*
|
*
|
||||||
|
|
|
@ -768,6 +768,7 @@ int iscsi_issue ( struct iscsi_session *iscsi,
|
||||||
|
|
||||||
if ( iscsi->status & ISCSI_STATUS_CONNECTED ) {
|
if ( iscsi->status & ISCSI_STATUS_CONNECTED ) {
|
||||||
iscsi_start_command ( iscsi );
|
iscsi_start_command ( iscsi );
|
||||||
|
tcp_kick ( &iscsi->tcp );
|
||||||
} else {
|
} else {
|
||||||
iscsi->tcp.tcp_op = &iscsi_tcp_operations;
|
iscsi->tcp.tcp_op = &iscsi_tcp_operations;
|
||||||
tcp_connect ( &iscsi->tcp );
|
tcp_connect ( &iscsi->tcp );
|
||||||
|
|
Loading…
Reference in New Issue