mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 15:21:32 +00:00
Added tcp_kick(). This speed up LILO and GRUB booting by almost two
orders of magnitude.
This commit is contained in:
parent
cd3ecac809
commit
f743de4858
@ -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 */
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user