]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
mlxsw: spectrum_switchdev: Attach mid id allocation to HW write
authorNogah Frankel <nogahf@mellanox.com>
Wed, 20 Sep 2017 14:15:06 +0000 (16:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 01:03:12 +0000 (18:03 -0700)
commit73b433e803d2a3547ee38d1fb2a0bc6f3b03a6d9
tree6d8c5b67750ab6867b7f2a2b74f25845a9ff2cd6
parent5f9abc597cdd7a63433b7ebfcf26ee2746a76638
mlxsw: spectrum_switchdev: Attach mid id allocation to HW write

Attach mid getting and releasing mid id to the HW write / remove, and add
a flag to indicate whether the mid is in the HW. It is done because mid id
is also HW index to this mid.
This change allows adding in the following patches the ability to have a
mid in the mdb cache but not in the HW. It will be useful for being able
to disable the multicast.
It means that the mdb is being written / delete to the HW in the mid
allocation / removing function, not after them.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c