[ovs-dev] [PATCH 0/1] Encap & Decap actions for MPLS Packet Type

Martin Varghese martinvarghesenokia at gmail.com
Tue Oct 8 04:53:13 UTC 2019


The existing PUSH MPLS & POP MPLS actions inserts & removes MPLS header
between ethernet header and the IP header. Though this behaviour is fine
for L3 VPN where an IP packet is encapsulated inside a MPLS tunnel, it does
not suffice the L2 VPN requirements. In L2 VPN the ethernet packets must be
encapsulated inside MPLS tunnel.

In this change the encap & decap actions are extended to support MPLS packet
type. The encap & decap adds and removes MPLS header at the start of packet
as depicted below.

Encapsulation:

Actions - encap(mpls(ether_type=0x8847)),encap(ethernet)

Incoming packet -> | ETH | IP | Payload |

1 Actions -  encap(mpls(ether_type=0x8847)) [Kernel action - ptap_push_mpls:0x8847]

        Outgoing packet -> | MPLS | ETH | Payload|

2 Actions - encap(ethernet) [ Kernel action - push_eth ]

        Outgoing packet -> | ETH | MPLS | ETH | Payload|

Decapsulation:

Incoming packet -> | ETH | MPLS | ETH | IP | Payload |

Actions - decap(),decap(packet_type(ns=0,type=0)

1 Actions -  decap() [Kernel action - pop_eth)

        Outgoing packet -> | MPLS | ETH | IP | Payload|

2 Actions - decap(packet_type(ns=0,type=0) [Kernel action - ptap_pop_mpls:0]

        Outgoing packet -> | ETH  | IP | Payload|


Note to reviewers -

This is an early drop to gather feedback and hence incomplete.


Martin Varghese (1):
  Encap & Decap actions for MPLS Packet Type.

 datapath/actions.c                                | 57 ++++++++++++++
 datapath/flow_netlink.c                           | 13 ++++
 datapath/linux/compat/include/linux/openvswitch.h |  2 +
 include/openvswitch/ofp-ed-props.h                | 18 +++++
 lib/dpif.c                                        |  2 +
 lib/odp-execute.c                                 |  2 +
 lib/odp-util.c                                    | 46 +++++++++--
 lib/ofp-actions.c                                 |  5 ++
 lib/ofp-ed-props.c                                | 93 ++++++++++++++++++++++-
 ofproto/ofproto-dpif-xlate.c                      | 58 +++++++++++++-
 10 files changed, 288 insertions(+), 8 deletions(-)

-- 
1.8.3.1



More information about the dev mailing list