On Sat, Nov 03, 2012 at 02:48:39PM +0900, FUJITA Tomonori wrote:
> On Sat, 3 Nov 2012 10:48:08 +0900
> Isaku Yamahata <[email protected]> wrote:
> 
> > On Sat, Nov 03, 2012 at 09:34:32AM +0900, FUJITA Tomonori wrote:
> >> On Fri, 12 Oct 2012 15:19:40 +0900
> >> Isaku Yamahata <[email protected]> wrote:
> >> 
> >> > On Fri, Oct 12, 2012 at 03:07:57PM +0900, Isaku Yamahata wrote:
> >> >> Okay, I'll hard-code all of them. And let's see the result.
> >> > 
> >> > I uploaded at
> >> > git://github.com/yamahata/ryu.git contrib-ovs-import-1
> >> > ovs lib only
> >> 
> >> This doesn't include the change for tcp sockets?
> > 
> > Now the upstream includes all necessary patches. So I updated and uploaded
> > git://github.com/yamahata/ryu.git contrib-ovs-import-2
> 
> Thanks, seems to work.
> 
> MacOS doesn't have POLL* constants (poll isn't supported by all OSes,
> I guess). From quick look, the code uses select() (supported by all)
> and POLL* constants are used only internally. The following works for
> me.

Ah right. I tested it on only Linux.


> diff --git a/ryu/contrib/ovs/poller.py b/ryu/contrib/ovs/poller.py
> index c04c9b3..03082d3 100644
> --- a/ryu/contrib/ovs/poller.py
> +++ b/ryu/contrib/ovs/poller.py
> @@ -20,6 +20,11 @@ import socket
>  
>  vlog = ovs.vlog.Vlog("poller")
>  
> +POLLIN = 0x001
> +POLLOUT = 0x004
> +POLLERR = 0x008
> +POLLHUP = 0x010
> +POLLNVAL = 0x020

If monkey patching is allowed, how about this?
With this, we don't have to s/select.POLLxxx/ovs.pollar.xxx/g

if not hasatter(select, 'POLLIN'):
    select.POLLIN = 0x001
...

thanks,
-- 
yamahata

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to