On Thu, Oct 25, 2012 at 1:34 PM, Ben Pfaff <b...@nicira.com> wrote: > On Thu, Oct 25, 2012 at 01:33:32PM -0700, Pravin Shelar wrote: >> On Thu, Oct 25, 2012 at 1:22 PM, Ben Pfaff <b...@nicira.com> wrote: >> > On Sat, Oct 27, 2012 at 01:07:35PM -0700, Pravin B Shelar wrote: >> >> Signed-off-by: Pravin B Shelar <pshe...@nicira.com> >> > >> > ... >> > >> >> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) >> >> +#define NETLINK_CB_PORT_ID(skb) (NETLINK_CB((skb)).portid) >> >> +#else >> >> +#define NETLINK_CB_PORT_ID(skb) (NETLINK_CB((skb)).pid) >> >> +#endif >> > >> > I'd be at least tempted to write: >> > >> > #if LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) >> > #define portid pid >> > #endif >> >> portid is pretty common name, I am not sure if we can make this type >> of renaming cross kernel datapath. > > I won't argue with that.
It's worth checking whether it is possible to use portid directly since it is nicer. >> > and similarly for snd_portid vs. snd_pid in genetlink.h, which would >> > skip the indirection macro. >> >> ok, I will change it. > > Well, it's up to you (and Jesse), just pointing it out. Certainly to the extent possible, it's nice to do this with macros that completely hide the difference. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev