]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8411cc67af463c098d2e50b61b5fd284c998d188
treeacf9af395ac020947c4c9c2c42f7dbc56784340a
parent35bb268cbd7d44dec2524bc84ebf97d7eb1bf3d4
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