Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.gitignore | D | 06-Mar-2024 | 58 | 3 | 2 | |
Makefile | D | 06-Mar-2024 | 2.9 KiB | 131 | 126 | |
README | D | 06-Mar-2024 | 2.3 KiB | 59 | 46 | |
bridge_igmp.sh | D | 06-Mar-2024 | 14.7 KiB | 565 | 404 | |
bridge_locked_port.sh | D | 06-Mar-2024 | 9.2 KiB | 366 | 249 | |
bridge_mdb.sh | D | 06-Mar-2024 | 38.7 KiB | 1,185 | 825 | |
bridge_mdb_host.sh | D | 06-Mar-2024 | 1.7 KiB | 104 | 70 | |
bridge_mdb_max.sh | D | 06-Mar-2024 | 30 KiB | 1,348 | 1,013 | |
bridge_mdb_port_down.sh | D | 06-Mar-2024 | 2.2 KiB | 119 | 80 | |
bridge_mld.sh | D | 06-Mar-2024 | 16.2 KiB | 565 | 412 | |
bridge_port_isolation.sh | D | 06-Mar-2024 | 2.3 KiB | 152 | 112 | |
bridge_sticky_fdb.sh | D | 06-Mar-2024 | 1.1 KiB | 70 | 52 | |
bridge_vlan_aware.sh | D | 06-Mar-2024 | 2.5 KiB | 153 | 105 | |
bridge_vlan_mcast.sh | D | 06-Mar-2024 | 16.7 KiB | 547 | 442 | |
bridge_vlan_unaware.sh | D | 06-Mar-2024 | 1.2 KiB | 106 | 76 | |
config | D | 06-Mar-2024 | 417 | 20 | 19 | |
custom_multipath_hash.sh | D | 06-Mar-2024 | 9.8 KiB | 373 | 245 | |
devlink_lib.sh | D | 06-Mar-2024 | 12.8 KiB | 597 | 447 | |
dual_vxlan_bridge.sh | D | 06-Mar-2024 | 11.2 KiB | 368 | 223 | |
ethtool.sh | D | 06-Mar-2024 | 6.6 KiB | 302 | 213 | |
ethtool_extended_state.sh | D | 06-Mar-2024 | 2.1 KiB | 118 | 82 | |
ethtool_lib.sh | D | 06-Mar-2024 | 2.7 KiB | 121 | 92 | |
ethtool_mm.sh | D | 06-Mar-2024 | 6.3 KiB | 297 | 202 | |
fib_offload_lib.sh | D | 06-Mar-2024 | 24.6 KiB | 874 | 600 | |
forwarding.config.sample | D | 06-Mar-2024 | 1.4 KiB | 52 | 24 | |
gre_custom_multipath_hash.sh | D | 06-Mar-2024 | 12.5 KiB | 465 | 295 | |
gre_inner_v4_multipath.sh | D | 06-Mar-2024 | 7.5 KiB | 306 | 182 | |
gre_inner_v6_multipath.sh | D | 06-Mar-2024 | 7.7 KiB | 307 | 183 | |
gre_multipath.sh | D | 06-Mar-2024 | 6.3 KiB | 258 | 157 | |
gre_multipath_nh.sh | D | 06-Mar-2024 | 9.1 KiB | 357 | 230 | |
gre_multipath_nh_res.sh | D | 06-Mar-2024 | 9.3 KiB | 362 | 235 | |
hw_stats_l3.sh | D | 06-Mar-2024 | 7.5 KiB | 341 | 252 | |
hw_stats_l3_gre.sh | D | 06-Mar-2024 | 1.7 KiB | 112 | 77 | |
ip6_forward_instats_vrf.sh | D | 06-Mar-2024 | 3 KiB | 175 | 129 | |
ip6gre_custom_multipath_hash.sh | D | 06-Mar-2024 | 12.7 KiB | 467 | 297 | |
ip6gre_flat.sh | D | 06-Mar-2024 | 876 | 66 | 46 | |
ip6gre_flat_key.sh | D | 06-Mar-2024 | 907 | 66 | 46 | |
ip6gre_flat_keys.sh | D | 06-Mar-2024 | 944 | 66 | 46 | |
ip6gre_hier.sh | D | 06-Mar-2024 | 937 | 66 | 46 | |
ip6gre_hier_key.sh | D | 06-Mar-2024 | 969 | 66 | 46 | |
ip6gre_hier_keys.sh | D | 06-Mar-2024 | 1,003 | 66 | 46 | |
ip6gre_inner_v4_multipath.sh | D | 06-Mar-2024 | 7.8 KiB | 305 | 182 | |
ip6gre_inner_v6_multipath.sh | D | 06-Mar-2024 | 7.9 KiB | 306 | 183 | |
ip6gre_lib.sh | D | 06-Mar-2024 | 13.9 KiB | 439 | 217 | |
ipip_flat_gre.sh | D | 06-Mar-2024 | 838 | 64 | 43 | |
ipip_flat_gre_key.sh | D | 06-Mar-2024 | 860 | 64 | 43 | |
ipip_flat_gre_keys.sh | D | 06-Mar-2024 | 886 | 64 | 43 | |
ipip_hier_gre.sh | D | 06-Mar-2024 | 887 | 64 | 43 | |
ipip_hier_gre_key.sh | D | 06-Mar-2024 | 910 | 64 | 43 | |
ipip_hier_gre_keys.sh | D | 06-Mar-2024 | 938 | 64 | 43 | |
ipip_lib.sh | D | 06-Mar-2024 | 8.4 KiB | 350 | 158 | |
lib.sh | D | 06-Mar-2024 | 38.3 KiB | 1,986 | 1,541 | |
local_termination.sh | D | 06-Mar-2024 | 6.1 KiB | 300 | 223 | |
loopback.sh | D | 06-Mar-2024 | 1.6 KiB | 103 | 69 | |
mirror_gre.sh | D | 06-Mar-2024 | 3.3 KiB | 161 | 113 | |
mirror_gre_bound.sh | D | 06-Mar-2024 | 5.8 KiB | 228 | 131 | |
mirror_gre_bridge_1d.sh | D | 06-Mar-2024 | 4.4 KiB | 138 | 73 | |
mirror_gre_bridge_1d_vlan.sh | D | 06-Mar-2024 | 2.7 KiB | 134 | 91 | |
mirror_gre_bridge_1q.sh | D | 06-Mar-2024 | 4.3 KiB | 134 | 72 | |
mirror_gre_bridge_1q_lag.sh | D | 06-Mar-2024 | 7.3 KiB | 295 | 192 | |
mirror_gre_changes.sh | D | 06-Mar-2024 | 5.7 KiB | 274 | 194 | |
mirror_gre_flower.sh | D | 06-Mar-2024 | 2.8 KiB | 138 | 94 | |
mirror_gre_lag_lacp.sh | D | 06-Mar-2024 | 7.3 KiB | 286 | 183 | |
mirror_gre_lib.sh | D | 06-Mar-2024 | 2.5 KiB | 131 | 98 | |
mirror_gre_neigh.sh | D | 06-Mar-2024 | 2.3 KiB | 116 | 79 | |
mirror_gre_nh.sh | D | 06-Mar-2024 | 2.9 KiB | 132 | 85 | |
mirror_gre_topo_lib.sh | D | 06-Mar-2024 | 3.4 KiB | 95 | 45 | |
mirror_gre_vlan.sh | D | 06-Mar-2024 | 1.7 KiB | 93 | 63 | |
mirror_gre_vlan_bridge_1q.sh | D | 06-Mar-2024 | 9 KiB | 349 | 226 | |
mirror_lib.sh | D | 06-Mar-2024 | 2.9 KiB | 150 | 119 | |
mirror_topo_lib.sh | D | 06-Mar-2024 | 2.7 KiB | 103 | 60 | |
mirror_vlan.sh | D | 06-Mar-2024 | 2.3 KiB | 132 | 93 | |
no_forwarding.sh | D | 06-Mar-2024 | 5.5 KiB | 262 | 188 | |
pedit_dsfield.sh | D | 06-Mar-2024 | 6.7 KiB | 314 | 236 | |
pedit_ip.sh | D | 06-Mar-2024 | 4.4 KiB | 202 | 144 | |
pedit_l4port.sh | D | 06-Mar-2024 | 4.5 KiB | 201 | 144 | |
q_in_vni.sh | D | 06-Mar-2024 | 10.7 KiB | 349 | 214 | |
q_in_vni_ipv6.sh | D | 06-Mar-2024 | 10.9 KiB | 348 | 213 | |
router.sh | D | 06-Mar-2024 | 7.3 KiB | 341 | 228 | |
router_bridge.sh | D | 06-Mar-2024 | 4 KiB | 191 | 132 | |
router_bridge_1d.sh | D | 06-Mar-2024 | 5.1 KiB | 186 | 126 | |
router_bridge_1d_lag.sh | D | 06-Mar-2024 | 9.3 KiB | 409 | 270 | |
router_bridge_lag.sh | D | 06-Mar-2024 | 6.8 KiB | 324 | 241 | |
router_bridge_pvid_vlan_upper.sh | D | 06-Mar-2024 | 3.5 KiB | 156 | 100 | |
router_bridge_vlan.sh | D | 06-Mar-2024 | 5.5 KiB | 225 | 152 | |
router_bridge_vlan_upper.sh | D | 06-Mar-2024 | 3.9 KiB | 170 | 111 | |
router_bridge_vlan_upper_pvid.sh | D | 06-Mar-2024 | 3.7 KiB | 172 | 114 | |
router_broadcast.sh | D | 06-Mar-2024 | 5 KiB | 238 | 179 | |
router_mpath_nh.sh | D | 06-Mar-2024 | 9.6 KiB | 426 | 309 | |
router_mpath_nh_res.sh | D | 06-Mar-2024 | 10 KiB | 401 | 294 | |
router_multicast.sh | D | 06-Mar-2024 | 14.6 KiB | 507 | 324 | |
router_multipath.sh | D | 06-Mar-2024 | 8.3 KiB | 343 | 248 | |
router_nh.sh | D | 06-Mar-2024 | 2.6 KiB | 161 | 112 | |
router_vid_1.sh | D | 06-Mar-2024 | 3.5 KiB | 161 | 98 | |
sch_ets.sh | D | 06-Mar-2024 | 781 | 48 | 34 | |
sch_ets_core.sh | D | 06-Mar-2024 | 7.3 KiB | 301 | 187 | |
sch_ets_tests.sh | D | 06-Mar-2024 | 3.9 KiB | 224 | 175 | |
sch_red.sh | D | 06-Mar-2024 | 11.1 KiB | 494 | 342 | |
sch_tbf_core.sh | D | 06-Mar-2024 | 5 KiB | 234 | 142 | |
sch_tbf_ets.sh | D | 06-Mar-2024 | 118 | 7 | 3 | |
sch_tbf_etsprio.sh | D | 06-Mar-2024 | 1.4 KiB | 72 | 50 | |
sch_tbf_prio.sh | D | 06-Mar-2024 | 118 | 7 | 3 | |
sch_tbf_root.sh | D | 06-Mar-2024 | 489 | 38 | 26 | |
settings | D | 06-Mar-2024 | 10 | 2 | 1 | |
skbedit_priority.sh | D | 06-Mar-2024 | 3.9 KiB | 173 | 116 | |
tc_actions.sh | D | 06-Mar-2024 | 7.9 KiB | 319 | 238 | |
tc_chains.sh | D | 06-Mar-2024 | 4.8 KiB | 206 | 148 | |
tc_common.sh | D | 06-Mar-2024 | 721 | 37 | 25 | |
tc_flower.sh | D | 06-Mar-2024 | 21.2 KiB | 718 | 492 | |
tc_flower_cfm.sh | D | 06-Mar-2024 | 4.9 KiB | 207 | 152 | |
tc_flower_l2_miss.sh | D | 06-Mar-2024 | 9.1 KiB | 358 | 240 | |
tc_flower_port_range.sh | D | 06-Mar-2024 | 5.9 KiB | 229 | 174 | |
tc_flower_router.sh | D | 06-Mar-2024 | 3 KiB | 173 | 123 | |
tc_mpls_l2vpn.sh | D | 06-Mar-2024 | 5 KiB | 193 | 111 | |
tc_police.sh | D | 06-Mar-2024 | 11.8 KiB | 442 | 292 | |
tc_shblocks.sh | D | 06-Mar-2024 | 2.7 KiB | 153 | 108 | |
tc_tunnel_key.sh | D | 06-Mar-2024 | 3.8 KiB | 165 | 127 | |
tc_vlan_modify.sh | D | 06-Mar-2024 | 3.2 KiB | 165 | 116 | |
tsn_lib.sh | D | 06-Mar-2024 | 5.5 KiB | 250 | 190 | |
vxlan_asymmetric.sh | D | 06-Mar-2024 | 17.6 KiB | 578 | 354 | |
vxlan_asymmetric_ipv6.sh | D | 06-Mar-2024 | 16 KiB | 505 | 312 | |
vxlan_bridge_1d.sh | D | 06-Mar-2024 | 20.4 KiB | 798 | 552 | |
vxlan_bridge_1d_ipv6.sh | D | 06-Mar-2024 | 21.3 KiB | 805 | 569 | |
vxlan_bridge_1d_port_8472.sh | D | 06-Mar-2024 | 172 | 11 | 5 | |
vxlan_bridge_1d_port_8472_ipv6.sh | D | 06-Mar-2024 | 188 | 12 | 6 | |
vxlan_bridge_1q.sh | D | 06-Mar-2024 | 22.9 KiB | 841 | 540 | |
vxlan_bridge_1q_ipv6.sh | D | 06-Mar-2024 | 24.3 KiB | 838 | 547 | |
vxlan_bridge_1q_port_8472.sh | D | 06-Mar-2024 | 172 | 11 | 5 | |
vxlan_bridge_1q_port_8472_ipv6.sh | D | 06-Mar-2024 | 188 | 12 | 6 | |
vxlan_symmetric.sh | D | 06-Mar-2024 | 18.1 KiB | 562 | 346 | |
vxlan_symmetric_ipv6.sh | D | 06-Mar-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