mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
OF 1.1 pop vlan compatibility.
Store the original action code with the strip vlan action, so that it can be printed back properly. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
committed by
Ben Pfaff
parent
c197ef5043
commit
64fcc07313
@@ -539,7 +539,7 @@ ofpact_from_openflow10(const union ofp_action *a, struct ofpbuf *out)
|
||||
break;
|
||||
|
||||
case OFPUTIL_OFPAT10_STRIP_VLAN:
|
||||
ofpact_put_STRIP_VLAN(out);
|
||||
ofpact_put_STRIP_VLAN(out)->ofpact.compat = code;
|
||||
break;
|
||||
|
||||
case OFPUTIL_OFPAT10_SET_DL_SRC:
|
||||
@@ -828,7 +828,7 @@ ofpact_from_openflow11(const union ofp_action *a, struct ofpbuf *out)
|
||||
break;
|
||||
|
||||
case OFPUTIL_OFPAT11_POP_VLAN:
|
||||
ofpact_put_STRIP_VLAN(out);
|
||||
ofpact_put_STRIP_VLAN(out)->ofpact.compat = code;
|
||||
break;
|
||||
|
||||
case OFPUTIL_OFPAT11_SET_QUEUE:
|
||||
@@ -2772,7 +2772,8 @@ ofpact_format(const struct ofpact *a, struct ds *s)
|
||||
break;
|
||||
|
||||
case OFPACT_STRIP_VLAN:
|
||||
ds_put_cstr(s, "strip_vlan");
|
||||
ds_put_cstr(s, a->compat == OFPUTIL_OFPAT11_POP_VLAN
|
||||
? "pop_vlan" : "strip_vlan");
|
||||
break;
|
||||
|
||||
case OFPACT_PUSH_VLAN:
|
||||
|
||||
@@ -653,7 +653,7 @@ parse_named_action(enum ofputil_action_code code,
|
||||
|
||||
case OFPUTIL_OFPAT10_STRIP_VLAN:
|
||||
case OFPUTIL_OFPAT11_POP_VLAN:
|
||||
ofpact_put_STRIP_VLAN(ofpacts);
|
||||
ofpact_put_STRIP_VLAN(ofpacts)->ofpact.compat = code;
|
||||
break;
|
||||
|
||||
case OFPUTIL_OFPAT11_PUSH_VLAN:
|
||||
|
||||
@@ -165,7 +165,7 @@ AT_DATA([test-data], [dnl
|
||||
# actions=mod_tp_dst:443
|
||||
000a 0008 01bb 0000
|
||||
|
||||
# actions=strip_vlan
|
||||
# actions=pop_vlan
|
||||
0012 0008 00000000
|
||||
|
||||
# actions=set_queue:2309737729
|
||||
|
||||
@@ -186,7 +186,7 @@ AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
|
||||
chosen protocol: OpenFlow11
|
||||
OFPT_FLOW_MOD (OF1.1): ADD table:255 tcp,tp_src=123 out_port:5 actions=FLOOD
|
||||
OFPT_FLOW_MOD (OF1.1): ADD table:255 in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
|
||||
OFPT_FLOW_MOD (OF1.1): ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
|
||||
OFPT_FLOW_MOD (OF1.1): ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=pop_vlan,output:0
|
||||
OFPT_FLOW_MOD (OF1.1): ADD table:255 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
|
||||
OFPT_FLOW_MOD (OF1.1): ADD table:255 udp,nw_src=192.168.0.3,tp_dst=53 actions=mod_nw_ecn:2,output:1
|
||||
OFPT_FLOW_MOD (OF1.1): ADD table:255 priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
|
||||
@@ -223,7 +223,7 @@ AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
|
||||
chosen protocol: OXM-OpenFlow12
|
||||
OFPT_FLOW_MOD (OF1.2): ADD table:255 tcp,tp_src=123 actions=FLOOD
|
||||
OFPT_FLOW_MOD (OF1.2): ADD table:255 in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
|
||||
OFPT_FLOW_MOD (OF1.2): ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
|
||||
OFPT_FLOW_MOD (OF1.2): ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=pop_vlan,output:0
|
||||
OFPT_FLOW_MOD (OF1.2): ADD table:255 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
|
||||
OFPT_FLOW_MOD (OF1.2): ADD table:255 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
|
||||
OFPT_FLOW_MOD (OF1.2): ADD table:255 priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
|
||||
|
||||
Reference in New Issue
Block a user