net/mlx5: add VLAN item and actions to switch flow rules
This enables flow rules to explicitly match VLAN traffic (VLAN pattern
item) and perform various operations on VLAN headers at the switch level
(OF_POP_VLAN, OF_PUSH_VLAN, OF_SET_VLAN_VID and OF_SET_VLAN_PCP actions).
Testpmd examples:
- Directing all VLAN traffic received on port ID 1 to port ID 0:
flow create 1 ingress transfer pattern eth / vlan / end actions
port_id id 0 / end
- Adding a VLAN header to IPv6 traffic received on port ID 1 and directing
it to port ID 0:
flow create 1 ingress transfer pattern eth / ipv6 / end actions
of_push_vlan ethertype 0x8100 / of_set_vlan_vid vlan_vid 42 /
port_id id 0 / end
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>