tools/testing/selftests/drivers/net/mlxsw/devlink_trap_control.sh

Source file repositories/reference/linux-study-clean/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_control.sh

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/drivers/net/mlxsw/devlink_trap_control.sh
Extension
.sh
Size
18662 bytes
Lines
710
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.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# Test devlink-trap control trap functionality over mlxsw. Each registered
# control packet trap is tested to make sure it is triggered under the right
# conditions.
#
# +---------------------------------+
# | H1 (vrf)                        |
# |    + $h1                        |
# |    | 192.0.2.1/24               |
# |    | 2001:db8:1::1/64           |
# |    |                            |
# |    |  default via 192.0.2.2     |
# |    |  default via 2001:db8:1::2 |
# +----|----------------------------+
#      |
# +----|----------------------------------------------------------------------+
# | SW |                                                                      |
# |    + $rp1                                                                 |
# |        192.0.2.2/24                                                       |
# |        2001:db8:1::2/64                                                   |
# |                                                                           |
# |        2001:db8:2::2/64                                                   |
# |        198.51.100.2/24                                                    |
# |    + $rp2                                                                 |
# |    |                                                                      |
# +----|----------------------------------------------------------------------+
#      |
# +----|----------------------------+
# |    |  default via 198.51.100.2  |
# |    |  default via 2001:db8:2::2 |
# |    |                            |
# |    | 2001:db8:2::1/64           |
# |    | 198.51.100.1/24            |
# |    + $h2                        |
# | H2 (vrf)                        |
# +---------------------------------+

lib_dir=$(dirname $0)/../../../net/forwarding

ALL_TESTS="
	stp_test
	lacp_test
	lldp_test
	igmp_query_test
	igmp_v1_report_test
	igmp_v2_report_test
	igmp_v3_report_test
	igmp_v2_leave_test
	mld_query_test
	mld_v1_report_test
	mld_v2_report_test
	mld_v1_done_test
	ipv4_dhcp_test
	ipv6_dhcp_test
	arp_request_test
	arp_response_test
	ipv6_neigh_solicit_test
	ipv6_neigh_advert_test
	ipv4_bfd_test
	ipv6_bfd_test
	ipv4_ospf_test
	ipv6_ospf_test
	ipv4_bgp_test
	ipv6_bgp_test
	ipv4_vrrp_test
	ipv6_vrrp_test
	ipv4_pim_test
	ipv6_pim_test

Annotation

Implementation Notes