• Amit Cohen's avatar
    selftests: mlxsw: Add QOS test for maximum use of descriptors · 5ab0cf14
    Amit Cohen authored
    Add an equivalent test to qos_burst, the test's purpose is same, but the
    new test uses simpler topology and does not require forcing low speed.
    In addition, it can be run Spectrum-2 and not only Spectrum-3+. The idea
    is to use a shaper in order to limit the traffic and create congestion.
    
    qos_burst test uses small pool, sends many small packets, and verify that
    packets are not dropped, which means that many descriptors can be handled.
    This test should check the change that commit c864769a
    ("mlxsw: Configure descriptor buffers") pushed.
    
    Instead, the new test tries to use more than 85% of maximum supported
    descriptors. The idea is to use big pool (as much as the ASIC supports),
    such that the pool size does not limit the traffic, then send many small
    packets, which means that many descriptors are used, and check how many
    packets the switch can handle.
    
    The usage of shaper allows to run the test in all ASICs, regardless of
    the CPU abilities, as it is able to create the congestion with low rate
    of packets.
    Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    5ab0cf14
mlxsw_lib.sh 1.43 KB