Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.gitignore | D | 11-Mar-2024 | 58 | 3 | 2 | |
Makefile | D | 11-Mar-2024 | 1.7 KiB | 79 | 74 | |
README | D | 11-Mar-2024 | 2.3 KiB | 59 | 46 | |
bridge_igmp.sh | D | 11-Mar-2024 | 14.7 KiB | 562 | 400 | |
bridge_mld.sh | D | 11-Mar-2024 | 16 KiB | 559 | 407 | |
bridge_port_isolation.sh | D | 11-Mar-2024 | 2.3 KiB | 152 | 112 | |
bridge_sticky_fdb.sh | D | 11-Mar-2024 | 1.1 KiB | 70 | 52 | |
bridge_vlan_aware.sh | D | 11-Mar-2024 | 2.5 KiB | 152 | 103 | |
bridge_vlan_unaware.sh | D | 11-Mar-2024 | 1.2 KiB | 105 | 74 | |
config | D | 11-Mar-2024 | 397 | 19 | 18 | |
custom_multipath_hash.sh | D | 11-Mar-2024 | 9.6 KiB | 365 | 237 | |
devlink_lib.sh | D | 11-Mar-2024 | 12.8 KiB | 593 | 445 | |
dual_vxlan_bridge.sh | D | 11-Mar-2024 | 11.2 KiB | 367 | 222 | |
ethtool.sh | D | 11-Mar-2024 | 6.6 KiB | 300 | 212 | |
ethtool_extended_state.sh | D | 11-Mar-2024 | 1.9 KiB | 103 | 71 | |
ethtool_lib.sh | D | 11-Mar-2024 | 2.7 KiB | 121 | 92 | |
fib_offload_lib.sh | D | 11-Mar-2024 | 24.6 KiB | 874 | 600 | |
forwarding.config.sample | D | 11-Mar-2024 | 1.1 KiB | 44 | 20 | |
gre_custom_multipath_hash.sh | D | 11-Mar-2024 | 12.3 KiB | 457 | 287 | |
gre_inner_v4_multipath.sh | D | 11-Mar-2024 | 7.5 KiB | 306 | 182 | |
gre_inner_v6_multipath.sh | D | 11-Mar-2024 | 7.7 KiB | 307 | 183 | |
gre_multipath.sh | D | 11-Mar-2024 | 6.3 KiB | 258 | 157 | |
gre_multipath_nh.sh | D | 11-Mar-2024 | 9.1 KiB | 357 | 230 | |
gre_multipath_nh_res.sh | D | 11-Mar-2024 | 9.3 KiB | 362 | 235 | |
ip6_forward_instats_vrf.sh | D | 11-Mar-2024 | 3 KiB | 173 | 128 | |
ip6gre_custom_multipath_hash.sh | D | 11-Mar-2024 | 12.6 KiB | 459 | 289 | |
ip6gre_inner_v4_multipath.sh | D | 11-Mar-2024 | 7.8 KiB | 305 | 182 | |
ip6gre_inner_v6_multipath.sh | D | 11-Mar-2024 | 7.9 KiB | 306 | 183 | |
ipip_flat_gre.sh | D | 11-Mar-2024 | 838 | 64 | 43 | |
ipip_flat_gre_key.sh | D | 11-Mar-2024 | 860 | 64 | 43 | |
ipip_flat_gre_keys.sh | D | 11-Mar-2024 | 886 | 64 | 43 | |
ipip_hier_gre.sh | D | 11-Mar-2024 | 887 | 64 | 43 | |
ipip_hier_gre_key.sh | D | 11-Mar-2024 | 910 | 64 | 43 | |
ipip_hier_gre_keys.sh | D | 11-Mar-2024 | 938 | 64 | 43 | |
ipip_lib.sh | D | 11-Mar-2024 | 8.4 KiB | 350 | 158 | |
lib.sh | D | 11-Mar-2024 | 27.5 KiB | 1,474 | 1,141 | |
loopback.sh | D | 11-Mar-2024 | 1.6 KiB | 103 | 69 | |
mirror_gre.sh | D | 11-Mar-2024 | 3.3 KiB | 161 | 113 | |
mirror_gre_bound.sh | D | 11-Mar-2024 | 5.8 KiB | 227 | 130 | |
mirror_gre_bridge_1d.sh | D | 11-Mar-2024 | 4.2 KiB | 133 | 68 | |
mirror_gre_bridge_1d_vlan.sh | D | 11-Mar-2024 | 2.7 KiB | 133 | 90 | |
mirror_gre_bridge_1q.sh | D | 11-Mar-2024 | 4 KiB | 127 | 66 | |
mirror_gre_bridge_1q_lag.sh | D | 11-Mar-2024 | 7.3 KiB | 293 | 191 | |
mirror_gre_changes.sh | D | 11-Mar-2024 | 5.7 KiB | 273 | 193 | |
mirror_gre_flower.sh | D | 11-Mar-2024 | 2.8 KiB | 138 | 94 | |
mirror_gre_lag_lacp.sh | D | 11-Mar-2024 | 7.3 KiB | 286 | 183 | |
mirror_gre_lib.sh | D | 11-Mar-2024 | 2.5 KiB | 131 | 98 | |
mirror_gre_neigh.sh | D | 11-Mar-2024 | 2.3 KiB | 116 | 79 | |
mirror_gre_nh.sh | D | 11-Mar-2024 | 2.9 KiB | 132 | 85 | |
mirror_gre_topo_lib.sh | D | 11-Mar-2024 | 3.4 KiB | 95 | 45 | |
mirror_gre_vlan.sh | D | 11-Mar-2024 | 1.7 KiB | 93 | 63 | |
mirror_gre_vlan_bridge_1q.sh | D | 11-Mar-2024 | 8.9 KiB | 348 | 225 | |
mirror_lib.sh | D | 11-Mar-2024 | 2.9 KiB | 149 | 118 | |
mirror_topo_lib.sh | D | 11-Mar-2024 | 2.7 KiB | 102 | 59 | |
mirror_vlan.sh | D | 11-Mar-2024 | 2.2 KiB | 132 | 93 | |
pedit_dsfield.sh | D | 11-Mar-2024 | 6.6 KiB | 312 | 234 | |
pedit_l4port.sh | D | 11-Mar-2024 | 4.5 KiB | 201 | 144 | |
q_in_vni.sh | D | 11-Mar-2024 | 10.7 KiB | 348 | 213 | |
router.sh | D | 11-Mar-2024 | 6.2 KiB | 323 | 228 | |
router_bridge.sh | D | 11-Mar-2024 | 1.8 KiB | 114 | 83 | |
router_bridge_vlan.sh | D | 11-Mar-2024 | 2.1 KiB | 133 | 97 | |
router_broadcast.sh | D | 11-Mar-2024 | 5 KiB | 238 | 179 | |
router_mpath_nh.sh | D | 11-Mar-2024 | 9.6 KiB | 426 | 309 | |
router_mpath_nh_res.sh | D | 11-Mar-2024 | 10 KiB | 401 | 294 | |
router_multicast.sh | D | 11-Mar-2024 | 11.3 KiB | 417 | 270 | |
router_multipath.sh | D | 11-Mar-2024 | 8.3 KiB | 343 | 248 | |
router_nh.sh | D | 11-Mar-2024 | 2.6 KiB | 161 | 112 | |
router_vid_1.sh | D | 11-Mar-2024 | 2.1 KiB | 136 | 95 | |
sch_ets.sh | D | 11-Mar-2024 | 781 | 48 | 34 | |
sch_ets_core.sh | D | 11-Mar-2024 | 7.3 KiB | 301 | 187 | |
sch_ets_tests.sh | D | 11-Mar-2024 | 3.9 KiB | 224 | 175 | |
sch_red.sh | D | 11-Mar-2024 | 11.1 KiB | 493 | 342 | |
sch_tbf_core.sh | D | 11-Mar-2024 | 5 KiB | 234 | 142 | |
sch_tbf_ets.sh | D | 11-Mar-2024 | 118 | 7 | 3 | |
sch_tbf_etsprio.sh | D | 11-Mar-2024 | 711 | 40 | 26 | |
sch_tbf_prio.sh | D | 11-Mar-2024 | 118 | 7 | 3 | |
sch_tbf_root.sh | D | 11-Mar-2024 | 422 | 34 | 23 | |
skbedit_priority.sh | D | 11-Mar-2024 | 3.8 KiB | 171 | 114 | |
tc_actions.sh | D | 11-Mar-2024 | 4.6 KiB | 224 | 162 | |
tc_chains.sh | D | 11-Mar-2024 | 4.8 KiB | 206 | 148 | |
tc_common.sh | D | 11-Mar-2024 | 524 | 27 | 17 | |
tc_flower.sh | D | 11-Mar-2024 | 21.2 KiB | 718 | 492 | |
tc_flower_router.sh | D | 11-Mar-2024 | 3 KiB | 173 | 123 | |
tc_mpls_l2vpn.sh | D | 11-Mar-2024 | 5 KiB | 193 | 111 | |
tc_police.sh | D | 11-Mar-2024 | 10.4 KiB | 390 | 256 | |
tc_shblocks.sh | D | 11-Mar-2024 | 2.7 KiB | 153 | 108 | |
tc_vlan_modify.sh | D | 11-Mar-2024 | 3.2 KiB | 165 | 116 | |
vxlan_asymmetric.sh | D | 11-Mar-2024 | 17.6 KiB | 578 | 354 | |
vxlan_bridge_1d.sh | D | 11-Mar-2024 | 20.4 KiB | 798 | 552 | |
vxlan_bridge_1d_port_8472.sh | D | 11-Mar-2024 | 172 | 11 | 5 | |
vxlan_bridge_1q.sh | D | 11-Mar-2024 | 23.5 KiB | 861 | 556 | |
vxlan_bridge_1q_port_8472.sh | D | 11-Mar-2024 | 172 | 11 | 5 | |
vxlan_symmetric.sh | D | 11-Mar-2024 | 18.1 KiB | 562 | 346 |
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