diff options
author | Nogah Frankel | 2017-09-20 16:15:06 +0200 |
---|---|---|
committer | David S. Miller | 2017-09-21 03:03:12 +0200 |
commit | 73b433e803d2a3547ee38d1fb2a0bc6f3b03a6d9 (patch) | |
tree | 6d8c5b67750ab6867b7f2a2b74f25845a9ff2cd6 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h | |
parent | mlxsw: spectrum_switchdev: Break smid write function (diff) | |
download | kernel-qcow2-linux-73b433e803d2a3547ee38d1fb2a0bc6f3b03a6d9.tar.gz kernel-qcow2-linux-73b433e803d2a3547ee38d1fb2a0bc6f3b03a6d9.tar.xz kernel-qcow2-linux-73b433e803d2a3547ee38d1fb2a0bc6f3b03a6d9.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h index 6fd0afe4b7a3..e907ec446a73 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h @@ -94,6 +94,7 @@ struct mlxsw_sp_mid { unsigned char addr[ETH_ALEN]; u16 fid; u16 mid; + bool in_hw; unsigned long *ports_in_mid; /* bits array */ }; |