[ovs-dev] Q on supporting actions with no arguments

Ravi.Kerur at telekom.com Ravi.Kerur at telekom.com
Tue Feb 7 23:57:51 UTC 2012


Hi,

I am working on implementing mpls functionality into ovs. In the past I have had discussions with Ben for suggestions/inputs. We thought it would be good to send it to ovs-dev on debugging issues. Code development (control path, user-space and kernel-space datapath) is complete.

So far, I am able to get some mpls actions(push, pop, setting mpls_label, mpls_tc and mpls_ttl) in kernel datapath and most control path i.e. setting mpls match and mpls actions working correctly. I have verified via tcpdump that proper mpls shim header is pushed/popped in all the cases.

I have run into issues with handling of ovs action attributes for mpls actions with no argument. These are dec_mpls_ttl, copy_ttl_in and copy_ttl_out actions. The closest I could use for reference is OVS_ACTION_ATTR_POP_VLAN which uses following condition

if (base->vlan_tci & htons(VLAN_CFI)) {
    nl_msg_put_flag(odp_actions, OVS_ACTION_ATTR_POP_VLAN);
}
...

in commit_vlan_action to trigger the pop action.

However, for mpls I don't think any bits in MPLS label stack entry could be used (20-bits label, 3 bits traffic-class, 1 bit bottom-of-stack and 8 bits ttl) for that purpose. In order to test the code path from user to kernel for OVS_ACTION_ATTR_DEC_MPLS_TTL and others I explicitly call nl_msg_put_flag(odp_actions, OVS_ACTION_ATTR_DEC_MPLS_TTL) from commit_mpls_action and have verified that it results in validate_actions/do_execute_actions in kernel and ttl copied correctly.

Is there a way to know that certain actions are programmed via an API or a variable in flow data-structure? Inputs appreciated.

Thanks
Ravi


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20120208/3c0bb213/attachment-0003.html>


More information about the dev mailing list