diff options
author | Amit Cohen <amcohen@nvidia.com> | 2022-06-27 10:06:18 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-06-28 15:31:36 +0300 |
commit | a3a7992bc4e42633c34ab6a7623fd502e76146ed (patch) | |
tree | acf9af395ac020947c4c9c2c42f7dbc56784340a /drivers/net/ethernet/mellanox/mlxsw/spectrum.h | |
parent | d7a7b69787091b7ed78399dc40e8c6c9759b9b90 (diff) | |
download | linux-a3a7992bc4e42633c34ab6a7623fd502e76146ed.tar.xz |
mlxsw: Extend PGT APIs to support maintaining list of ports per entry
Add an API to associate a PGT entry with SMPE index and add or remove a
port. This API will be used by FID code and MDB code, to add/remove port
from specific PGT entry.
When the first port is added to PGT entry, allocate the entry in the given
MID index, when the last port is removed from PGT entry, free it.
Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h index 645244ac5dfc..b128692611d9 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h @@ -1483,6 +1483,8 @@ int mlxsw_sp_pgt_mid_alloc_range(struct mlxsw_sp *mlxsw_sp, u16 mid_base, u16 count); void mlxsw_sp_pgt_mid_free_range(struct mlxsw_sp *mlxsw_sp, u16 mid_base, u16 count); +int mlxsw_sp_pgt_entry_port_set(struct mlxsw_sp *mlxsw_sp, u16 mid, + u16 smpe, u16 local_port, bool member); int mlxsw_sp_pgt_init(struct mlxsw_sp *mlxsw_sp); void mlxsw_sp_pgt_fini(struct mlxsw_sp *mlxsw_sp); |