Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 11-Dec-2024 | - | ||||
.gitignore | H A D | 07-Mar-2021 | 58 | 3 | 2 | |
Makefile | H A D | 05-Apr-2024 | 2.9 KiB | 131 | 126 | |
README | H A D | 07-Mar-2021 | 2.3 KiB | 59 | 46 | |
bridge_igmp.sh | H A D | 13-Jun-2024 | 14.7 KiB | 565 | 404 | |
bridge_locked_port.sh | H A D | 05-Apr-2024 | 9.2 KiB | 366 | 249 | |
bridge_mdb.sh | H A D | 05-Apr-2024 | 38.7 KiB | 1,185 | 825 | |
bridge_mdb_host.sh | H A D | 05-Apr-2024 | 1.7 KiB | 104 | 70 | |
bridge_mdb_max.sh | H A D | 05-Apr-2024 | 30 KiB | 1,348 | 1,013 | |
bridge_mdb_port_down.sh | H A D | 05-Apr-2024 | 2.2 KiB | 119 | 80 | |
bridge_mld.sh | H A D | 13-Jun-2024 | 16.2 KiB | 565 | 412 | |
bridge_port_isolation.sh | H A D | 07-Mar-2021 | 2.3 KiB | 152 | 112 | |
bridge_sticky_fdb.sh | H A D | 07-Mar-2021 | 1.1 KiB | 70 | 52 | |
bridge_vlan_aware.sh | H A D | 05-Apr-2024 | 2.5 KiB | 153 | 105 | |
bridge_vlan_mcast.sh | H A D | 05-Apr-2024 | 16.7 KiB | 547 | 442 | |
bridge_vlan_unaware.sh | H A D | 05-Apr-2024 | 1.2 KiB | 106 | 76 | |
config | H A D | 05-Apr-2024 | 1.2 KiB | 55 | 54 | |
custom_multipath_hash.sh | H A D | 13-Sep-2022 | 9.8 KiB | 373 | 245 | |
devlink_lib.sh | H A D | 05-Aug-2024 | 12.8 KiB | 599 | 448 | |
dual_vxlan_bridge.sh | H A D | 05-Apr-2024 | 11.2 KiB | 368 | 223 | |
ethtool.sh | H A D | 05-Apr-2024 | 6.6 KiB | 302 | 213 | |
ethtool_extended_state.sh | H A D | 05-Apr-2024 | 2.1 KiB | 118 | 82 | |
ethtool_lib.sh | H A D | 24-May-2022 | 2.7 KiB | 121 | 92 | |
ethtool_mm.sh | H A D | 05-Apr-2024 | 6.3 KiB | 297 | 202 | |
fib_offload_lib.sh | H A D | 05-Apr-2024 | 24.6 KiB | 874 | 600 | |
forwarding.config.sample | H A D | 05-Apr-2024 | 1.4 KiB | 52 | 24 | |
gre_custom_multipath_hash.sh | H A D | 13-Sep-2022 | 12.5 KiB | 465 | 295 | |
gre_inner_v4_multipath.sh | H A D | 07-Mar-2021 | 7.5 KiB | 306 | 182 | |
gre_inner_v6_multipath.sh | H A D | 07-Mar-2021 | 7.7 KiB | 307 | 183 | |
gre_multipath.sh | H A D | 07-Mar-2021 | 6.3 KiB | 258 | 157 | |
gre_multipath_nh.sh | H A D | 24-May-2022 | 9.1 KiB | 357 | 230 | |
gre_multipath_nh_res.sh | H A D | 24-May-2022 | 9.3 KiB | 362 | 235 | |
hw_stats_l3.sh | H A D | 05-Apr-2024 | 7.5 KiB | 341 | 252 | |
hw_stats_l3_gre.sh | H A D | 05-Apr-2024 | 1.7 KiB | 112 | 77 | |
ip6_forward_instats_vrf.sh | H A D | 05-Apr-2024 | 3 KiB | 175 | 129 | |
ip6gre_custom_multipath_hash.sh | H A D | 13-Sep-2022 | 12.7 KiB | 467 | 297 | |
ip6gre_flat.sh | H A D | 05-Apr-2024 | 876 | 66 | 46 | |
ip6gre_flat_key.sh | H A D | 05-Apr-2024 | 907 | 66 | 46 | |
ip6gre_flat_keys.sh | H A D | 05-Apr-2024 | 944 | 66 | 46 | |
ip6gre_hier.sh | H A D | 05-Apr-2024 | 937 | 66 | 46 | |
ip6gre_hier_key.sh | H A D | 05-Apr-2024 | 969 | 66 | 46 | |
ip6gre_hier_keys.sh | H A D | 05-Apr-2024 | 1,003 | 66 | 46 | |
ip6gre_inner_v4_multipath.sh | H A D | 07-Mar-2021 | 7.8 KiB | 305 | 182 | |
ip6gre_inner_v6_multipath.sh | H A D | 07-Mar-2021 | 7.9 KiB | 306 | 183 | |
ip6gre_lib.sh | H A D | 05-Apr-2024 | 13.9 KiB | 439 | 217 | |
ipip_flat_gre.sh | H A D | 07-Mar-2021 | 838 | 64 | 43 | |
ipip_flat_gre_key.sh | H A D | 07-Mar-2021 | 860 | 64 | 43 | |
ipip_flat_gre_keys.sh | H A D | 07-Mar-2021 | 886 | 64 | 43 | |
ipip_hier_gre.sh | H A D | 07-Mar-2021 | 887 | 64 | 43 | |
ipip_hier_gre_key.sh | H A D | 07-Mar-2021 | 910 | 64 | 43 | |
ipip_hier_gre_keys.sh | H A D | 07-Mar-2021 | 938 | 64 | 43 | |
ipip_lib.sh | H A D | 07-Mar-2021 | 8.4 KiB | 350 | 158 | |
lib.sh | H A D | 24-Jun-2024 | 38.3 KiB | 1,986 | 1,541 | |
local_termination.sh | H A D | 10-Sep-2024 | 6.2 KiB | 304 | 225 | |
loopback.sh | H A D | 07-Mar-2021 | 1.6 KiB | 103 | 69 | |
mirror_gre.sh | H A D | 07-Mar-2021 | 3.3 KiB | 161 | 113 | |
mirror_gre_bound.sh | H A D | 05-Apr-2024 | 5.8 KiB | 228 | 131 | |
mirror_gre_bridge_1d.sh | H A D | 05-Apr-2024 | 4.4 KiB | 138 | 73 | |
mirror_gre_bridge_1d_vlan.sh | H A D | 05-Apr-2024 | 2.7 KiB | 134 | 91 | |
mirror_gre_bridge_1q.sh | H A D | 05-Apr-2024 | 4.3 KiB | 134 | 72 | |
mirror_gre_bridge_1q_lag.sh | H A D | 05-Apr-2024 | 7.3 KiB | 295 | 192 | |
mirror_gre_changes.sh | H A D | 05-Apr-2024 | 5.7 KiB | 274 | 194 | |
mirror_gre_flower.sh | H A D | 07-Mar-2021 | 2.8 KiB | 138 | 94 | |
mirror_gre_lag_lacp.sh | H A D | 07-Mar-2021 | 7.3 KiB | 286 | 183 | |
mirror_gre_lib.sh | H A D | 07-Mar-2021 | 2.5 KiB | 131 | 98 | |
mirror_gre_neigh.sh | H A D | 07-Mar-2021 | 2.3 KiB | 116 | 79 | |
mirror_gre_nh.sh | H A D | 07-Mar-2021 | 2.9 KiB | 132 | 85 | |
mirror_gre_topo_lib.sh | H A D | 07-Mar-2021 | 3.4 KiB | 95 | 45 | |
mirror_gre_vlan.sh | H A D | 07-Mar-2021 | 1.7 KiB | 93 | 63 | |
mirror_gre_vlan_bridge_1q.sh | H A D | 05-Apr-2024 | 9 KiB | 349 | 226 | |
mirror_lib.sh | H A D | 05-Apr-2024 | 2.9 KiB | 150 | 119 | |
mirror_topo_lib.sh | H A D | 05-Apr-2024 | 2.7 KiB | 103 | 60 | |
mirror_vlan.sh | H A D | 05-Apr-2024 | 2.3 KiB | 132 | 93 | |
no_forwarding.sh | H A D | 18-Oct-2024 | 5.5 KiB | 265 | 190 | |
pedit_dsfield.sh | H A D | 05-Apr-2024 | 6.7 KiB | 314 | 236 | |
pedit_ip.sh | H A D | 05-Apr-2024 | 4.4 KiB | 202 | 144 | |
pedit_l4port.sh | H A D | 26-Jul-2021 | 4.5 KiB | 201 | 144 | |
q_in_vni.sh | H A D | 05-Apr-2024 | 10.7 KiB | 349 | 214 | |
q_in_vni_ipv6.sh | H A D | 05-Apr-2024 | 10.9 KiB | 348 | 213 | |
router.sh | H A D | 05-Apr-2024 | 7.3 KiB | 341 | 228 | |
router_bridge.sh | H A D | 05-Apr-2024 | 4 KiB | 191 | 132 | |
router_bridge_1d.sh | H A D | 05-Apr-2024 | 5.1 KiB | 186 | 126 | |
router_bridge_1d_lag.sh | H A D | 05-Apr-2024 | 9.3 KiB | 409 | 270 | |
router_bridge_lag.sh | H A D | 05-Apr-2024 | 6.8 KiB | 324 | 241 | |
router_bridge_pvid_vlan_upper.sh | H A D | 05-Apr-2024 | 3.5 KiB | 156 | 100 | |
router_bridge_vlan.sh | H A D | 05-Apr-2024 | 5.5 KiB | 225 | 152 | |
router_bridge_vlan_upper.sh | H A D | 05-Apr-2024 | 3.9 KiB | 170 | 111 | |
router_bridge_vlan_upper_pvid.sh | H A D | 05-Apr-2024 | 3.7 KiB | 172 | 114 | |
router_broadcast.sh | H A D | 07-Mar-2021 | 5 KiB | 238 | 179 | |
router_mpath_nh.sh | H A D | 24-May-2022 | 9.6 KiB | 426 | 309 | |
router_mpath_nh_res.sh | H A D | 24-May-2022 | 10 KiB | 401 | 294 | |
router_multicast.sh | H A D | 05-Apr-2024 | 14.6 KiB | 507 | 324 | |
router_multipath.sh | H A D | 08-Mar-2021 | 8.3 KiB | 343 | 248 | |
router_nh.sh | H A D | 24-May-2022 | 2.6 KiB | 161 | 112 | |
router_vid_1.sh | H A D | 05-Apr-2024 | 3.5 KiB | 161 | 98 | |
sch_ets.sh | H A D | 07-Mar-2021 | 781 | 48 | 34 | |
sch_ets_core.sh | H A D | 07-Mar-2021 | 7.3 KiB | 301 | 187 | |
sch_ets_tests.sh | H A D | 07-Mar-2021 | 3.9 KiB | 224 | 175 | |
sch_red.sh | H A D | 01-Nov-2022 | 11.1 KiB | 494 | 342 | |
sch_tbf_core.sh | H A D | 07-Mar-2021 | 5 KiB | 234 | 142 | |
sch_tbf_ets.sh | H A D | 07-Mar-2021 | 118 | 7 | 3 | |
sch_tbf_etsprio.sh | H A D | 05-Apr-2024 | 1.4 KiB | 72 | 50 | |
sch_tbf_prio.sh | H A D | 07-Mar-2021 | 118 | 7 | 3 | |
sch_tbf_root.sh | H A D | 05-Apr-2024 | 489 | 38 | 26 | |
settings | H A D | 05-Apr-2024 | 10 | 2 | 1 | |
skbedit_priority.sh | H A D | 05-Apr-2024 | 3.9 KiB | 173 | 116 | |
tc_actions.sh | H A D | 05-Apr-2024 | 7.9 KiB | 319 | 238 | |
tc_chains.sh | H A D | 24-May-2022 | 4.8 KiB | 206 | 148 | |
tc_common.sh | H A D | 05-Apr-2024 | 721 | 37 | 25 | |
tc_flower.sh | H A D | 05-Apr-2024 | 21.2 KiB | 718 | 492 | |
tc_flower_cfm.sh | H A D | 05-Apr-2024 | 4.9 KiB | 207 | 152 | |
tc_flower_l2_miss.sh | H A D | 05-Apr-2024 | 9.1 KiB | 358 | 240 | |
tc_flower_port_range.sh | H A D | 05-Apr-2024 | 5.9 KiB | 229 | 174 | |
tc_flower_router.sh | H A D | 07-Mar-2021 | 3 KiB | 173 | 123 | |
tc_mpls_l2vpn.sh | H A D | 24-May-2022 | 5 KiB | 193 | 111 | |
tc_police.sh | H A D | 27-Jun-2022 | 11.8 KiB | 442 | 292 | |
tc_shblocks.sh | H A D | 07-Mar-2021 | 2.7 KiB | 153 | 108 | |
tc_tunnel_key.sh | H A D | 05-Apr-2024 | 3.8 KiB | 165 | 127 | |
tc_vlan_modify.sh | H A D | 07-Mar-2021 | 3.2 KiB | 165 | 116 | |
tsn_lib.sh | H A D | 05-Apr-2024 | 5.5 KiB | 250 | 190 | |
vxlan_asymmetric.sh | H A D | 05-Apr-2024 | 17.6 KiB | 578 | 354 | |
vxlan_asymmetric_ipv6.sh | H A D | 05-Apr-2024 | 16 KiB | 505 | 312 | |
vxlan_bridge_1d.sh | H A D | 24-May-2022 | 20.4 KiB | 798 | 552 | |
vxlan_bridge_1d_ipv6.sh | H A D | 05-Apr-2024 | 21.3 KiB | 805 | 569 | |
vxlan_bridge_1d_port_8472.sh | H A D | 07-Mar-2021 | 172 | 11 | 5 | |
vxlan_bridge_1d_port_8472_ipv6.sh | H A D | 05-Apr-2024 | 188 | 12 | 6 | |
vxlan_bridge_1q.sh | H A D | 05-Apr-2024 | 22.9 KiB | 841 | 540 | |
vxlan_bridge_1q_ipv6.sh | H A D | 05-Apr-2024 | 24.3 KiB | 838 | 547 | |
vxlan_bridge_1q_port_8472.sh | H A D | 07-Mar-2021 | 172 | 11 | 5 | |
vxlan_bridge_1q_port_8472_ipv6.sh | H A D | 05-Apr-2024 | 188 | 12 | 6 | |
vxlan_symmetric.sh | H A D | 07-Mar-2021 | 18.1 KiB | 562 | 346 | |
vxlan_symmetric_ipv6.sh | H A D | 05-Apr-2024 | 18.3 KiB | 564 | 348 |
README
1Motivation 2========== 3 4One of the nice things about network namespaces is that they allow one 5to easily create and test complex environments. 6 7Unfortunately, these namespaces can not be used with actual switching 8ASICs, as their ports can not be migrated to other network namespaces 9(NETIF_F_NETNS_LOCAL) and most of them probably do not support the 10L1-separation provided by namespaces. 11 12However, a similar kind of flexibility can be achieved by using VRFs and 13by looping the switch ports together. For example: 14 15 br0 16 + 17 vrf-h1 | vrf-h2 18 + +---+----+ + 19 | | | | 20 192.0.2.1/24 + + + + 192.0.2.2/24 21 swp1 swp2 swp3 swp4 22 + + + + 23 | | | | 24 +--------+ +--------+ 25 26The VRFs act as lightweight namespaces representing hosts connected to 27the switch. 28 29This approach for testing switch ASICs has several advantages over the 30traditional method that requires multiple physical machines, to name a 31few: 32 331. Only the device under test (DUT) is being tested without noise from 34other system. 35 362. Ability to easily provision complex topologies. Testing bridging 37between 4-ports LAGs or 8-way ECMP requires many physical links that are 38not always available. With the VRF-based approach one merely needs to 39loopback more ports. 40 41These tests are written with switch ASICs in mind, but they can be run 42on any Linux box using veth pairs to emulate physical loopbacks. 43 44Guidelines for Writing Tests 45============================ 46 47o Where possible, reuse an existing topology for different tests instead 48 of recreating the same topology. 49o Tests that use anything but the most trivial topologies should include 50 an ASCII art showing the topology. 51o Where possible, IPv6 and IPv4 addresses shall conform to RFC 3849 and 52 RFC 5737, respectively. 53o Where possible, tests shall be written so that they can be reused by 54 multiple topologies and added to lib.sh. 55o Checks shall be added to lib.sh for any external dependencies. 56o Code shall be checked using ShellCheck [1] prior to submission. 57 581. https://www.shellcheck.net/ 59