On Tue, Nov 05, 2013 at 05:34:34PM +0900, Simon Horman wrote:
> Some different versions of OpenFlow require different consistency
> checking. This patch allows for three different variants to be checked.
>
> 1. OpenFlow1.0
>
> This variant implicitly pushes a VLAN tag if one doesn't exist
> and an action to modify a VLAN tag is encountered.
>
> MPLS push is supported as a Nicira extension whose behaviour is
> the same as OpenFlow1.1 - 1.2.
>
> In practice Open vSwtich allows inconsistent OpenFlow 1.0 actions so
> this portion of the change is just for completeness. I do not believe it
> has any run-time affect. And I would not be opposed to folding this case
> into the handling of OpenFlow1.1 - 1.2 other than that I believe it will
> make the logic in parse_ofp_str__() and ofpact_check__() slightly less
> intuitive in parts.
>
> 2. OpenFlow1.1 - 1.2
>
> This does not have the implicit VLAN tag push behaviour of OpenFlow1.0.
>
> An MPLS push action pushes an MPLS LSE after any VLAN tags that are
> present.
>
> 3. OpenFlow1.3
>
> This does not have the implicit VLAN tag push behaviour of OpenFlow1.0.
>
> An MPLS push action pushes an MPLS LSE before any VLAN tags that are
> present.
>
> ofpact_get_SET_VLAN_VID(a)->push_vlan_if_needed and similar devices
> can't be used in order to effect this logic when ofpact_check__()
> is called via parse_ofp_str() as they are not filled in for
> specific OF versions at that time. Again, for OpenFlow1.0 and
> thus push_vlan_if_needed I believe this is cosmetic. But that is not
> the case for the MPLS portion of this change.
>
> The net effect of this change on run-time is:
>
> * To increase logging under some circumstances as ofpacts_check()
> may now be called up to four times instead of up to twice
> for each invocation of parse_ofp_str__()
>
> * To disallow MPLS push actions on VLAN flows using OpenFlow1.3.
> These did not comply to the OpenFlow1.3 as they would push an MPLS LSE
> after any VLAN tags that were present. A subsequent patch will support
> them in a manner that complies with the OpenFlow1.3.
>
> Signed-off-by: Simon Horman <[email protected]>
>
> ---
>
> This patch is targeted as a pre-requisite for v2.48 of
> the "MPLS actions and matches" series. I am posting it separately
> as I would like some feedback on the approach I have taken and
> I believe it can be reviewed independently of the MPLS series.
This needs a respin:
../ofproto/ofproto-dpif.c:5495:67: error: too few arguments to function
call, expected 8, have 7
u16_to_ofp(ofproto->up.max_ports), 0, 0);
^
../lib/ofp-actions.h:609:1: note: 'ofpacts_check' declared here
enum ofperr ofpacts_check(enum ofp_version ofp_version,
^
1 error generated.
But I don't really understand your second point here:
* To disallow MPLS push actions on VLAN flows using OpenFlow1.3.
These did not comply to the OpenFlow1.3 as they would push an MPLS LSE
after any VLAN tags that were present. A subsequent patch will support
them in a manner that complies with the OpenFlow1.3.
Do you mean that OF1.3 forbids push_mpls when a VLAN header is
present? If this is new to me. Maybe you mean something else.
Either way, can you explain further?
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev