[ovs-dev] Rules regression from 2.7.11 to 2.12.1

Matthias May matthias.may at neratec.com
Mon Jan 20 08:36:17 UTC 2020


Hi
We recently updated from 2.7.11 (well 2.7.10 + patches from branch) to 2.12.1 (again, 2.12.0 + patches from branch).
Almost everything seems to work except one rule.

On 2.7.x we had the following rule which is working.
priority=200,pkt_mark=0x80000000/0x80000000 actions=move:NXM_NX_PKT_MARK[0..2]->NXM_OF_VLAN_TCI[13..15],NORMAL

The network driver we are using sets the highest skb-mark bit and some priority in the lowest 3 bits.
We need to move this priority in the skb-mark to the vlan priority.

The resulting dp entry look like this for a frame with priority 5):
recirc_id(0),in_port(7),skb_mark(0x80000005/0x80000007),eth(src=00:14:5a:02:10:1a,dst=ca:de:af:f1:37:9c),eth_type(0x0800),ipv4(frag=no),
packets:1768, bytes:173264, used:0.998s, actions:push_vlan(vid=211,pcp=5),3


Since the update to 2.12.x the resulting dp entry looks like this:
recirc_id(0),in_port(7),skb_mark(0x80000005/0x80000007),eth(src=00:14:5a:02:10:1a,dst=12:91:d5:1e:dd:77),eth_type(0x0800),ipv4(frag=no),
packets:19, bytes:1862, used:0.494s, actions:push_vlan(vid=211,pcp=0),3
--> The vlan priority is no longer being set.


While debugging I tested the following rules:
ovs-ofctl add-flow br0 "table=0 priority=300,pkt_mark=0x80000000/0x80000000 actions=resubmit(,4),resubmit(,5),NORMAL"
ovs-ofctl add-flow br0 "table=4 priority=10,actions=move:NXM_NX_PKT_MARK[0..2]->NXM_NX_REG4[0..2]"
ovs-ofctl add-flow br0 "table=5 priority=10,reg4=0,actions=mod_vlan_pcp(0)"
ovs-ofctl add-flow br0 "table=5 priority=11,reg4=1,actions=mod_vlan_pcp(1)"
ovs-ofctl add-flow br0 "table=5 priority=12,reg4=2,actions=mod_vlan_pcp(2)"
ovs-ofctl add-flow br0 "table=5 priority=13,reg4=3,actions=mod_vlan_pcp(3)"
ovs-ofctl add-flow br0 "table=5 priority=14,reg4=4,actions=mod_vlan_pcp(4)"
ovs-ofctl add-flow br0 "table=5 priority=15,reg4=5,actions=mod_vlan_pcp(5)"
ovs-ofctl add-flow br0 "table=5 priority=16,reg4=6,actions=mod_vlan_pcp(6)"
ovs-ofctl add-flow br0 "table=5 priority=17,reg4=7,actions=mod_vlan_pcp(7)"

With these rules in place, I get back the original behaviour.


Before i start digging/bisecting.
Is the action move:NXM_NX_PKT_MARK[0..2]->NXM_OF_VLAN_TCI[13..15] even expected to work?
Or was i abusing a bug in 2.7.x and this was never supposed to be used?

Thank you for any responses.

BR
Matthias


More information about the dev mailing list