On Tue, Dec 13, 2011 at 1:16 PM, Pravin Shelar <[email protected]> wrote:
> On Mon, Dec 12, 2011 at 9:58 PM, Jesse Gross <[email protected]> wrote:
>> On Mon, Nov 28, 2011 at 7:11 PM, Pravin B Shelar <[email protected]> wrote:
>>> diff --git a/datapath/linux/compat/include/net/netns/generic.h
>>> b/datapath/linux/compat/include/net/netns/generic.h
>>> new file mode 100644
>>> index 0000000..70562d1
>>> --- /dev/null
>>> +++ b/datapath/linux/compat/include/net/netns/generic.h
>>> @@ -0,0 +1,11 @@
>>> +#ifndef __NET_NET_NETNS_GENERIC_WRAPPER_H
>>> +#define __NET_NET_NETNS_GENERIC_WRAPPER_H 1
>>> +
>>> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
>>> +/* <net/netns/generic.h> exists, go ahead and include it. */
>>> +#include_next <net/netns/generic.h>
>>
>> net_generic() actually exists on these kernels, declared as a static
>> inline. Do we actually get the right version?
>>
> I need to overload it to return ovs_net for compatibility with older kernel.
Yeah, I understand why you're doing this. I just wanted to confirm
that the compiler actually found your version instead of the static
inline in the header file.
>>> diff --git a/datapath/vport.h b/datapath/vport.h
>>> index 44cf603..3cc3a69 100644
>>> --- a/datapath/vport.h
>>> +++ b/datapath/vport.h
>> [...]
>>> +struct vport_net {
>>> + struct hlist_head *vport_table;
>>> + struct hlist_head *peer_table;
>>
>> It's not clear to me that either of these tables need to be replicated
>> for each namespace. Neither is performance critical so rather than
>> creating additional hash tables we can just compare the namespace
>> during lookup.
>>
> I thought about that, but if we have global table then it will need
> more locking.
> if you want I can make it global table.
Why does it need more locking? These tables are protected by
RTNL/RCU, neither of which is namespace-specific.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev