]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc6f5a33c856ffd12c9d7051942ba37ce920e347e
treee6e2672ae64867c8aa09412533a9b352f9006f75
parentd72e29fa35899fec88e6cfd632571eb34d45a666
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