[ovs-dev] [PATCH] datapath: Linux 4.9 compat.

Jarno Rajahalme jarno at ovn.org
Sat Dec 10 01:24:32 UTC 2016


Thanks for the reviews!

Pushed to master with a better title and a compiletime_assert() for GENL_ID_GENERATE, if it is defined.

  Jarno

> On Dec 9, 2016, at 2:36 PM, Pravin Shelar <pshelar at ovn.org> wrote:
> 
> On Wed, Dec 7, 2016 at 4:31 PM, Jarno Rajahalme <jarno at ovn.org <mailto:jarno at ovn.org>> wrote:
>> This patch allows openvswitch kernel module in the OVS tree to be
>> compiled against the current net-next Linux kernel.  The changes are
>> due to these upstream commits:
>> 
>> 56989f6d856 ("genetlink: mark families as __ro_after_init")
>> 489111e5c25 ("genetlink: statically initialize families")
>> a07ea4d9941 ("genetlink: no longer support using static family IDs")
>> 
>> struct genl_family initialization is changed be completely static and
>> to include the new (in Linux 4.6) __ro_after_init attribute.  Compat
>> code defines it as an empty macro if not defined already.
>> 
>> GENL_ID_GENERATE is no longer defined, but since it was defined as 0,
>> it is safe to drop it from all initializers also on older Linux
>> versions.
>> 
> 
> Patch looks good to me too.
> Can you add assert for GENL_ID_GENERATE value, to catch case where it
> is not the case.
> 
> Thanks.



More information about the dev mailing list