[ovs-dev] [PATCH 0/18] Basic MPLS actions and matches
Simon Horman
horms at verge.net.au
Thu Dec 27 05:23:01 UTC 2012
Hi,
This series implements basic MPLS actions and matches based on work by
Ravi K, Leo Alterman and Yamahata-san.
The main limitation of this implementation is that it only
supports manipulating the outer-most MPLS label.
Differences between the previous post, v2.11, and this post, v2.12:
* Rebase
* Add eth_type_mpls helper
* Add flow_innermost_dl_type helper
* calculate MPLS fitness over entire flow
- It is sufficient to just calculate the fitness of an MPLS frame once.
- Previously a fitness calculation was made based on expectations calculat
on L1 and L2 data. However, this may not be correct as it will return
ODP_FIT_TOO_MUCH in the case where the key contains L3 attributes.
* Pass MPLS lse to push_mpls
- When push_mpls() the LSE of the flow is always already known,
so pass it to push_mpls and set it directly. This avoids:
+ The need to re-compose an default LSE, allowing
the removal of get_lse()
+ The need to follow each call to push_mpls() with
a call to set_mpls_lse()
- This fixes the previously bogus usage of push_mpls
in dp_netdev_execute_actions, allowing push_mpls to work
in conjunction with the user-space datapath.
* Add dl_type parameter to flow_extract_l3_onwards()
and thus allow "flow: Split flow_extract" to be applied
independently of the rest of this patch-set.
Differences between the previous post, v2.10, and this post, v2.11:
* Rebase
* The last 13 patches in the series have been added to allow
handling of actions on MPLS flows that modify any L3+ data.
In particular, to allow modification of the IP TTL.
This is achieved by adding the notion of inner and outer flows.
This works as follows.
- A match is decoded from a packet using the existing implementation
and this is used to look up the flow.
- If the flow includes actions that allow further decoding of
the packet - e.g. an MPLS pop action which supplies the
ethernet type of the encapsulated frame - then the packet is
further decoded and a more fine-grained match is made. This match
is then used to lookup the flow again.
In such cases the flow added to the datapath by ovs-vswtichd
includes the richer match and the actions. The datapath inspects
the actions and if there are actions that allow further decoding of
the packet it inserts the flow twice, once including only an L1 and L2
match and once including the richer match. The former is the
other flow and the latter is the inner flow.
Each inner flow has a single outer flow. Outer flows may
have more than one inner flow. Inner flows are not exposed
to ovs-vswitchd. Inner flows are deleted when their outer
flow is deleted.
* Check the size of nx_action_mpls_ttl.
nx_action_pop_mpls was being checked
due to a cut-and-paste error
Differences between the previous post, v2.9, and this post, v2.10:
* Rebase
* Check the size of nx_action_mpls_ttl.
nx_action_pop_mpls was being checked
due to a cut-and-paste error
Key differences between v2.8 and v2.9
* Rebase
and fix tests accordingly
* Always update MPLS bos pointer when
VLAN pop is performed in kernel datapath.
Key differences between v2.7 and v2.8
* Rebase
Key differences between v2.6 and v2.7
* When encoding TTL actions (the last 4 patches) for
an OpenFlow 1.1+ message, encode them as OpenFlow 1.1+
actions. Previously they were encoded as NX matches.
Key differences between v2.5 and v2.6
* Dropped "flow: Set ttl in flow_compose()", this is
now present in the master branch
* Dropped "nx-match: Do not check pre-requisites for load actions",
instead, dl_type changes are tracked to allow correct pre-requisite
checking in the presence of push_mpls and pop_mpls actions.
Key differences between v2.4 and v2.5
* Various clean-ups and fises to
"User-Space MPLS actions and matches"
as noted in its changelog.
* New patches to add support for TLS actions
* Inclusion of Justin Pettit's patch
"flow: Set ttl in flow_compose()",
which is a dependency of the
"Add support for copy_ttl_out action" patch.
Key differences between v2.3 and v2.4
* Minor cleanup to "User-Space MPLS actions and matches"
as detailed in its changelog.
* A new patch at the end of the series
"Add support for set_mpls_ttl action"
Changes are detailed in the changelog of each patch.
The testsuite passes when this series is applied on top
of the current master branch.
Diffstat and git information is provided to aid review.
----------------------------------------------------------------
The following changes since commit a4454ac67c6d38740914d157f73b5083f6912172:
ofproto-dpif: Don't output to nonexistent ports. (2012-12-21 15:24:21 -0800)
are available in the git repository at:
git://github.com/horms/openvswitch.git devel/mpls.inner_flow
for you to fetch changes up to b9d3d138cf90c57350bbd0a71cef06e745b11e35:
ofproto: Allow actions richer maches based on actions (2012-12-24 11:00:14 +0900)
----------------------------------------------------------------
Simon Horman (19):
datapath: Add basic MPLS support to kernel
User-Space MPLS actions and matches
Add support for dec_mpls_ttl action
Add support for set_mpls_ttl action
Add support for copy_ttl_out action
Add support for copy_ttl_in action
datapath: Allow IP actions for MPLS
datapath: Update skb transport and network headers on MPLS extraction
datapath: Use NULL in skb_cb_mpls_bos
datapath: Allow repeated extraction of flow from packets
datapath: re-lookup a flow if actions allow a more fine grained match
datapath: Allow inner_flows
datapath: ovs_flow_to_nlattrs: use encap_eth_type
datapath: ovs_flow_used: use encap_eth_type
flow: Split flow_extract
odp-util: commit_set_nw_action: use flow's encap_dl_type
packet: packet_get_tcp_flags: use flow's encap_dl_type
actions: Allow secondary decoding of a flow
ofproto: Allow actions richer maches based on actions
datapath/actions.c | 98 ++++++++++++-
datapath/datapath.c | 289 +++++++++++++++++++++++++++++--------
datapath/datapath.h | 8 +
datapath/flow.c | 252 +++++++++++++++++++++++---------
datapath/flow.h | 31 +++-
datapath/vport.c | 2 +
include/linux/openvswitch.h | 32 ++++
include/openflow/nicira-ext.h | 39 +++++
lib/dpif-linux.c | 2 +-
lib/dpif-netdev.c | 18 ++-
lib/flow.c | 136 +++++++++++++++--
lib/flow.h | 18 ++-
lib/match.c | 88 ++++++++++-
lib/match.h | 6 +
lib/meta-flow.c | 114 +++++++++++++++
lib/meta-flow.h | 9 ++
lib/nx-match.c | 20 ++-
lib/odp-util.c | 200 +++++++++++++++++++++++--
lib/odp-util.h | 2 +-
lib/ofp-actions.c | 196 ++++++++++++++++++++++++-
lib/ofp-actions.h | 31 ++++
lib/ofp-parse.c | 48 +++++-
lib/ofp-print.c | 9 +-
lib/ofp-util.c | 31 +++-
lib/ofp-util.def | 12 ++
lib/ofpbuf.c | 8 +-
lib/ofpbuf.h | 1 +
lib/packets.c | 273 ++++++++++++++++++++++++++++++++++-
lib/packets.h | 91 ++++++++++++
ofproto/ofproto-dpif.c | 321 ++++++++++++++++++++++++++++++++++++++---
tests/odp.at | 13 ++
tests/ofproto-dpif.at | 232 +++++++++++++++++++++++++++++
tests/test-bundle.c | 1 +
tests/test-multipath.c | 1 +
tests/test-odp.c | 2 +-
utilities/ovs-dpctl.c | 18 ++-
utilities/ovs-ofctl.8.in | 45 ++++++
37 files changed, 2489 insertions(+), 208 deletions(-)
_______________________________________________
dev mailing list
dev at openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list