mlxsw: spectrum_span: Use new analyzed ports list during speed / MTU change
authorIdo Schimmel <idosch@mellanox.com>
Thu, 30 Apr 2020 17:01:15 +0000 (20:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Apr 2020 20:02:32 +0000 (13:02 -0700)
commit835d6b8c1a35eafba3faaf4b809f6d84517467f1
treee6e2672ae64867c8aa09412533a9b352f9006f75
parent7240db69c332f6625da044b048d06839ab0c2649
mlxsw: spectrum_span: Use new analyzed ports list during speed / MTU change

As previously explained, each port whose outgoing traffic is analyzed
needs to have an egress mirror buffer.

The size of the egress mirror buffer is calculated based on various
parameters, two of which are the speed and the MTU of the port.

Therefore, when the MTU or the speed of a port change, the SPAN code is
called to see if the egress mirror buffer of the port needs to be
adjusted.

Currently, this is done by traversing all the SPAN agents and for each
SPAN agent the list of bound ports is traversed.

Instead of the above, traverse the recently added list of analyzed
ports.

This will later allow us to remove the old SPAN API.

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