On Thu, Jul 18, 2013 at 1:37 PM, Jesse Gross <je...@nicira.com> wrote: > On Tue, Jul 16, 2013 at 9:06 AM, Pravin B Shelar <pshe...@nicira.com> wrote: >> diff --git a/datapath/linux/compat/include/net/net_namespace.h >> b/datapath/linux/compat/include/net/net_namespace.h >> index 77f0a16..a46c5d0 100644 >> --- a/datapath/linux/compat/include/net/net_namespace.h >> +++ b/datapath/linux/compat/include/net/net_namespace.h >> +int __net_init compat_init_net(struct net *net, struct >> rpl_pernet_operations *pnet); >> +void __net_exit compat_exit_net(struct net *net, struct >> rpl_pernet_operations *pnet); > > Theses are only needed in the 2.6.32 block, right? right.
> >> +#define DEFINE_COMPAT_PNET_REG_FUNC(PNET_TYPE) >> \ >> + \ >> +static struct rpl_pernet_operations *pnet_##PNET_TYPE; \ >> +static inline int compat_init_net_##PNET_TYPE(struct net *net) \ >> +{ \ >> + return compat_init_net(net, pnet_##PNET_TYPE); \ >> +} \ >> + \ >> +static inline void compat_exit_net_##PNET_TYPE(struct net *net) \ >> +{ \ >> + compat_exit_net(net, pnet_##PNET_TYPE); \ >> +} \ >> + \ >> +static inline int rpl_register_pernet_##PNET_TYPE(struct >> rpl_pernet_operations *rpl_pnet) \ >> +{ >> \ >> + pnet_##PNET_TYPE = rpl_pnet; >> \ >> + rpl_pnet->ops.init = compat_init_net_##PNET_TYPE; >> \ >> + rpl_pnet->ops.exit = compat_exit_net_##PNET_TYPE; >> \ >> + return register_pernet_##PNET_TYPE(pnet_##PNET_TYPE->id, >> &rpl_pnet->ops); \ >> +} >> \ >> + >> \ >> +static inline void rpl_unregister_pernet_##PNET_TYPE(struct >> rpl_pernet_operations *rpl_pnet) \ >> +{ >> \ >> + unregister_pernet_##PNET_TYPE(*pnet_##PNET_TYPE->id, >> &rpl_pnet->ops); \ >> +} > > Can we drop the inlines now that these are in .c files? > ok. >> +#endif >> +#else >> +#define DEFINE_COMPAT_PNET_REG_FUNC(PNET_TYPE) extern int >> __dummy_____##PNET_TYPE > > What is the goal with defining this? Checking for duplicate definitions? To avoid compiler warning on new kernels where is it used, e.g. in datapath.c. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev