On Thu, Dec 18, 2014 at 11:26 AM, Justin Pettit <jpet...@nicira.com> wrote:
>
>> On Dec 18, 2014, at 10:15 AM, Pravin Shelar <pshe...@nicira.com> wrote:
>>
>> On Wed, Dec 17, 2014 at 10:50 PM, Justin Pettit <jpet...@nicira.com> wrote:
>>> Hi, Pravin.  I think commit a36de77 (openvswitch: Userspace tunneling.) 
>>> introduces a problem when new actions are added in the kernel.  This part 
>>> makes the kernel's idea of actions defined after _TUNNEL_POP different from 
>>> userspace:
>>>
>>> -=-=-=-=-=-=-=-
>>> @@ -636,6 +663,10 @@ enum ovs_action_attr {
>>>                                       * The data must be zero for the 
>>> unmasked
>>>                                       * bits. */
>>>
>>> +#ifndef __KERNEL__
>>> +       OVS_ACTION_ATTR_TUNNEL_PUSH,   /* struct ovs_action_push_tnl*/
>>> +       OVS_ACTION_ATTR_TUNNEL_POP,    /* u32 port number. */
>>> +#endif
>>>        __OVS_ACTION_ATTR_MAX
>>> };
>>> -=-=-=-=-=-=-=-
>>>
>>> The problem is that userspace generates these actions for the kernel, so 
>>> the enums for any new actions are off by two.
>>>
>>
>> All new actions should be added before these userspace only actions.
>> So that the action ID remains same for userspace and kernel module.
>
> These sort of assumptions should really be documented.  I'll send out a patch.
>
> Long-term, this seems pretty ugly, since Netlink is the interface for more 
> than just Linux and userspace.
>

BTW this is not first instance of this issue. But I agree we need
better solution.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to