Re: domain_add(xxx) after domainfinalize...

2014-08-02 Thread John-Mark Gurney
Svatopluk Kraus wrote this message on Sat, Aug 02, 2014 at 21:27 +0200: > On Sat, Aug 2, 2014 at 8:32 PM, John-Mark Gurney wrote: > > > Svatopluk Kraus wrote this message on Sat, Aug 02, 2014 at 15:20 +0200: > > > Well, I did not look at network stack for long time, so the following > > > things

Re: domain_add(xxx) after domainfinalize...

2014-08-02 Thread Svatopluk Kraus
On Sat, Aug 2, 2014 at 8:32 PM, John-Mark Gurney wrote: > Svatopluk Kraus wrote this message on Sat, Aug 02, 2014 at 15:20 +0200: > > Well, I did not look at network stack for long time, so the following > > things could be obsolete now, but at least: > > > > (1) There is some room left in mbuf h

Re: domain_add(xxx) after domainfinalize...

2014-08-02 Thread John-Mark Gurney
Svatopluk Kraus wrote this message on Sat, Aug 02, 2014 at 15:20 +0200: > Well, I did not look at network stack for long time, so the following > things could be obsolete now, but at least: > > (1) There is some room left in mbuf header on its allocation, so protocols > (link) headers can be added

Re: domain_add(xxx) after domainfinalize...

2014-08-02 Thread Svatopluk Kraus
Well, I did not look at network stack for long time, so the following things could be obsolete now, but at least: (1) There is some room left in mbuf header on its allocation, so protocols (link) headers can be added in the front of data without need of reallocation or data copying. The size of th

Re: KQueue 0-length UDP packet

2014-08-02 Thread Fedor Indutny
After reading that line more carefully, I wonder if this behavior is really intentional here. It seems to me that `SO_RCVLOWAT` is supposed to set watermark value in terms of packet data bytes, not just raw packet size. And this is how `NOTE_LOWAT` actually works there, right? Could anyone please

Re: KQueue 0-length UDP packet

2014-08-02 Thread Fedor Indutny
Guess I know the answer: https://cloudup.com/cCkjLhI4M2r Basically, OSX is checking `kn_data` and FreeBSD is using `so->so_rcv.sb_cc`. Thank you anyway! On Sat, Aug 2, 2014 at 1:39 PM, Fedor Indutny wrote: > Hello! > > I'm trying to figure out, why this code: > > https://github.com/indutny/0

KQueue 0-length UDP packet

2014-08-02 Thread Fedor Indutny
Hello! I'm trying to figure out, why this code: https://github.com/indutny/0-udp Which basically sends a 0-length UDP packet to a server and polls kqueue events on the server fd. Return 1 kevent on FreeBSD, and blocks indefinitely without returning any events on OSX. So far I could see that Fr