mlxsw: Extend PGT APIs to support maintaining list of ports per entry
authorAmit Cohen <amcohen@nvidia.com>
Mon, 27 Jun 2022 07:06:18 +0000 (10:06 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jun 2022 12:31:36 +0000 (14:31 +0200)
commita3a7992bc4e42633c34ab6a7623fd502e76146ed
treeacf9af395ac020947c4c9c2c42f7dbc56784340a
parentd7a7b69787091b7ed78399dc40e8c6c9759b9b90
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>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_pgt.c