netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] New openvswitch MPLS actions for layer 2 tunnelling
@ 2019-12-12 14:33 Martin Varghese
  2019-12-12 14:34 ` [PATCH net-next v2 1/3] net: skb_mpls_push() modified to allow MPLS header push at start of packet Martin Varghese
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Martin Varghese @ 2019-12-12 14:33 UTC (permalink / raw)
  To: netdev, davem, pshelar, scott.drennan, jbenc, martin.varghese

From: Martin Varghese <martin.varghese@nokia.com>

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 PTAP_PUSH_MPLS inserts MPLS header at specified offset
from the start of packet.

A special handling is added for ethertype 0 in the existing POP MPLS action.
Value 0 in ethertype indicates the tunnelled packet is ethernet.

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 - ptap_push_mpls:0x8847, mac_len:0]

        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:0]

        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 | 21 ++++++++++++++++++++-
 net/core/skbuff.c                | 10 +++++++---
 net/openvswitch/actions.c        | 26 ++++++++++++++++++++------
 net/openvswitch/flow_netlink.c   | 15 +++++++++++++++
 4 files changed, 62 insertions(+), 10 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-13  3:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-12 14:33 [PATCH net-next v2 0/3] New openvswitch MPLS actions for layer 2 tunnelling Martin Varghese
2019-12-12 14:34 ` [PATCH net-next v2 1/3] net: skb_mpls_push() modified to allow MPLS header push at start of packet Martin Varghese
2019-12-12 14:34 ` [PATCH net-next v2 2/3] net: Rephrased comments section of skb_mpls_pop() Martin Varghese
2019-12-12 14:35 ` [PATCH net-next v2 3/3] openvswitch: New MPLS actions for layer 2 tunnelling Martin Varghese
2019-12-13  3:16   ` Pravin Shelar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).