From: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
To: Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
Cc: "dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org"
<dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org>,
netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Ravi K <rkerur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v2.58] datapath: Add basic MPLS support to kernel
Date: Tue, 3 Jun 2014 15:40:27 -0700 [thread overview]
Message-ID: <CAEP_g=9mMSwReBQjrm835dSCvLJQW2rgaLUts02YC+7uidTHkw@mail.gmail.com> (raw)
In-Reply-To: <20140603040406.GA22191-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
On Mon, Jun 2, 2014 at 9:04 PM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
> Hi Jesse,
>
> thanks for your feedback.
>
> On Mon, Jun 02, 2014 at 05:58:10PM -0700, Jesse Gross wrote:
>> On Sun, May 25, 2014 at 5:22 PM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
>> > diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
>> > index 803a94c..8ce596c 100644
>> > --- a/datapath/flow_netlink.c
>> > +++ b/datapath/flow_netlink.c
>> > + case OVS_ACTION_ATTR_POP_MPLS:
>> > + if (!eth_p_mpls(eth_type))
>> > + return -EINVAL;
>>
>> Should this also take into account the VLAN tag? It's really part of
>> the EtherType although it has been stripped out here. Actually, maybe
>> it's better to not track the vlan_tci separately at all during
>> validation but just fold it into the EtherType.
>>
>> The practical implication of this is that you wouldn't be able to pop
>> out from underneath a VLAN. This may be a good thing if we are trying
>> to avoid tag order issues - after all, you can't push underneath a
>> VLAN either. I'm not sure what effects this has on the need to track
>> mac_len, if any.
>
> My thinking is that the ordering problem only surfaces in relation
> to push MPLS actions where should it go in relation to VLAN tags.
> For pop actions it seems to me that the outermost tag should be removed
> regardless of its position in relation to other tags.
>
> So I think that the code above is safe. Though now you mention
> it I do notice that it only allows pop MPLS if there is at most
> one VLAN tag present.
>
> That said, I would not mind particularly disabling pop MPLS in the
> presence of VLAN tags. At the very least it is related to the
> painful issue of tag ordering.
I agree that it is safe but my thought was the it avoids a number of
potential corner cases such as:
* Difference between push and pop underneath vlan tags.
* Pop with multiple vlan tags
* Differences with varying EtherTypes used for vlans
> I explored your idea of tracking only eth_type rather than both
> it and vlan_tci. I did this by adding the following logic to
> ovs_nla_copy_actions().
>
> if (key->eth.tci & htons(VLAN_TAG_PRESENT))
> eth_type = htons(ETH_P_8021Q);
> else
> eth_type = key->eth.type;
>
> I then updated the usage of eth_type in ovs_nla_copy_actions__() accordingly.
> One problem that I have run into is what to do about pop VLAN.
>
> I don't believe its possible to know what the new eth type is.
> This makes subsequent checks of the eth type for validate_set()
> a little awkward. And seems to indicate that an extra parameter would
> be needed.
>
> For this reason I am inclined to leave the eth_type and vlan_tci
> parameters in place. In this case there is no problem with pop VLAN
> as the ether type inside the VLAN tag should be the value of eth_type.
Can't we populate eth_type with the EtherType from the flow key in
pop_vlan? This doesn't provide us with the ability to look arbitrarily
deep into the packet but it should at least retain the functionality
that we have today.
>> Otherwise, I'm happy with this. I think that we need to conclude the
>> discussion on the other patch and update this appropriately first.
>
> Yes, lets get that sorted out.
>
> Assuming the other patch is accepted do you want me to increase the
> coverage of the compatibility code (in this patch) up to whichever version
> of the kernel the other patch is included in? It seems logical to me but I
> do not have strong feelings about it.
Yes, I think that probably makes sense.
next prev parent reply other threads:[~2014-06-03 22:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 0:22 [PATCH v2.58] datapath: Add basic MPLS support to kernel Simon Horman
2014-06-03 0:58 ` Jesse Gross
2014-06-03 4:04 ` Simon Horman
[not found] ` <20140603040406.GA22191-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2014-06-03 22:40 ` Jesse Gross [this message]
2014-06-04 1:01 ` Simon Horman
[not found] ` <20140604010115.GC22191-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2014-06-04 23:15 ` Jesse Gross
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='CAEP_g=9mMSwReBQjrm835dSCvLJQW2rgaLUts02YC+7uidTHkw@mail.gmail.com' \
--to=jesse-l0m0p4e3n4lqt0dzr+alfa@public.gmane.org \
--cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
--cc=horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rkerur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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).