• Petr Machata's avatar
    selftests: mlxsw: resource_scale: Pass target count to cleanup · 35d5829e
    Petr Machata authored
    The scale tests are verifying behavior of mlxsw when number of instances of
    some resource reaches the ASIC capacity. The number of instances is
    referred to as "target" number.
    
    No scale tests so far needed to know this target number to clean up. E.g.
    the tc_flower simply removes the clsact qdisc that all the tested filters
    are hooked onto, and that takes care of collecting all the filters.
    
    However, for the RIF counter test, which is being added in a future patch,
    VLAN netdevices are created. These are created as part of the test, but of
    course the cleanup needs to undo them again. For that it needs to know how
    many there were. To support this usage, pass the target number to the
    cleanup callback.
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Reviewed-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    35d5829e
resource_scale.sh 1.75 KB