[ovs-dev] [PATCH] VLAN actions should use push/pop semantics

Jesse Gross jesse at nicira.com
Wed Jul 13 23:51:16 UTC 2011


On Wed, Jul 13, 2011 at 9:24 AM, pravin shelar <pshelar at nicira.com> wrote:
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> index 3b93a4c..5c52ea6 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -1304,11 +1304,11 @@ dp_netdev_execute_actions(struct dp_netdev *dp,
>                                      key, nl_attr_get_u64(a));
>             break;
>
> -        case ODP_ACTION_ATTR_SET_DL_TCI:
> +        case ODP_ACTION_ATTR_PUSH_VLAN_TCI:
>             eth_set_vlan_tci(packet, nl_attr_get_be16(a));
>             break;
>
> -        case ODP_ACTION_ATTR_STRIP_VLAN:
> +        case ODP_ACTION_ATTR_POP_VLAN_TCI:
>             dp_netdev_strip_vlan(packet);
>             break;

I'll look at this in more detail a little later but one quick comment:

The code in this file is actually implementing a parallel datapath in
userspace (useful for quick ports, unprivileged use, enforces
modularity, etc.).  As a result, it needs to implement the same
semantics as the kernel now has.  It's simpler because it doesn't have
to deal with offloads but it still needs to match the changes between
push_vlan and set_tci.



More information about the dev mailing list