]> 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)
commit3442077dbef6c88f7daf2ee94e457c9916f217f3
treeacf9af395ac020947c4c9c2c42f7dbc56784340a
parent20c11a3aa449eb36ab86a871f105439f70bcd78a
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