• Petr Machata's avatar
    selftests: forwarding: mirror_gre_lib: Extract generic functions · d5ea2bfc
    Petr Machata authored
    For non-GRE mirroring tests, a functions along the lines of
    do_test_span_gre_dir_ips() and test_span_gre_dir_ips() are necessary,
    but such that they don't assume tunnels are involved. Extract the code
    from mirror_gre_lib.sh to mirror_lib.sh and convert to just use a given
    device without assuming it's named "h3-$tundev". Convert the two
    above-mentioned functions to wrappers that pass along the correct device
    name.
    
    Add test_span_dir() and fail_test_span_dir() to round up the API for use
    by following patches.
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d5ea2bfc
mirror_lib.sh 1.88 KB