mlxsw: spectrum_span: Do no expose mirroring agents to entire driver
authorIdo Schimmel <idosch@mellanox.com>
Thu, 20 Feb 2020 07:07:48 +0000 (09:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Feb 2020 18:04:33 +0000 (10:04 -0800)
commit9a9f8d1e749a5c4df167bc964277c75b952e32b5
treec008297d72224b6e5e8e452fdad017456401c2bb
parent6c5a688e7544ff1355bd89097f93ec6013bf6492
mlxsw: spectrum_span: Do no expose mirroring agents to entire driver

The struct holding the different mirroring agents is currently allocated
as part of the main driver struct. This is unlike other driver modules.

Allocate the memory required to store the different mirroring agents as
part of the initialization of the mirroring module.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c