Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-18 Thread Alex Wang
Hey Han, Again, thanks for your comments, ;D On Tue, Feb 18, 2014 at 10:46 PM, Zhou, Han wrote: > > I think it is okay that we miss the upcalls for a short period. > > > > > > The way current ovs calls 'port_add()' is that ODPP_NONE is given for > > '*port_nop'. > > And the datapath will dense

Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-18 Thread Zhou, Han
Hi Alex, On Tue, 2014-02-18 at 10:26 -0800, Alex Wang wrote: > Thanks a lot Han for the close review ;D My pleasure :) > > In this function, you separated vport transaction for creating > vports > and setting channel pids to kernel. But it could lead to >

Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-18 Thread Alex Wang
Thanks a lot Han for the close review ;D Please see my comments inline. On Sat, Feb 15, 2014 at 8:44 AM, Han Zhou wrote: > > -add_channel(struct dpif_linux *dpif, odp_port_t port_no, struct nl_sock > *sock) > > +add_vport_channels(struct dpif_linux *dpif, odp_port_t port_no, > > +

Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-16 Thread Han Zhou
Hi Alex, Here comes my full review: On Fri, 2014-02-07 at 17:17 -0800, Alex Wang wrote: > diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c > > +/* Adds 'dpif->n_handlers' channels to vport. If upcall_pids is non-NULL, > + * makes it point to the array of channel socket pids. */ > static int

Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-12 Thread Zhou, Han
Hi Alex, On Wed, 2014-02-12 at 20:24 -0800, Alex Wang wrote: > > > I'd very much like to get a full review from you. Are you planning to do > that? > > > Also want to ask about your timetable, do you think you could finish review > this week? > Yes, I will try to finish review by this wee

Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-12 Thread Alex Wang
Hey Han, I'd very much like to get a full review from you. Are you planning to do that? Also want to ask about your timetable, do you think you could finish review this week? Appreciate your help, ;D Alex Wang, On Wed, Feb 12, 2014 at 6:37 AM, Zhou, Han wrote: > Hi Alex, > > On Fri, 2014-02

Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-12 Thread Alex Wang
Thanks Han for the review, ;D I misunderstood how rcu works. The access of "vport->upcall_pids" is a "single writer, multiple readers" problem. And it has already been protected by the 'ovs_lock()' in callers. I'll remove the rcu read critical section in the V3 patch. Alex Wang, On Wed, Feb 1

Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-12 Thread Zhou, Han
Hi Alex, On Fri, 2014-02-07 at 17:17 -0800, Alex Wang wrote: > This commit removes the 'dispatcher' thread by allowing 'handler' > threads to read upcalls directly from dpif. vport in dpif will > open netlink sockets for each handler and will use the 5-tuple > hash from the missed packet to choos