]> git.proxmox.com Git - mirror_iproute2.git/commit - tc/f_flower.c
tc: flower: Add support for QinQ
authorJianbo Liu <jianbol@mellanox.com>
Sat, 30 Jun 2018 10:01:33 +0000 (10:01 +0000)
committerDavid Ahern <dsahern@gmail.com>
Sun, 15 Jul 2018 20:03:50 +0000 (13:03 -0700)
commit1f0a5dfd388cd5c25f6a24247667e04b2346e568
tree9ccf0452847c0a34f94089f5950c75a266b4d4ef
parent3eebc1d4f4b9e49857ae4d3cfbdb68f3990abeb5
tc: flower: Add support for QinQ

To support matching on both outer and inner vlan headers,
we add new cvlan_id/cvlan_prio/cvlan_ethtype for inner vlan header.

Example:
# tc filter add dev eth0 protocol 802.1ad parent ffff: \
    flower vlan_id 1000 vlan_ethtype 802.1q \
        cvlan_id 100 cvlan_ethtype ipv4 \
    action vlan pop \
    action vlan pop \
    action mirred egress redirect dev eth1

# tc filter show dev eth0 ingress
filter protocol 802.1ad pref 1 flower chain 0
filter protocol 802.1ad pref 1 flower chain 0 handle 0x1
  vlan_id 1000
  vlan_ethtype 802.1Q
  cvlan_id 100
  cvlan_ethtype ip
  eth_type ipv4
  in_hw

Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
man/man8/tc-flower.8
tc/f_flower.c