> if (base->vlan_tci & htons(VLAN_CFI)) {
> nl_msg_put_flag(odp_actions, OVS_ACTION_ATTR_POP_VLAN);
> }
> .
Maybe I'm not understanding your question but this condition isn't
related to the fact that the pop vlan doesn't take any arguments.
It's due to the fact that we first make any changes to a userspace
copy of the flow and then convert those to kernel actions at the end,
which has the effect of removing any redundant actions so if you have
set(X) then set(Y) we would just generate one kernel action to set Y
because we only compare against the base. In the case of a decrement
action you would want the action to occur for every time that it
occurred in the original so there's no need for this type of
conditional.
[rk] Thanks Jesse for your inputs. What I meant was there is some condition in
user-space which would trigger pop vlan action into kernel.
That being said, I think the real reason for the issue that your
running into is that we don't normally have a direct correspondence
between OpenFlow and kernel actions, particularly for these types of
TTL actions. If you look at the IP TTL decrement, there's no
corresponding kernel TTL decrement, only a set. So each time that
userspace encounters a TTL decrement it decrements its copy by 1 (it
knows the original value because it was part of the original lookup)
and then generates a set at the end. I think you could do something
similar to implement the three remaining MPLS TTL actions using your
original set MPLS TTL.
[rk] Theoretically I follow this, however, if you can point me to code snippet
it would really help.
Thanks
Ravi
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev