Re: [ovs-dev] [threads 02/23] ofp-msgs: Make thread-safe.

2013-07-22 Thread Ben Pfaff
On Mon, Jul 22, 2013 at 09:10:52AM -0700, Alex Wang wrote: > Looks good to me, > > Want to ask question about "ovsthread_once_start()", > 1. why do we have "ovsthread_once_start()" defined in header file? The "fast path" for using ovsthread_once_start() is just a test and conditional jump. The a

Re: [ovs-dev] [threads 02/23] ofp-msgs: Make thread-safe.

2013-07-22 Thread Alex Wang
Oh! How could I not see the "inline". Sorry for the nonsense, On Mon, Jul 22, 2013 at 10:39 AM, Ben Pfaff wrote: > On Mon, Jul 22, 2013 at 10:35:27AM -0700, Alex Wang wrote: > > On Mon, Jul 22, 2013 at 10:23 AM, Ben Pfaff wrote: > > > > > On Mon, Jul 22, 2013 at 09:10:52AM -0700, Alex Wang wro

Re: [ovs-dev] [threads 02/23] ofp-msgs: Make thread-safe.

2013-07-22 Thread Ben Pfaff
On Mon, Jul 22, 2013 at 10:35:27AM -0700, Alex Wang wrote: > On Mon, Jul 22, 2013 at 10:23 AM, Ben Pfaff wrote: > > > On Mon, Jul 22, 2013 at 09:10:52AM -0700, Alex Wang wrote: > > > Looks good to me, > > > > > > Want to ask question about "ovsthread_once_start()", > > > 1. why do we have "ovsthr

Re: [ovs-dev] [threads 02/23] ofp-msgs: Make thread-safe.

2013-07-22 Thread Alex Wang
Thanks Ben for the explanation, On Mon, Jul 22, 2013 at 10:23 AM, Ben Pfaff wrote: > On Mon, Jul 22, 2013 at 09:10:52AM -0700, Alex Wang wrote: > > Looks good to me, > > > > Want to ask question about "ovsthread_once_start()", > > 1. why do we have "ovsthread_once_start()" defined in header fil

Re: [ovs-dev] [threads 02/23] ofp-msgs: Make thread-safe.

2013-07-22 Thread Alex Wang
Looks good to me, Want to ask question about "ovsthread_once_start()", 1. why do we have "ovsthread_once_start()" defined in header file? 2. if __check__ is defined, the macro function will override the previously defined "ovsthread_once_start()" function. Right? 3. could you explain why you use

[ovs-dev] [threads 02/23] ofp-msgs: Make thread-safe.

2013-07-18 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/ofp-msgs.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/lib/ofp-msgs.c b/lib/ofp-msgs.c index af4178e..5e043d2 100644 --- a/lib/ofp-msgs.c +++ b/lib/ofp-msgs.c @@ -23,6 +23,7 @@ #include "ofpbuf.h" #include "openflow/nicira-ext.h