swirl.soc (9657B)
1 # 2 # This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 # 4 # Copyright 2007-2019 Broadcom Inc. All rights reserved. 5 # 6 # Swirl Setup Script 7 # 8 # Configure swirling of packets on consecutive pairs of ports 9 # Used for EMI testing under full packet TX/RX load 10 # NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE 11 # Ports MUST be configured in external loopback mode with ports 12 # 1 connected to 2, 3 connected to 4, 5-6,7-8, and so on. 13 # 14 # Once this script has been executed, use the commands: 15 # show counters (or g <counter>.fe) to view statistics. 16 # Under normal operating mode, you can expect to see TPKT and RPKT 17 # perpetually incrementing. 18 # 19 # Init chip 20 socrc 21 22 # Init ports (100 FDX) 23 port all AN=T AF=F SP=1000 FD=True TPAU=F RPAU=F LS=SW LRN=5 DISC=None VF=F PRIO=0 PFM=0 PHYM=Auto E=T 24 25 # Hardwire EPC_LINK so all ports forward 26 s epc_link 0xffffffff 27 28 # Clear stats 29 clear counters 30 31 # Initialize vtable to zero 32 clear vtable 33 34 #Ports 0-1 configuration 35 modify ptable 0 1 vlan_tag=1 port_bitmap=0x3 ut_port_bitmap=0x3 36 modify ptable 1 1 vlan_tag=2 port_bitmap=0x3 ut_port_bitmap=0x3 37 insert vtable vlan_tag=1 port_bitmap=0x3 ut_port_bitmap=0x3 38 insert vtable vlan_tag=2 port_bitmap=0x3 ut_port_bitmap=0x3 39 insert arl mac_addr=1 vlan_tag=2 port=0 40 insert arl mac_addr=2 vlan_tag=1 port=1 41 #Packet coming in on p0 and going out on p1 will loop infinitely 42 tx 1 PBM=0x2 UBM=0x2 L=68 VL=1 P=0x12345678 PI=1 SM=00:00:00:00:00:01 SMI=0 DM=00:00:00:00:00:02 DMI=0 COS=0 CRC=Recompute 43 # Packet coming in on p1 and out on p0 will give us Full DupleX (0-1) 44 tx 1 PBM=0x1 UBM=0x1 L=68 VL=1 P=0x12345678 PI=1 SM=00:00:00:00:00:02 SMI=0 DM=00:00:00:00:00:01 DMI=0 COS=0 CRC=Recompute 45 46 # Ports 2-3 configuration 47 modify ptable 2 1 vlan_tag=3 port_bitmap=0xc ut_port_bitmap=0xc 48 modify ptable 3 1 vlan_tag=4 port_bitmap=0xc ut_port_bitmap=0xc 49 insert vtable vlan_tag=3 port_bitmap=0xc ut_port_bitmap=0xc 50 insert vtable vlan_tag=4 port_bitmap=0xc ut_port_bitmap=0xc 51 insert arl mac_addr=3 vlan_tag=4 port=2 52 insert arl mac_addr=4 vlan_tag=3 port=3 53 # Come in on p2 and out on p3 54 tx 1 PBM=0x8 UBM=0x8 L=68 VL=3 P=0x12345678 PI=1 SM=00:00:00:00:00:03 SMI=0 DM=00:00:00:00:00:04 DMI=0 COS=0 CRC=Recompute 55 # FDX (2-3) 56 tx 1 PBM=0x4 UBM=0x4 L=68 VL=3 P=0x12345678 PI=1 SM=00:00:00:00:00:04 SMI=0 DM=00:00:00:00:00:03 DMI=0 COS=0 CRC=Recompute 57 58 # Ports 4-5 configuration 59 modify ptable 4 1 vlan_tag=5 port_bitmap=0x30 ut_port_bitmap=0x30 60 modify ptable 5 1 vlan_tag=6 port_bitmap=0x30 ut_port_bitmap=0x30 61 insert vtable vlan_tag=5 port_bitmap=0x30 ut_port_bitmap=0x30 62 insert vtable vlan_tag=6 port_bitmap=0x30 ut_port_bitmap=0x30 63 insert arl mac_addr=5 vlan_tag=6 port=4 64 insert arl mac_addr=6 vlan_tag=5 port=5 65 # Come in on p4 and out on p5 66 tx 1 PBM=0x20 UBM=0x20 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:05 SMI=0 DM=00:00:00:00:00:06 DMI=0 COS=0 CRC=Recompute 67 # FDX (2-3) 68 tx 1 PBM=0x10 UBM=0x10 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:06 SMI=0 DM=00:00:00:00:00:05 DMI=0 COS=0 CRC=Recompute 69 70 # Ports 6-7 configuration 71 modify ptable 6 1 vlan_tag=7 port_bitmap=0xc0 ut_port_bitmap=0xc0 72 modify ptable 7 1 vlan_tag=8 port_bitmap=0xc0 ut_port_bitmap=0xc0 73 insert vtable vlan_tag=7 port_bitmap=0xc0 ut_port_bitmap=0xc0 74 insert vtable vlan_tag=8 port_bitmap=0xc0 ut_port_bitmap=0xc0 75 insert arl mac_addr=7 vlan_tag=8 port=6 76 insert arl mac_addr=8 vlan_tag=7 port=7 77 # Come in on p6 and out on p7 78 tx 1 PBM=0x80 UBM=0x80 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:07 SMI=0 DM=00:00:00:00:00:08 DMI=0 COS=0 CRC=Recompute 79 # FDX (6-7) 80 tx 1 PBM=0x40 UBM=0x40 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:08 SMI=0 DM=00:00:00:00:00:07 DMI=0 COS=0 CRC=Recompute 81 82 # Ports 8-9 configuration 83 modify ptable 8 1 vlan_tag=9 port_bitmap=0x300 ut_port_bitmap=0x300 84 modify ptable 9 1 vlan_tag=10 port_bitmap=0x300 ut_port_bitmap=0x300 85 insert vtable vlan_tag=9 port_bitmap=0x300 ut_port_bitmap=0x300 86 insert vtable vlan_tag=10 port_bitmap=0x300 ut_port_bitmap=0x300 87 insert arl mac_addr=9 vlan_tag=10 port=8 88 insert arl mac_addr=10 vlan_tag=9 port=9 89 # Come in on p8 and out on p9 90 tx 1 PBM=0x200 UBM=0x200 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:09 SMI=0 DM=00:00:00:00:00:0a DMI=0 COS=0 CRC=Recompute 91 # FDX (8-9) 92 tx 1 PBM=0x100 UBM=0x100 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:0a SMI=0 DM=00:00:00:00:00:09 DMI=0 COS=0 CRC=Recompute 93 94 # Ports 10-11 configuration 95 modify ptable 10 1 vlan_tag=11 port_bitmap=0xc00 ut_port_bitmap=0xc00 96 modify ptable 11 1 vlan_tag=12 port_bitmap=0xc00 ut_port_bitmap=0xc00 97 insert vtable vlan_tag=11 port_bitmap=0xc00 ut_port_bitmap=0xc00 98 insert vtable vlan_tag=12 port_bitmap=0xc00 ut_port_bitmap=0xc00 99 insert arl mac_addr=11 vlan_tag=12 port=10 100 insert arl mac_addr=12 vlan_tag=11 port=11 101 # Come in on p10 and out on p11 102 tx 1 PBM=0x800 UBM=0x800 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:0b SMI=0 DM=00:00:00:00:00:0c DMI=0 COS=0 CRC=Recompute 103 # FDX (10-11) 104 tx 1 PBM=0x400 UBM=0x400 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:0c SMI=0 DM=00:00:00:00:00:0b DMI=0 COS=0 CRC=Recompute 105 106 # Ports 12-13 configuration 107 modify ptable 12 1 vlan_tag=13 port_bitmap=0x3000 ut_port_bitmap=0x3000 108 modify ptable 13 1 vlan_tag=14 port_bitmap=0x3000 ut_port_bitmap=0x3000 109 insert vtable vlan_tag=13 port_bitmap=0x3000 ut_port_bitmap=0x3000 110 insert vtable vlan_tag=14 port_bitmap=0x3000 ut_port_bitmap=0x3000 111 insert arl mac_addr=13 vlan_tag=14 port=12 112 insert arl mac_addr=14 vlan_tag=13 port=13 113 # Come in on p12 and out on p13 114 tx 1 PBM=0x2000 UBM=0x2000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:0d SMI=0 DM=00:00:00:00:00:0e DMI=0 COS=0 CRC=Recompute 115 # FDX (12-13) 116 tx 1 PBM=0x1000 UBM=0x1000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:0e SMI=0 DM=00:00:00:00:00:0d DMI=0 COS=0 CRC=Recompute 117 118 # Ports 14-15 configuration 119 modify ptable 14 1 vlan_tag=15 port_bitmap=0xc000 ut_port_bitmap=0xc000 120 modify ptable 15 1 vlan_tag=16 port_bitmap=0xc000 ut_port_bitmap=0xc000 121 insert vtable vlan_tag=15 port_bitmap=0xc000 ut_port_bitmap=0xc000 122 insert vtable vlan_tag=16 port_bitmap=0xc000 ut_port_bitmap=0xc000 123 insert arl mac_addr=15 vlan_tag=16 port=14 124 insert arl mac_addr=16 vlan_tag=15 port=15 125 # Come in on p14 and out on p15 126 tx 1 PBM=0x8000 UBM=0x8000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:0f SMI=0 DM=00:00:00:00:00:10 DMI=0 COS=0 CRC=Recompute 127 # FDX (14-15) 128 tx 1 PBM=0x4000 UBM=0x4000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:10 SMI=0 DM=00:00:00:00:00:0f DMI=0 COS=0 CRC=Recompute 129 130 # Ports 16-17 configuration 131 modify ptable 16 1 vlan_tag=17 port_bitmap=0x30000 ut_port_bitmap=0x30000 132 modify ptable 17 1 vlan_tag=18 port_bitmap=0x30000 ut_port_bitmap=0x30000 133 insert vtable vlan_tag=17 port_bitmap=0x30000 ut_port_bitmap=0x30000 134 insert vtable vlan_tag=18 port_bitmap=0x30000 ut_port_bitmap=0x30000 135 insert arl mac_addr=17 vlan_tag=18 port=16 136 insert arl mac_addr=18 vlan_tag=17 port=17 137 # Come in on p16 and out on p17 138 tx 1 PBM=0x20000 UBM=0x20000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:11 SMI=0 DM=00:00:00:00:00:12 DMI=0 COS=0 CRC=Recompute 139 # FDX (16-17) 140 tx 1 PBM=0x10000 UBM=0x10000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:12 SMI=0 DM=00:00:00:00:00:11 DMI=0 COS=0 CRC=Recompute 141 142 # Ports 18-19 configuration 143 modify ptable 18 1 vlan_tag=19 port_bitmap=0xc0000 ut_port_bitmap=0xc0000 144 modify ptable 19 1 vlan_tag=20 port_bitmap=0xc0000 ut_port_bitmap=0xc0000 145 insert vtable vlan_tag=19 port_bitmap=0xc0000 ut_port_bitmap=0xc0000 146 insert vtable vlan_tag=20 port_bitmap=0xc0000 ut_port_bitmap=0xc0000 147 insert arl mac_addr=19 vlan_tag=20 port=18 148 insert arl mac_addr=20 vlan_tag=19 port=19 149 # Come in on p18 and out on p19 150 tx 1 PBM=0x80000 UBM=0x80000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:13 SMI=0 DM=00:00:00:00:00:14 DMI=0 COS=0 CRC=Recompute 151 # FDX (18-19) 152 tx 1 PBM=0x40000 UBM=0x40000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:14 SMI=0 DM=00:00:00:00:00:13 DMI=0 COS=0 CRC=Recompute 153 154 # Ports 20-21 configuration 155 modify ptable 20 1 vlan_tag=21 port_bitmap=0x300000 ut_port_bitmap=0x300000 156 modify ptable 21 1 vlan_tag=22 port_bitmap=0x300000 ut_port_bitmap=0x300000 157 insert vtable vlan_tag=21 port_bitmap=0x300000 ut_port_bitmap=0x300000 158 insert vtable vlan_tag=22 port_bitmap=0x300000 ut_port_bitmap=0x300000 159 insert arl mac_addr=21 vlan_tag=22 port=20 160 insert arl mac_addr=22 vlan_tag=21 port=21 161 # Come in on p20 and out on p21 162 tx 1 PBM=0x200000 UBM=0x200000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:15 SMI=0 DM=00:00:00:00:00:16 DMI=0 COS=0 CRC=Recompute 163 # FDX (20-21) 164 tx 1 PBM=0x100000 UBM=0x100000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:16 SMI=0 DM=00:00:00:00:00:15 DMI=0 COS=0 CRC=Recompute 165 166 # Ports 22-23 configuration 167 modify ptable 22 1 vlan_tag=23 port_bitmap=0xc00000 ut_port_bitmap=0xc00000 168 modify ptable 23 1 vlan_tag=24 port_bitmap=0xc00000 ut_port_bitmap=0xc00000 169 insert vtable vlan_tag=23 port_bitmap=0xc00000 ut_port_bitmap=0xc00000 170 insert vtable vlan_tag=24 port_bitmap=0xc00000 ut_port_bitmap=0xc00000 171 insert arl mac_addr=23 vlan_tag=24 port=22 172 insert arl mac_addr=24 vlan_tag=23 port=23 173 # Come in on p20 and out on p21 174 tx 1 PBM=0x800000 UBM=0x800000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:17 SMI=0 DM=00:00:00:00:00:18 DMI=0 COS=0 CRC=Recompute 175 # FDX (20-21) 176 tx 1 PBM=0x400000 UBM=0x400000 L=68 VL=5 P=0x12345678 PI=1 SM=00:00:00:00:00:18 SMI=0 DM=00:00:00:00:00:17 DMI=0 COS=0 CRC=Recompute 177 178 echo "The LED lights should now be blinking indicating activity." 179 echo "The system will now attempt to detect a port failure " 180 echo "In the event that you see any output below, the ports " 181 echo "listed may have errors and should be verified." 182 statclear;loop 1200 "statdump same nz fe" 183 echo "Test done (note any errors and correct listed ports)" 184