Re: [ovs-dev] [PATCH] datapath: remove a comment that no longer applies

2014-07-15 Thread Andy Zhou
I sent V2 under a different subject due to the patch content change. Here is a link to the patch: http://patchwork.openvswitch.org/patch/4979/ On Mon, Jul 14, 2014 at 5:58 PM, Joe Stringer wrote: > On 15 July 2014 12:53, Jarno Rajahalme wrote: >> >> >> How about this: >> >> /* The caller must h

Re: [ovs-dev] [PATCH] datapath: remove a comment that no longer applies

2014-07-15 Thread Andy Zhou
Good point on comments. I now agree it is necessary and should stay with the function. Comments aside, I am not happy with the nested rcu_read_lock(). It seems unnecessary. I will come up with a v2. On Mon, Jul 14, 2014 at 5:58 PM, Joe Stringer wrote: > On 15 July 2014 12:53, Jarno Rajahalme w

Re: [ovs-dev] [PATCH] datapath: remove a comment that no longer applies

2014-07-14 Thread Joe Stringer
On 15 July 2014 12:53, Jarno Rajahalme wrote: > > How about this: > > /* The caller must hold either rcu_read_lock or ovs_mutex to keep the > returned dp pointer valid. */ > This looks good. And I think it's better to have it at get_dp() rather than the callers, to help prevent future misuse of

Re: [ovs-dev] [PATCH] datapath: remove a comment that no longer applies

2014-07-14 Thread Jarno Rajahalme
How about this: /* The caller must hold either rcu_read_lock or ovs_mutex to keep the returned dp pointer valid. */ Jarno > On Jul 15, 2014, at 3:45 AM, Andy Zhou wrote: > > Since rcu_read_lock() is taken within the function. Caller is not > strictly required to take either rcu_read_lock()

Re: [ovs-dev] [PATCH] datapath: remove a comment that no longer applies

2014-07-14 Thread Andy Zhou
Since rcu_read_lock() is taken within the function. Caller is not strictly required to take either rcu_read_lock() or a mutex lock. What you said is true in how we use this function. May be it should be comments in the calling sits? On Mon, Jul 14, 2014 at 3:55 PM, Joe Stringer wrote: > Isn't t

Re: [ovs-dev] [PATCH] datapath: remove a comment that no longer applies

2014-07-14 Thread Joe Stringer
Isn't this here to cover the case where the datapath disappears when it is returned to the caller? (In which case, perhaps we could explain this in the comment) On 15 July 2014 09:55, Andy Zhou wrote: > Signed-off-by: Andy Zhou > --- > datapath/datapath.c | 1 - > 1 file changed, 1 deletion(

[ovs-dev] [PATCH] datapath: remove a comment that no longer applies

2014-07-14 Thread Andy Zhou
Signed-off-by: Andy Zhou --- datapath/datapath.c | 1 - 1 file changed, 1 deletion(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 065356f..1fd7bf3 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -140,7 +140,6 @@ static int queue_gso_packets(struct datapath *dp, str