OSDN Git Service

mlxsw: spectrum_qdisc: Guard all qdisc accesses with a lock
authorPetr Machata <petrm@nvidia.com>
Tue, 20 Apr 2021 14:53:45 +0000 (16:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Apr 2021 23:43:13 +0000 (16:43 -0700)
commitcff99e204553c500459712b523d06002a7aae18e
tree69af6d75a59ae5d96e0fb968ec43cf70019567b8
parent51d52ed955509d34d1a57c50efdce1300047f865
mlxsw: spectrum_qdisc: Guard all qdisc accesses with a lock

The FIFO handler currently guards accesses to the future FIFO tracking by
asserting RTNL. In the future, the changes to the qdisc state will be more
thorough, so other qdiscs will need this guarding is as well. In order
to not further the RTNL infestation, instead convert to a custom lock that
will guard accesses to the qdisc state.

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