Skip to content

New openvswitch MPLS actions for layer 2 tunnelling

Martin Varghese netdev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 4 repliesIn review
  2. v43 patches 7 repliesSuperseded
  3. v33 patches 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches1 replySuperseded
v13 patches15 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: skb_mpls_push() modified to allow MPLS header push at start of packet.net/core/skbuff.c+6 -21 reply
2/3net: Rephrased comments section of skb_mpls_pop()net/core/skbuff.c+1 -11 reply
3/3openvswitch: New MPLS actions for layer 2 tunnellinginclude/uapi/linux/openvswitch.h net/openvswitch/actions.c net/openvswitch/flow_netlink.c+89 -61 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPravin B Shelar
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH net-next v5 0/3] New openvswitch MPLS actions for layer 2 tunnelling

From: Martin Varghese <[email protected]>

The existing PUSH MPLS action inserts 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 (l2 tunnelling) requirements. In L2 VPN the MPLS header should encapsulate the ethernet packet.

The new mpls action ADD_MPLS inserts MPLS header at the start of the packet or at the start of the l3 header depending on the value of l3 tunnel flag in the ADD_MPLS arguments.

POP_MPLS action is extended to support ethertype 0x6558

OVS userspace changes -
---------------------
Encap & Decap ovs actions are extended to support MPLS packet type. The encap & decap adds and removes MPLS header at the start of packet as depicted below.

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

Incoming packet -> | ETH | IP | Payload |

1 Actions - encap(mpls(ether_type=0x8847)) [Kernel action - add_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 - pop_mpls:0x6558]

        Outgoing packet -> | ETH  | IP | Payload

Martin Varghese (3):
net: skb_mpls_push() modified to allow MPLS header push at start of
packet.
net: Rephrased comments section of skb_mpls_pop()
openvswitch: New MPLS actions for layer 2 tunnelling

 include/uapi/linux/openvswitch.h | 31 +++++++++++++++++++++++++++++++
 net/core/skbuff.c                | 10 +++++++---
 net/openvswitch/actions.c        | 30 ++++++++++++++++++++++++------
 net/openvswitch/flow_netlink.c   | 34 ++++++++++++++++++++++++++++++++++
 4 files changed, 96 insertions(+), 9 deletions(-)
Signature · 1 line
1.8.3.1