Views
OpenFlowMPLS Software Switch
From OpenFlow Wiki
This page is no longer maintained. For up to date information on the OpenFlow MPLS Extension, please visit the main page and the pages linked from there: OpenFlowMPLS.
Contents |
Overview
We modified version 0.8.9r2 of the Stanford OpenFlow reference switch implementations to support MPLS. The switches implement everything described in this section. More details can be found in the code which has been extensively commented and is available here. We did not add support for our changes to any of the utilities (dpctl, wireshark plugin, etc).
Under utilities there is a new folder utilities/mpls_pkt_gen. This is an extremely simple utility that uses raw sockets to generate hardcoded MPLS packets which can be used for testing.
User-space switch
This section provides a brief overview of the changes to Stanford's OpenFlow user-space switch implementation.
Limitations
- TTL Handling: part of the implicit behaviour of an MPLS-enabled OpenFlow switch is to handle TTL-expired exceptions. Currently any labeled packet that enters with a TTL of 1 or less will be dropped. A mpls_ttl0_dropped counter has been added on each port to keep track of the number of MPLS packets that have been dropped due to the TTL expired exception. This counter is part of the ofp_port_stats message
User-space files
Changes to the code in existing files have been encapsulated by a comment block beginning with "MAH: start" and ending with "MAH: end".
Overview of added files:
- switch/er_act.{c,h}
This file is for Ericsson extensions. The pop_mpls & push_mpls actions are supported at the flow table as Ericsson extensions in this implementation.
- switch/pt_act.{c,h}
Similar to how dp_act.{c,h} contains the code to support actions at the flow table, pt_act contains the code to support actions at the virtual port table.
- switch/switch_port.{c,h}
This defines the virtual port table and all its operations.
- lib/red-black-tree.{c,h}
Since we let the software switch implementation support billions of virtual port table entries, we use a red-black tree to manage virtual port table entries.
- lib/stack.{c,h}
Used by the red-black-tree implementation mentioned above.
- lib/misc.{c,h}
Also used by the red-black tree implementation mentioned above.
Kernel-space switch
This section provides a brief overview of the changes to Stanford's OpenFlow kernel-space switch implementation. The changes to the kernel-space switch are for the most part identical as the changes to the user-space switch. Much of the code used in user-space, however, had to be adapted to use kernel memory management and to work with sk_buff rather than ofpbuf packet buffer structures.
Limitations
- TTL Handling: part of the implicit behaviour of an MPLS-enabled OpenFlow switch is to handle TTL-expired exceptions. Currently any labeled packet that enters with a TTL of 1 or less will be dropped. A mpls_ttl0_dropped counter has been added on each port to keep track of the number of MPLS packets that have been dropped due to the TTL expired exception. This counter is part of the ofp_port_stats message
- The skb is typically allocated with a limited amount of headroom (between 18-22 bytes). Thus there is only room to push 4-5 labels at once.
Kernel-space files
Overview of added files:
- datapath/er_act.{c,h}
This file is for Ericsson extensions. The pop_mpls & push_mpls actions are supported at the flow table as Ericsson extensions in this implementation.
- datapath/pt_act.{c,h}
Similar to how dp_act.{c,h} contains the code to support actions at the flow table, pt_act contains the code to support actions at the virtual port table.
- datapath/switch_port.{c,h}
This defines the virtual port table and all its operations.
- datapath/kred-black-tree.{c,h}
This file was adapted from lib/red-black-tree.{c,h} to work in kernel space.
- datapath/kstack.{c,h}
This file was adapted from lib/kstack.{c,h} to work in kernel space.
- datapath/kmisc.{c,h}
This file was adapted from lib/kmisc.{c,h} to work in kernel space.
Note: All the changes to the code have been encapsulated by a comment block beginning with "MAH: start" and ending with "MAH: end".
