]> 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)
commit3eb745456760698bc521d6de2e28bcc91c272eb0
treee6e2672ae64867c8aa09412533a9b352f9006f75
parentfdc757fdea26bf7e6c4e8e4d04074fb0a3781574
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