forked from M-Labs/artiq
runtime: disable the Nagle algorithm entirely.
See also commit feed91d; that commit fixed the test_rpc_timing test, but caused frequent hangs elsewhere, which were also caused by buggy Nagle implementation. Just disable this entirely, as with our explicit buffering it provides no benefit anyway.
This commit is contained in:
parent
feed91d8b2
commit
18c394976e
|
@ -149,6 +149,7 @@ extern {
|
|||
// nonstandard
|
||||
pub fn tcp_sndbuf_(pcb: *mut tcp_pcb) -> u16;
|
||||
pub fn tcp_so_options_(pcb: *mut tcp_pcb) -> *mut u8;
|
||||
pub fn tcp_nagle_disable_(pcb: *mut tcp_pcb);
|
||||
|
||||
pub fn udp_new() -> *mut udp_pcb;
|
||||
pub fn udp_new_ip_type(type_: ip_addr_type) -> *mut udp_pcb;
|
||||
|
|
|
@ -549,6 +549,7 @@ impl TcpStream {
|
|||
lwip_sys::tcp_recv(raw, Some(recv));
|
||||
lwip_sys::tcp_sent(raw, Some(sent));
|
||||
lwip_sys::tcp_err(raw, Some(err));
|
||||
lwip_sys::tcp_nagle_disable_(raw);
|
||||
TcpStream { raw: raw, state: state }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,6 +177,10 @@ u8_t* tcp_so_options_(struct tcp_pcb *pcb) {
|
|||
return &pcb->so_options;
|
||||
}
|
||||
|
||||
void tcp_nagle_disable_(struct tcp_pcb *pcb) {
|
||||
tcp_nagle_disable(pcb);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
irq_setmask(0);
|
||||
|
|
Loading…
Reference in New Issue