]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_flower: Fail in case user specifies multiple mirror actions
authorDanielle Ratson <danieller@mellanox.com>
Thu, 26 Sep 2019 11:43:40 +0000 (14:43 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Sep 2019 18:33:19 +0000 (20:33 +0200)
commite8214005a170534ad0d9791a7d81fc95dc50c0a0
tree659187395bef3c1b7b049e533e426d0a34ee6597
parent5ef4b0ba3e8b509f1b15c1e8d118ce8306c16f83
mlxsw: spectrum_flower: Fail in case user specifies multiple mirror actions

The ASIC can only mirror a packet to one port, but when user is trying
to set more than one mirror action, it doesn't fail.

Add a check if more than one mirror action was specified per rule and if so,
fail for not being supported.

Fixes: 6746a9309031c ("mlxsw: spectrum_acl: Add support for mirror action")
Signed-off-by: Danielle Ratson <danieller@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c