[ovs-dev] [PATCH v2 1/5] rstp: Init a recursive mutex for rstp.

nickcooper-zhangtonghao nic at opencloud.tech
Fri May 19 07:19:14 UTC 2017


> On May 19, 2017, at 6:47 AM, Ben Pfaff <blp at ovn.org> wrote:
> 
> On Wed, May 10, 2017 at 04:15:02AM -0700, nickcooper-zhangtonghao wrote:
>> * This patch will be used for next patch. The 'rstp/show' command,
>> which uses the mutex, calls functions which also use the mutex.
>> We should init it as a recursive mutex.
>> 
>> * Some rstp tests of OvS, which run with ovstest, does not run rstp_init
>> in the bridge_init. We should call rstp_init when creating the rstp
>> and stp also do that, otherwise tests fail.
>> 
>> * This patch remove the rstp_mutex in header file and make it static
>> in c file because we only use it in lib/rstp.c
>> 
>> Signed-off-by: nickcooper-zhangtonghao <nic at opencloud.tech>
> 
> Thanks for working on the rstp code!
> 
> This patch causes a huge number of build failures with Clang, like this:
> 
>    In file included from ../lib/rstp.c:32:
>    ../lib/rstp.h:135:18: error: use of undeclared identifier 'rstp_mutex'
>    ../include/openvswitch/compiler.h:136:57: note: expanded from macro 'OVS_EXCLUDED'
> 
> I think that's the only reason that rstp_mutex is global.


Thanks for your review, the v3 patches don’t remove the rstp_mutex from header file
and we can build it with gcc and clang. Because of recursive mutex, I remove the 
OVS_EXCLUDED in the lib/rstp.[ch] files. Thanks very much.




More information about the dev mailing list