__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# This test uses standard topology for testing gretap. See
# ../../../net/forwarding/mirror_gre_topo_lib.sh for more details.
#
# Test offloading various features of offloading gretap mirrors specific to
# mlxsw.
lib_dir=$(dirname $0)/../../../net/forwarding
NUM_NETIFS=6
source $lib_dir/lib.sh
source $lib_dir/mirror_lib.sh
source $lib_dir/mirror_gre_lib.sh
source $lib_dir/mirror_gre_topo_lib.sh
ALL_TESTS="
test_keyful
test_soft
test_tos_fixed
test_ttl_inherit
"
setup_keyful()
{
tunnel_create gt6-key ip6gretap 2001:db8:3::1 2001:db8:3::2 \
ttl 100 tos inherit allow-localremote \
key 1234
tunnel_create h3-gt6-key ip6gretap 2001:db8:3::2 2001:db8:3::1 \
key 1234
ip link set h3-gt6-key vrf v$h3
matchall_sink_create h3-gt6-key
ip address add dev $swp3 2001:db8:3::1/64
ip address add dev $h3 2001:db8:3::2/64
}
cleanup_keyful()
{
ip address del dev $h3 2001:db8:3::2/64
ip address del dev $swp3 2001:db8:3::1/64
tunnel_destroy h3-gt6-key
tunnel_destroy gt6-key
}
setup_soft()
{
# Set up a topology for testing underlay routes that point at an
# unsupported soft device.
tunnel_create gt6-soft ip6gretap 2001:db8:4::1 2001:db8:4::2 \
ttl 100 tos inherit allow-localremote
tunnel_create h3-gt6-soft ip6gretap 2001:db8:4::2 2001:db8:4::1
ip link set h3-gt6-soft vrf v$h3
matchall_sink_create h3-gt6-soft
ip link add name v1 type veth peer name v2
ip link set dev v1 up
ip address add dev v1 2001:db8:4::1/64
ip link set dev v2 vrf v$h3
ip link set dev v2 up
ip address add dev v2 2001:db8:4::2/64
}
cleanup_soft()
{
ip link del dev v1
tunnel_destroy h3-gt6-soft
tunnel_destroy gt6-soft
}
setup_prepare()
{
h1=${NETIFS[p1]}
swp1=${NETIFS[p2]}
swp2=${NETIFS[p3]}
h2=${NETIFS[p4]}
swp3=${NETIFS[p5]}
h3=${NETIFS[p6]}
vrf_prepare
mirror_gre_topo_create
ip address add dev $swp3 2001:db8:2::1/64
ip address add dev $h3 2001:db8:2::2/64
ip address add dev $swp3 192.0.2.129/28
ip address add dev $h3 192.0.2.130/28
setup_keyful
setup_soft
}
cleanup()
{
pre_cleanup
cleanup_soft
cleanup_keyful
ip address del dev $h3 2001:db8:2::2/64
ip address del dev $swp3 2001:db8:2::1/64
ip address del dev $h3 192.0.2.130/28
ip address del dev $swp3 192.0.2.129/28
mirror_gre_topo_destroy
vrf_cleanup
}
test_span_gre_ttl_inherit()
{
local tundev=$1; shift
local type=$1; shift
local what=$1; shift
RET=0
ip link set dev $tundev type $type ttl inherit
mirror_install $swp1 ingress $tundev "matchall"
fail_test_span_gre_dir $tundev
ip link set dev $tundev type $type ttl 100
quick_test_span_gre_dir $tundev
mirror_uninstall $swp1 ingress
log_test "$what: no offload on TTL of inherit"
}
test_span_gre_tos_fixed()
{
local tundev=$1; shift
local type=$1; shift
local what=$1; shift
RET=0
ip link set dev $tundev type $type tos 0x10
mirror_install $swp1 ingress $tundev "matchall"
fail_test_span_gre_dir $tundev
ip link set dev $tundev type $type tos inherit
quick_test_span_gre_dir $tundev
mirror_uninstall $swp1 ingress
log_test "$what: no offload on a fixed TOS"
}
test_span_failable()
{
local tundev=$1; shift
local what=$1; shift
RET=0
mirror_install $swp1 ingress $tundev "matchall"
fail_test_span_gre_dir $tundev
mirror_uninstall $swp1 ingress
log_test "fail $what"
}
test_keyful()
{
test_span_failable gt6-key "mirror to keyful gretap"
}
test_soft()
{
test_span_failable gt6-soft "mirror to gretap w/ soft underlay"
}
test_tos_fixed()
{
test_span_gre_tos_fixed gt4 gretap "mirror to gretap"
test_span_gre_tos_fixed gt6 ip6gretap "mirror to ip6gretap"
}
test_ttl_inherit()
{
test_span_gre_ttl_inherit gt4 gretap "mirror to gretap"
test_span_gre_ttl_inherit gt6 ip6gretap "mirror to ip6gretap"
}
trap cleanup EXIT
setup_prepare
setup_wait
tests_run
exit $EXIT_STATUS
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| spectrum | Folder | 0755 |
|
|
| spectrum-2 | Folder | 0755 |
|
|
| blackhole_routes.sh | File | 4.96 KB | 0755 |
|
| devlink_linecard.sh | File | 7.5 KB | 0755 |
|
| devlink_trap.sh | File | 1.86 KB | 0755 |
|
| devlink_trap_acl_drops.sh | File | 2.4 KB | 0755 |
|
| devlink_trap_control.sh | File | 18.22 KB | 0755 |
|
| devlink_trap_l2_drops.sh | File | 12.87 KB | 0755 |
|
| devlink_trap_l3_drops.sh | File | 16.38 KB | 0755 |
|
| devlink_trap_l3_exceptions.sh | File | 13.64 KB | 0755 |
|
| devlink_trap_policer.sh | File | 9.75 KB | 0755 |
|
| devlink_trap_tunnel_ipip.sh | File | 5.24 KB | 0755 |
|
| devlink_trap_tunnel_ipip6.sh | File | 5.31 KB | 0755 |
|
| devlink_trap_tunnel_vxlan.sh | File | 8.84 KB | 0755 |
|
| devlink_trap_tunnel_vxlan_ipv6.sh | File | 9.32 KB | 0755 |
|
| egress_vid_classification.sh | File | 6.55 KB | 0755 |
|
| ethtool_lanes.sh | File | 4.02 KB | 0755 |
|
| extack.sh | File | 3.74 KB | 0755 |
|
| fib.sh | File | 5.43 KB | 0755 |
|
| fib_offload.sh | File | 9.93 KB | 0755 |
|
| hw_stats_l3.sh | File | 410 B | 0755 |
|
| ingress_rif_conf_1d.sh | File | 6.15 KB | 0755 |
|
| ingress_rif_conf_1q.sh | File | 6.23 KB | 0755 |
|
| ingress_rif_conf_vxlan.sh | File | 8.44 KB | 0755 |
|
| mirror_gre.sh | File | 3.78 KB | 0755 |
|
| mirror_gre_scale.sh | File | 5.43 KB | 0644 |
|
| mlxsw_lib.sh | File | 1.43 KB | 0644 |
|
| one_armed_router.sh | File | 6.82 KB | 0755 |
|
| pci_reset.sh | File | 1.27 KB | 0755 |
|
| port_range_occ.sh | File | 2.33 KB | 0755 |
|
| port_range_scale.sh | File | 1.51 KB | 0644 |
|
| port_scale.sh | File | 1.36 KB | 0644 |
|
| q_in_q_veto.sh | File | 8.06 KB | 0755 |
|
| qos_defprio.sh | File | 2.33 KB | 0755 |
|
| qos_dscp_bridge.sh | File | 4.14 KB | 0755 |
|
| qos_dscp_router.sh | File | 6.43 KB | 0755 |
|
| qos_ets_strict.sh | File | 9.09 KB | 0755 |
|
| qos_headroom.sh | File | 8.19 KB | 0755 |
|
| qos_lib.sh | File | 1.27 KB | 0644 |
|
| qos_max_descriptors.sh | File | 6.14 KB | 0755 |
|
| qos_mc_aware.sh | File | 9.54 KB | 0755 |
|
| qos_pfc.sh | File | 11.36 KB | 0755 |
|
| rif_bridge.sh | File | 4.12 KB | 0755 |
|
| rif_counter_scale.sh | File | 1.71 KB | 0644 |
|
| rif_lag.sh | File | 2.98 KB | 0755 |
|
| rif_lag_vlan.sh | File | 3.24 KB | 0755 |
|
| rif_mac_profile_scale.sh | File | 1.64 KB | 0644 |
|
| rif_mac_profiles.sh | File | 4.65 KB | 0755 |
|
| rif_mac_profiles_occ.sh | File | 2.87 KB | 0755 |
|
| router_bridge_lag.sh | File | 786 B | 0755 |
|
| router_scale.sh | File | 2.09 KB | 0644 |
|
| rtnetlink.sh | File | 26.93 KB | 0755 |
|
| sch_ets.sh | File | 2.3 KB | 0755 |
|
| sch_offload.sh | File | 5.25 KB | 0755 |
|
| sch_red_core.sh | File | 20.75 KB | 0644 |
|
| sch_red_ets.sh | File | 3.12 KB | 0755 |
|
| sch_red_prio.sh | File | 81 B | 0755 |
|
| sch_red_root.sh | File | 1.25 KB | 0755 |
|
| sch_tbf_ets.sh | File | 216 B | 0755 |
|
| sch_tbf_prio.sh | File | 217 B | 0755 |
|
| sch_tbf_root.sh | File | 217 B | 0755 |
|
| sharedbuffer.sh | File | 5.24 KB | 0755 |
|
| tc_action_hw_stats.sh | File | 2.24 KB | 0755 |
|
| tc_flower_scale.sh | File | 2.81 KB | 0644 |
|
| tc_police_occ.sh | File | 2.07 KB | 0755 |
|
| tc_police_scale.sh | File | 1.62 KB | 0644 |
|
| tc_restrictions.sh | File | 11.58 KB | 0755 |
|
| tc_sample.sh | File | 17.38 KB | 0755 |
|
| vxlan.sh | File | 30.19 KB | 0755 |
|
| vxlan_fdb_veto.sh | File | 3.11 KB | 0755 |
|
| vxlan_fdb_veto_ipv6.sh | File | 250 B | 0755 |
|
| vxlan_flooding.sh | File | 8.64 KB | 0755 |
|
| vxlan_ipv6.sh | File | 1.39 KB | 0755 |
|