]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_flower: Make vlan_id limitation more specific
authorAmit Cohen <amcohen@nvidia.com>
Tue, 21 Dec 2021 14:49:42 +0000 (16:49 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 23 Dec 2021 01:14:32 +0000 (17:14 -0800)
commit00a7e9698fa51417955824249a1cd4ded8edd82f
tree6866ad2ba2c50c93b33de3e85e9e1dcc27a7676c
parente1e1c50af5a59da39e1e3ee4dd6e631304c67e9c
mlxsw: spectrum_flower: Make vlan_id limitation more specific

Spectrum ASICs do not support matching of VLAN ID at egress.
Currently, mlxsw driver forbids matching of all VLAN related fields at
egress, which is too strict check.

For example, the following filter is not supported by the driver:
$ tc filter add dev swpX egress protocol 802.1q pref 1 handle 101 flower
vlan_ethtype ipv4 src_ip .. dst_ip .. skip_sw action pass
Error: mlxsw_spectrum: vlan_id key is not supported on egress.
We have an error talking to the kernel

The filter above does not match on VLAN ID, but is bounced anyway.

Make the check more specific, forbid only matching of 'vlan_id' at egress.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c