]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_qdisc: Track permissible actions per binding
authorPetr Machata <petrm@nvidia.com>
Sun, 10 Oct 2021 11:40:15 +0000 (14:40 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Oct 2021 10:19:35 +0000 (11:19 +0100)
commite197d836aac6f9a58371b8cedd3908fb77eb8ed6
treeb5001ac040d29a2a6fe0a010255883bafa733752
parente2893990db1204bf26cda05313d151e5c684dc10
mlxsw: spectrum_qdisc: Track permissible actions per binding

One block can be bound to several qevents. The qevent type that the block
is bound to determines which actions make sense in a given context. In the
particular case of mlxsw, trap cannot be offloaded on a RED mark qevent,
because the trap contract specifies that the packet is dropped in the HW
datapath, and the HW trigger that the action is offloaded to is always
forwarding the packet (in addition to marking in).

Therefore keep track of which actions are permissible at each binding
block. When an attempt is made to bind a certain action at a binding point
where it is not supported, bounce the request.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c