Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.gitignore | D | 01-Feb-2023 | 58 | 3 | 2 | |
Makefile | D | 01-Feb-2023 | 2.6 KiB | 118 | 113 | |
README | D | 01-Feb-2023 | 2.3 KiB | 59 | 46 | |
bridge_igmp.sh | D | 01-Feb-2023 | 14.8 KiB | 568 | 405 | |
bridge_locked_port.sh | D | 01-Feb-2023 | 3.4 KiB | 177 | 122 | |
bridge_mdb.sh | D | 01-Feb-2023 | 1.7 KiB | 104 | 70 | |
bridge_mdb_port_down.sh | D | 01-Feb-2023 | 2.2 KiB | 119 | 80 | |
bridge_mld.sh | D | 01-Feb-2023 | 16.2 KiB | 565 | 412 | |
bridge_port_isolation.sh | D | 01-Feb-2023 | 2.3 KiB | 152 | 112 | |
bridge_sticky_fdb.sh | D | 01-Feb-2023 | 1.1 KiB | 70 | 52 | |
bridge_vlan_aware.sh | D | 01-Feb-2023 | 2.5 KiB | 153 | 105 | |
bridge_vlan_mcast.sh | D | 01-Feb-2023 | 16.7 KiB | 544 | 440 | |
bridge_vlan_unaware.sh | D | 01-Feb-2023 | 1.2 KiB | 106 | 76 | |
config | D | 01-Feb-2023 | 417 | 20 | 19 | |
custom_multipath_hash.sh | D | 01-Feb-2023 | 9.8 KiB | 373 | 245 | |
devlink_lib.sh | D | 01-Feb-2023 | 12.8 KiB | 592 | 444 | |
dual_vxlan_bridge.sh | D | 01-Feb-2023 | 11.2 KiB | 367 | 222 | |
ethtool.sh | D | 01-Feb-2023 | 6.6 KiB | 300 | 212 | |
ethtool_extended_state.sh | D | 01-Feb-2023 | 2.1 KiB | 116 | 81 | |
ethtool_lib.sh | D | 01-Feb-2023 | 2.7 KiB | 121 | 92 | |
fib_offload_lib.sh | D | 01-Feb-2023 | 24.6 KiB | 874 | 600 | |
forwarding.config.sample | D | 01-Feb-2023 | 1.4 KiB | 52 | 24 | |
gre_custom_multipath_hash.sh | D | 01-Feb-2023 | 12.5 KiB | 465 | 295 | |
gre_inner_v4_multipath.sh | D | 01-Feb-2023 | 7.5 KiB | 306 | 182 | |
gre_inner_v6_multipath.sh | D | 01-Feb-2023 | 7.7 KiB | 307 | 183 | |
gre_multipath.sh | D | 01-Feb-2023 | 6.3 KiB | 258 | 157 | |
gre_multipath_nh.sh | D | 01-Feb-2023 | 9.1 KiB | 357 | 230 | |
gre_multipath_nh_res.sh | D | 01-Feb-2023 | 9.3 KiB | 362 | 235 | |
hw_stats_l3.sh | D | 01-Feb-2023 | 7 KiB | 325 | 236 | |
hw_stats_l3_gre.sh | D | 01-Feb-2023 | 1.7 KiB | 110 | 76 | |
ip6_forward_instats_vrf.sh | D | 01-Feb-2023 | 3 KiB | 173 | 128 | |
ip6gre_custom_multipath_hash.sh | D | 01-Feb-2023 | 12.7 KiB | 467 | 297 | |
ip6gre_flat.sh | D | 01-Feb-2023 | 876 | 66 | 46 | |
ip6gre_flat_key.sh | D | 01-Feb-2023 | 907 | 66 | 46 | |
ip6gre_flat_keys.sh | D | 01-Feb-2023 | 944 | 66 | 46 | |
ip6gre_hier.sh | D | 01-Feb-2023 | 937 | 66 | 46 | |
ip6gre_hier_key.sh | D | 01-Feb-2023 | 969 | 66 | 46 | |
ip6gre_hier_keys.sh | D | 01-Feb-2023 | 1,003 | 66 | 46 | |
ip6gre_inner_v4_multipath.sh | D | 01-Feb-2023 | 7.8 KiB | 305 | 182 | |
ip6gre_inner_v6_multipath.sh | D | 01-Feb-2023 | 7.9 KiB | 306 | 183 | |
ip6gre_lib.sh | D | 01-Feb-2023 | 13.9 KiB | 439 | 217 | |
ipip_flat_gre.sh | D | 01-Feb-2023 | 838 | 64 | 43 | |
ipip_flat_gre_key.sh | D | 01-Feb-2023 | 860 | 64 | 43 | |
ipip_flat_gre_keys.sh | D | 01-Feb-2023 | 886 | 64 | 43 | |
ipip_hier_gre.sh | D | 01-Feb-2023 | 887 | 64 | 43 | |
ipip_hier_gre_key.sh | D | 01-Feb-2023 | 910 | 64 | 43 | |
ipip_hier_gre_keys.sh | D | 01-Feb-2023 | 938 | 64 | 43 | |
ipip_lib.sh | D | 01-Feb-2023 | 8.4 KiB | 350 | 158 | |
lib.sh | D | 01-Feb-2023 | 32 KiB | 1,687 | 1,304 | |
local_termination.sh | D | 01-Feb-2023 | 6.1 KiB | 300 | 223 | |
loopback.sh | D | 01-Feb-2023 | 1.6 KiB | 103 | 69 | |
mirror_gre.sh | D | 01-Feb-2023 | 3.3 KiB | 161 | 113 | |
mirror_gre_bound.sh | D | 01-Feb-2023 | 5.8 KiB | 227 | 130 | |
mirror_gre_bridge_1d.sh | D | 01-Feb-2023 | 4.2 KiB | 133 | 68 | |
mirror_gre_bridge_1d_vlan.sh | D | 01-Feb-2023 | 2.7 KiB | 133 | 90 | |
mirror_gre_bridge_1q.sh | D | 01-Feb-2023 | 4.1 KiB | 130 | 68 | |
mirror_gre_bridge_1q_lag.sh | D | 01-Feb-2023 | 7.3 KiB | 294 | 191 | |
mirror_gre_changes.sh | D | 01-Feb-2023 | 5.7 KiB | 273 | 193 | |
mirror_gre_flower.sh | D | 01-Feb-2023 | 2.8 KiB | 138 | 94 | |
mirror_gre_lag_lacp.sh | D | 01-Feb-2023 | 7.3 KiB | 286 | 183 | |
mirror_gre_lib.sh | D | 01-Feb-2023 | 2.5 KiB | 131 | 98 | |
mirror_gre_neigh.sh | D | 01-Feb-2023 | 2.3 KiB | 116 | 79 | |
mirror_gre_nh.sh | D | 01-Feb-2023 | 2.9 KiB | 132 | 85 | |
mirror_gre_topo_lib.sh | D | 01-Feb-2023 | 3.4 KiB | 95 | 45 | |
mirror_gre_vlan.sh | D | 01-Feb-2023 | 1.7 KiB | 93 | 63 | |
mirror_gre_vlan_bridge_1q.sh | D | 01-Feb-2023 | 9 KiB | 349 | 226 | |
mirror_lib.sh | D | 01-Feb-2023 | 2.9 KiB | 150 | 119 | |
mirror_topo_lib.sh | D | 01-Feb-2023 | 2.7 KiB | 102 | 59 | |
mirror_vlan.sh | D | 01-Feb-2023 | 2.3 KiB | 132 | 93 | |
no_forwarding.sh | D | 01-Feb-2023 | 5.5 KiB | 262 | 188 | |
pedit_dsfield.sh | D | 01-Feb-2023 | 6.6 KiB | 312 | 234 | |
pedit_ip.sh | D | 01-Feb-2023 | 4.4 KiB | 202 | 144 | |
pedit_l4port.sh | D | 01-Feb-2023 | 4.5 KiB | 201 | 144 | |
q_in_vni.sh | D | 01-Feb-2023 | 10.7 KiB | 348 | 213 | |
q_in_vni_ipv6.sh | D | 01-Feb-2023 | 10.9 KiB | 348 | 213 | |
router.sh | D | 01-Feb-2023 | 7.3 KiB | 341 | 228 | |
router_bridge.sh | D | 01-Feb-2023 | 1.8 KiB | 114 | 83 | |
router_bridge_vlan.sh | D | 01-Feb-2023 | 2.1 KiB | 133 | 97 | |
router_broadcast.sh | D | 01-Feb-2023 | 5 KiB | 238 | 179 | |
router_mpath_nh.sh | D | 01-Feb-2023 | 9.6 KiB | 426 | 309 | |
router_mpath_nh_res.sh | D | 01-Feb-2023 | 10 KiB | 401 | 294 | |
router_multicast.sh | D | 01-Feb-2023 | 14.6 KiB | 507 | 324 | |
router_multipath.sh | D | 01-Feb-2023 | 8.3 KiB | 343 | 248 | |
router_nh.sh | D | 01-Feb-2023 | 2.6 KiB | 161 | 112 | |
router_vid_1.sh | D | 01-Feb-2023 | 3.5 KiB | 161 | 98 | |
sch_ets.sh | D | 01-Feb-2023 | 781 | 48 | 34 | |
sch_ets_core.sh | D | 01-Feb-2023 | 7.3 KiB | 301 | 187 | |
sch_ets_tests.sh | D | 01-Feb-2023 | 3.9 KiB | 224 | 175 | |
sch_red.sh | D | 01-Feb-2023 | 11.1 KiB | 494 | 342 | |
sch_tbf_core.sh | D | 01-Feb-2023 | 5 KiB | 234 | 142 | |
sch_tbf_ets.sh | D | 01-Feb-2023 | 118 | 7 | 3 | |
sch_tbf_etsprio.sh | D | 01-Feb-2023 | 1.3 KiB | 68 | 47 | |
sch_tbf_prio.sh | D | 01-Feb-2023 | 118 | 7 | 3 | |
sch_tbf_root.sh | D | 01-Feb-2023 | 422 | 34 | 23 | |
skbedit_priority.sh | D | 01-Feb-2023 | 3.8 KiB | 171 | 114 | |
tc_actions.sh | D | 01-Feb-2023 | 6.2 KiB | 269 | 197 | |
tc_chains.sh | D | 01-Feb-2023 | 4.8 KiB | 206 | 148 | |
tc_common.sh | D | 01-Feb-2023 | 721 | 37 | 25 | |
tc_flower.sh | D | 01-Feb-2023 | 21.2 KiB | 718 | 492 | |
tc_flower_router.sh | D | 01-Feb-2023 | 3 KiB | 173 | 123 | |
tc_mpls_l2vpn.sh | D | 01-Feb-2023 | 5 KiB | 193 | 111 | |
tc_police.sh | D | 01-Feb-2023 | 11.8 KiB | 442 | 292 | |
tc_shblocks.sh | D | 01-Feb-2023 | 2.7 KiB | 153 | 108 | |
tc_vlan_modify.sh | D | 01-Feb-2023 | 3.2 KiB | 165 | 116 | |
tsn_lib.sh | D | 01-Feb-2023 | 5.5 KiB | 250 | 190 | |
vxlan_asymmetric.sh | D | 01-Feb-2023 | 17.6 KiB | 578 | 354 | |
vxlan_asymmetric_ipv6.sh | D | 01-Feb-2023 | 16 KiB | 505 | 312 | |
vxlan_bridge_1d.sh | D | 01-Feb-2023 | 20.4 KiB | 798 | 552 | |
vxlan_bridge_1d_ipv6.sh | D | 01-Feb-2023 | 21.3 KiB | 805 | 569 | |
vxlan_bridge_1d_port_8472.sh | D | 01-Feb-2023 | 172 | 11 | 5 | |
vxlan_bridge_1d_port_8472_ipv6.sh | D | 01-Feb-2023 | 188 | 12 | 6 | |
vxlan_bridge_1q.sh | D | 01-Feb-2023 | 22.9 KiB | 841 | 540 | |
vxlan_bridge_1q_ipv6.sh | D | 01-Feb-2023 | 24.3 KiB | 838 | 547 | |
vxlan_bridge_1q_port_8472.sh | D | 01-Feb-2023 | 172 | 11 | 5 | |
vxlan_bridge_1q_port_8472_ipv6.sh | D | 01-Feb-2023 | 188 | 12 | 6 | |
vxlan_symmetric.sh | D | 01-Feb-2023 | 18.1 KiB | 562 | 346 | |
vxlan_symmetric_ipv6.sh | D | 01-Feb-2023 | 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