netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Pfaff <blp@nicira.com>
To: Simon Horman <horms@verge.net.au>
Cc: dev@openvswitch.org, netdev@vger.kernel.org,
	Jesse Gross <jesse@nicira.com>,
	Pravin B Shelar <pshelar@nicira.com>, Ravi K <rkerur@gmail.com>,
	Isaku Yamahata <yamahata@valinux.co.jp>,
	Joe Stringer <joe@wand.net.nz>
Subject: Re: [PATCH v2.44 1/5] odp: Allow VLAN actions after MPLS actions
Date: Mon, 21 Oct 2013 13:41:02 -0700	[thread overview]
Message-ID: <20131021204102.GD15986@nicira.com> (raw)
In-Reply-To: <1381972511-27221-2-git-send-email-horms@verge.net.au>

On Thu, Oct 17, 2013 at 10:15:07AM +0900, Simon Horman wrote:
> From: Joe Stringer <joe@wand.net.nz>
> 
> OpenFlow 1.1 and 1.2, and 1.3 differ in their handling of MPLS actions in the
> presence of VLAN tags. To allow correct behaviour to be committed in
> each situation, this patch adds a second round of VLAN tag action
> handling to commit_odp_actions(), which occurs after MPLS actions. This
> is implemented with a new field in 'struct xlate_in' called 'vlan_tci'.
> 
> When an push_mpls action is composed, the flow's current VLAN state is
> stored into xin->vlan_tci, and flow->vlan_tci is set to 0 (pop_vlan). If
> a VLAN tag is present, it is stripped; if not, then there is no change.
> Any later modifications to the VLAN state is written to xin->vlan_tci.
> When committing the actions, flow->vlan_tci is used before MPLS actions,
> and xin->vlan_tci is used afterwards. This retains the current datapath
> behaviour, but allows VLAN actions to be applied in a more flexible
> manner.
> 
> Both before and after this patch MPLS LSEs are pushed onto a packet after
> any VLAN tags that may be present. This is the behaviour described in
> OpenFlow 1.1 and 1.2. OpenFlow 1.3 specifies that MPLS LSEs should be
> pushed onto a packet before any VLAN tags that are present. Support
> for this will be added by a subsequent patch that makes use of
> the infrastructure added by this patch.
> 
> Signed-off-by: Joe Stringer <joe@wand.net.nz>
> Signed-off-by: Simon Horman <horms@verge.net.au>

I think that this patch tries to track the VLAN tag inside the MPLS
label and the VLAN tag outside the MPLS label separately.  But it does
it in an odd way, by testing whether those tags have the same value.
I'm not sure that's correct.  If I set a VLAN, push an MPLS label
outside the VLAN, then push the same VLAN outside the MPLS label, does
it behave correctly?  (Is there a test for this behavior in patch 3?
If so then I'm reassured.)

  reply	other threads:[~2013-10-21 20:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17  1:15 [PATCH v2.44 0/5] MPLS actions and matches Simon Horman
2013-10-17  1:15 ` [PATCH v2.44 1/5] odp: Allow VLAN actions after MPLS actions Simon Horman
2013-10-21 20:41   ` Ben Pfaff [this message]
     [not found]     ` <20131021204102.GD15986-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2013-10-22 18:30       ` Joe Stringer
2013-10-22 20:55         ` Ben Pfaff
2013-10-23  6:30           ` Simon Horman
2013-10-17  1:15 ` [PATCH v2.44 2/5] ofp-actions: Add separate OpenFlow 1.3 action parser Simon Horman
2013-10-21 20:19   ` Ben Pfaff
     [not found] ` <1381972511-27221-1-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2013-10-17  1:15   ` [PATCH v2.44 3/5] lib: Support pushing of MPLS LSE before or after VLAN tag Simon Horman
2013-10-17  1:15 ` [PATCH v2.44 4/5] datapath: Break out deacceleration portion of vlan_push Simon Horman
2013-10-17  1:15 ` [PATCH v2.44 5/5] datapath: Add basic MPLS support to kernel Simon Horman

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=20131021204102.GD15986@nicira.com \
    --to=blp@nicira.com \
    --cc=dev@openvswitch.org \
    --cc=horms@verge.net.au \
    --cc=jesse@nicira.com \
    --cc=joe@wand.net.nz \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.com \
    --cc=rkerur@gmail.com \
    --cc=yamahata@valinux.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).