]> git.proxmox.com Git - mirror_ovs.git/commit - lib/tc.c
lib/tc: treat vlan id and prio as independent fields
authorPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Mon, 10 Sep 2018 10:08:25 +0000 (11:08 +0100)
committerSimon Horman <simon.horman@netronome.com>
Wed, 12 Sep 2018 12:30:24 +0000 (14:30 +0200)
commit7f02f26c2e2dd9a904179e22dd158d07a0f7aa09
tree030063b29ed1a2a7b9087d81f4dc04a2442eac53
parentaf8ba764510fb86babd2d5b3a7dd422e0a6d93bf
lib/tc: treat vlan id and prio as independent fields

Previously the key was used to check the presence of vlan id and
prio fields instead of using the mask. Additionally the vlan id
field was considered to be present if only the prio field was set,
and vice versa. f.e. setting the following:

ovs-ofctl -OOpenFlow13,OpenFlow15 add-flow br0 \
priority=10,cookie=1,table=0,ip,dl_vlan_pcp=2,actions=output:2

Resulted in (instead of wildcarding vlan_id, filter matches 0):
filter protocol 802.1Q pref 1 flower chain 0
filter protocol 802.1Q pref 1 flower chain 0 handle 0x1
 vlan_id 0
 vlan_prio 2
 vlan_ethtype ip
 eth_type ipv4
 ip_flags nofrag
 in_hw
       action order 1: mirred (Egress Redirect to device eth1) stolen
       index 2 ref 1 bind 1 installed 5 sec used 5 sec
       Action statistics:
       Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
       backlog 0b 0p requeues 0
       cookie 47040ae7a94fff6afd7ed8aa04b11ba4

Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
lib/netdev-tc-offloads.c
lib/tc.c