[ovs-dev] [PATCH 2/2] ofp-actions: Use OF1.2 consistency checking rules for OF1.3 too.
Jarno Rajahalme
jrajahalme at nicira.com
Fri Nov 15 23:50:06 UTC 2013
I don’t see how this patch is related to 1.3+ tag ordering. However, it seems correct to restrict the usable_protocols to OF1.0 when setting a VID or PCP when there is no VLAN header, as OF1.0 is the only version for which this is not inconsistent.
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>
On Nov 15, 2013, at 2:33 PM, Ben Pfaff <blp at nicira.com> wrote:
> Currently Open vSwitch does not implement OpenFlow1.3+ tag ordering
> so it makes sense to enforce consistency checking in the way that OVS does
> actually implement tag ordering.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> lib/ofp-actions.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
> index e07ea1d..bd2fd2e 100644
> --- a/lib/ofp-actions.c
> +++ b/lib/ofp-actions.c
> @@ -1920,8 +1920,7 @@ ofpact_check__(enum ofputil_protocol *usable_protocols, struct ofpact *a,
> * OpenFlow 1.1+ if need be. */
> ofpact_get_SET_VLAN_VID(a)->flow_has_vlan =
> (flow->vlan_tci & htons(VLAN_CFI)) == htons(VLAN_CFI);
> - if (!(flow->vlan_tci & htons(VLAN_CFI)) &&
> - !ofpact_get_SET_VLAN_VID(a)->push_vlan_if_needed) {
> + if (!(flow->vlan_tci & htons(VLAN_CFI))) {
> inconsistent_match(usable_protocols);
> }
> /* Temporary mark that we have a vlan tag. */
> @@ -1933,8 +1932,7 @@ ofpact_check__(enum ofputil_protocol *usable_protocols, struct ofpact *a,
> * OpenFlow 1.1+ if need be. */
> ofpact_get_SET_VLAN_PCP(a)->flow_has_vlan =
> (flow->vlan_tci & htons(VLAN_CFI)) == htons(VLAN_CFI);
> - if (!(flow->vlan_tci & htons(VLAN_CFI)) &&
> - !ofpact_get_SET_VLAN_PCP(a)->push_vlan_if_needed) {
> + if (!(flow->vlan_tci & htons(VLAN_CFI))) {
> inconsistent_match(usable_protocols);
> }
> /* Temporary mark that we have a vlan tag. */
> --
> 1.7.10.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list