tools/testing/selftests/drivers/net/mlxsw/devlink_trap_tunnel_vxlan.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_tunnel_vxlan.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/drivers/net/mlxsw/devlink_trap_tunnel_vxlan.sh- Extension
.sh- Size
- 9049 bytes
- Lines
- 331
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
function h1_create
Annotated Snippet
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# Test devlink-trap tunnel drops and exceptions functionality over mlxsw.
# Check all traps to make sure they are triggered under the right
# conditions.
# +--------------------+
# | H1 (vrf) |
# | + $h1 |
# | | 192.0.2.1/28 |
# +----|---------------+
# |
# +----|----------------------------------------------------------------------+
# | SW | |
# | +--|--------------------------------------------------------------------+ |
# | | + $swp1 BR1 (802.1d) | |
# | | | |
# | | + vx1 (vxlan) | |
# | | local 192.0.2.17 | |
# | | id 1000 dstport $VXPORT | |
# | +-----------------------------------------------------------------------+ |
# | |
# | + $rp1 |
# | | 192.0.2.17/28 |
# +----|----------------------------------------------------------------------+
# |
# +----|--------------------------------------------------------+
# | | VRF2 |
# | + $rp2 |
# | 192.0.2.18/28 |
# | |
# +-------------------------------------------------------------+
lib_dir=$(dirname $0)/../../../net/forwarding
ALL_TESTS="
decap_error_test
overlay_smac_is_mc_test
"
NUM_NETIFS=4
source $lib_dir/lib.sh
source $lib_dir/tc_common.sh
source $lib_dir/devlink_lib.sh
: ${VXPORT:=4789}
export VXPORT
h1_create()
{
simple_if_init $h1 192.0.2.1/28
}
h1_destroy()
{
simple_if_fini $h1 192.0.2.1/28
}
switch_create()
{
ip link add name br1 type bridge vlan_filtering 0 mcast_snooping 0
# Make sure the bridge uses the MAC address of the local port and not
# that of the VxLAN's device.
ip link set dev br1 address $(mac_get $swp1)
ip link set dev br1 up
tc qdisc add dev $swp1 clsact
ip link set dev $swp1 master br1
ip link set dev $swp1 up
Annotation
- Detected declarations: `function h1_create`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.