On Thu, Feb 6, 2014 at 5:00 PM, Ben Pfaff <[email protected]> wrote: > On Thu, Feb 06, 2014 at 08:12:33AM -0800, Gurucharan Shetty wrote: >> This commit creates events and associates them with >> socket file descriptors to get woken up from poll_block(). >> One difference with the Linux implementation is that >> we cannot register for separate network events with poll_block(). >> i.e., we cannot say, we only should be woken up for POLLIN or POLLOUT. >> So this would mean that we will be woken up from poll_block() more >> often. > > I don't understand how this can really work. It means that we'll spin > with 100% CPU if we're waiting for the TX window to open up but > there's data ready to be received. I doubt that's acceptable, is > there anything we can do?
It looks like there is a straight forward way to get this to work right (I did not occur to me the first time around). So v2 will have the change. > >> Some other changes: >> >> * Windows does not have sys/fcntl.h but has a fcntl.h >> On Linux, there is fctnl.h too. > > Interesting. <fcntl.h> is actually the standardized name, so it's > better to use that name anyway. > >> * SHUT_RDWR is equivalent to SD_BOTH on Windows. >> >> Signed-off-by: Gurucharan Shetty <[email protected]> > > I'd consider adding to socket-util.h: > > #ifndef _WIN32 > #define closesocket close > #endif Since stream-ssl.c seems to be the only place where there will be this co-existance, I have added the above to that file for v2. > > so that we don't need a close_socket() in multiple files. > > Would it make anything cleaner or easier to turn stream-ssl from a > direct user of sockets, into a user of a nested stream-tcp? I would like to avoid making changes that effect Linux too. Have a look at v2, and if you feel it is acceptable, we can think about it later. > > Thanks, > > Ben. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
