On Thu, Oct 24, 2013 at 01:19:25PM -0700, Jarno Rajahalme wrote: > OpenFlow 1.1 set vlan actions only modify existing vlan > headers, while OF 1.0 actions push a new vlan header if one > does not exist already. > > Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com>
Applied. I folded in a couple of minor improvements: diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index c7322f6..ca26038 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -1554,7 +1554,10 @@ exit: return error; } -/* May modify flow->dl_type and flow->vlan_tci, caller must restore them. */ +/* May modify flow->dl_type and flow->vlan_tci, caller must restore them. + * + * Modifies some actions, filling in fields that could not be properly set + * without context. */ static enum ofperr ofpact_check__(struct ofpact *a, struct flow *flow, ofp_port_t max_ports, uint8_t table_id, bool enforce_consistency) @@ -2754,17 +2757,17 @@ ofpact_format(const struct ofpact *a, struct ds *s) case OFPACT_SET_VLAN_VID: ds_put_format(s, "%s:%"PRIu16, - ofpact_get_SET_VLAN_VID(a)->ofpact.compat - == OFPUTIL_OFPAT11_SET_VLAN_VID ? - "set_vlan_vid" : "mod_vlan_vid", + (a->compat == OFPUTIL_OFPAT11_SET_VLAN_VID + ? "set_vlan_vid" + : "mod_vlan_vid"), ofpact_get_SET_VLAN_VID(a)->vlan_vid); break; case OFPACT_SET_VLAN_PCP: ds_put_format(s, "%s:%"PRIu8, - ofpact_get_SET_VLAN_PCP(a)->ofpact.compat - == OFPUTIL_OFPAT11_SET_VLAN_PCP ? - "set_vlan_pcp" : "mod_vlan_pcp", + (a->compat == OFPUTIL_OFPAT11_SET_VLAN_PCP + ? "set_vlan_pcp" + : "mod_vlan_pcp"), ofpact_get_SET_VLAN_PCP(a)->vlan_pcp); break; _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev