IRC channel logs

2025-07-22.log

back to list of logs

<damo22>youpi: what is the difference if i use poll instead of select?
<youpi>there is no real difference
<youpi>if that's simpler, go for it :)
<damo22>non-blocking reads dont seem to ever flush
<youpi>what do you mean by "flush" ?
<damo22>i got rid of the timeout
<damo22>and changed to nonblocking
<damo22>but i dont get any packets back
<damo22>with poll
<youpi>do you mean that you call poll, it blocks, then it returns, and you read, but you get zero bytes?
<youpi>did you make sure that poll actually blocks?
<damo22>let me check
<youpi>i.e. that even with non-blocking, poll does actually wait?
<youpi>possibly what you could want is to keep it blocking, with BIOCSRTIMEOUT set to zero, and then you poll
<youpi>in case non-blocking makes poll not actually block, perhaps BIOCSRTIMEOUT set to zero doesn't prevent it from blocking
<youpi>(or set to 1 nanosecond, in case zero means something particular that we don't want)
<damo22>it blocks on the first poll and waits for the whole 1 minute
<damo22>(timeout on poll)
<damo22>it seems like it never has anything to read because without the timeout it expects to fill the entire buffer before having something to read
<damo22>so if you only send a tiny packet it doesnt fill the buffer
<youpi>ok
<youpi>then try as blocking with the minimal timeout, to see if poll stays blocked until there is a packet
<damo22>okay
<youpi>and if that fails, I'm wondering if you should actually use the same approach as rarpd
<youpi>(i.e opening /dev/pbf)
<youpi>it does not use timeouts, and does not suffer from buffer filling requirement
<damo22>do you mean rarpd from netbsd?
<youpi>yes
<youpi>since it basically needs the same thing (except it uses a small bpf filter)
<damo22>yes 1 microsecond polling blocks until there is something to read
<damo22>ie, SRTIMEOUT = 1us
<youpi>does it behave fine with 0µs too ?
<damo22>no
<damo22>it seems to block forever again
<youpi>ok then 1µ should be fine
<damo22>it receives at 6.5MB/s
<damo22>over scp
<damo22>and latency is fine to ssh into the box
<wire_panel>hello all, I wound up not being able to install fresh on a workstation I gather no cd-rom drivers for my computer. The installer said no cd in the drive. Is there another way to install hurd if the installer cannot detect the install medium?
<damo22>should be able to attach the disk to qemu and install to that
<damo22>or dd the disk image to it
<wire_panel>thanks, I didn't know about that way of getting it working using qemu. I appreciate it.