forked from M-Labs/artiq
runtime: ensure management interface buffer can hold log buffer.
Otherwise we get weird edge cases where the network stack could try to append to log buffer while management interface is holding the log buffer and trying to push it out, and it's just no good. The serialized log buffer at its maximum length is slightly longer than 32 KiB, so we just allocate the largest possible TCP buffer to the management interface to keep it simple.
This commit is contained in:
parent
d0f72632e1
commit
f17a6616b2
@ -176,7 +176,7 @@ pub extern fn main() -> i32 {
|
||||
panic!("out of memory");
|
||||
});
|
||||
|
||||
static mut LOG_BUFFER: [u8; 65536] = [0; 65536];
|
||||
static mut LOG_BUFFER: [u8; 32768] = [0; 32768];
|
||||
logger_artiq::BufferLogger::new(&mut LOG_BUFFER[..]).register(startup);
|
||||
0
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ fn worker(mut stream: &mut TcpStream) -> io::Result<()> {
|
||||
}
|
||||
|
||||
pub fn thread(io: Io) {
|
||||
let listener = TcpListener::new(&io, 4096);
|
||||
let listener = TcpListener::new(&io, 65535);
|
||||
listener.listen(1380).expect("mgmt: cannot listen");
|
||||
info!("management interface active");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user