public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Martin Varghese <martinvarghesenokia@gmail•com>
To: netdev@vger•kernel.org, pshelar@ovn•org, davem@davemloft•net,
	scott.drennan@nokia•com, jbenc@redhat•com,
	martin.varghese@nokia•com
Subject: [PATCH net-next 0/3] New openvswitch MPLS actions for layer 2 tunnelling
Date: Tue, 10 Dec 2019 13:45:28 +0530	[thread overview]
Message-ID: <cover.1575964218.git.martin.varghese@nokia.com> (raw)

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

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

The new mpls actions PTAP_PUSH_MPLS & PTAP_POP_MPLS inserts and removes
MPLS header from start of the packet respectively.

PTAP_PUSH_MPLS - Inserts MPLS header at the start of the packet.
@ethertype - Ethertype of MPLS header. 0x8847 for unicast,0x8848 for multicast.

PTAP_POP_MPLS - Removes MPLS header from the start of the packet.
@ethertype - Ethertype of next header following the popped MPLS header.
             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]

        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

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 |  2 ++
 net/core/skbuff.c                |  9 ++++++---
 net/openvswitch/actions.c        | 40 ++++++++++++++++++++++++++++++++++++++++
 net/openvswitch/flow_netlink.c   | 21 +++++++++++++++++++++
 4 files changed, 69 insertions(+), 3 deletions(-)

-- 
1.8.3.1


             reply	other threads:[~2019-12-10  8:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10  8:15 Martin Varghese [this message]
2019-12-10  8:15 ` [PATCH net-next 1/3] net: skb_mpls_push() modified to allow MPLS header push at start of packet Martin Varghese
2019-12-11  1:43   ` David Miller
2019-12-11  3:06     ` Varghese, Martin (Nokia - IN/Bangalore)
2019-12-10  8:16 ` [PATCH net-next 2/3] net: Rephrased comments section of skb_mpls_pop() Martin Varghese
2019-12-10  8:16 ` [PATCH net-next 3/3] openvswitch: New MPLS actions for layer 2 tunnelling Martin Varghese
2019-12-10 15:11   ` Jiri Benc
2019-12-10 23:51     ` Martin Varghese
2019-12-10 21:22   ` Pravin Shelar
2019-12-11  0:02     ` Martin Varghese
2019-12-11  6:15       ` Pravin Shelar
2019-12-11 15:39         ` Martin Varghese
2019-12-12  4:19           ` Pravin Shelar
2019-12-12 16:02             ` Martin Varghese
2019-12-13  3:15               ` Pravin Shelar
2019-12-13  3:53                 ` Martin Varghese
2019-12-13  7:57                   ` Pravin Shelar
2019-12-11  6:15   ` Pravin Shelar
2019-12-11 15:42     ` Martin Varghese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1575964218.git.martin.varghese@nokia.com \
    --to=martinvarghesenokia@gmail$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=jbenc@redhat$(echo .)com \
    --cc=martin.varghese@nokia$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pshelar@ovn$(echo .)org \
    --cc=scott.drennan@nokia$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox