openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

packetperf.soc (5192B)


      1 #
      2 # 
      3 # This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4 # 
      5 # Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6 #
      7 # The file runs the packet TX tests using the BCM API support, for a variety
      8 # of parameters.
      9 #
     10 
     11 #
     12 # Number of packets of each size sent for measurement. 
     13 # 1000 packets seems to provide reliable numbers.
     14 #
     15 local count	1000
     16 
     17 #
     18 # Egress ports to send packets out if PBM is specified (all ethernet by
     19 # default).
     20 #
     21 local pbm	e
     22 
     23 #
     24 # Number of outstanding operations the test will allow. 
     25 #
     26 local op	10
     27 
     28 if $?drac \
     29 'local cacheon  "cache +vlan +port +l2mc_table"; \
     30  local cacheoff "cache -vlan -port -l2mc_table"'
     31 
     32 if !$?drac \
     33 'local cacheon  "cache +qvlan +ptable +mcast"; \
     34  local cacheoff "cache -qvlan -ptable -mcast"'
     35 
     36 if $?herc "echo Not supported on hercules; exit"
     37 
     38 $cacheoff
     39 
     40 echo; echo; echo;
     41 echo "Packet TX Performance test: Unknown unicast, Tagged, Table cache disabled"
     42 tr 40 DestMac=UCMiss Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     43 echo; echo; echo;
     44 echo "Packet TX Performance test: Known unicast, Tagged, Table cache disabled"
     45 tr 40 DestMac=UCHit Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     46 echo; echo; echo;
     47 echo "Packet TX Performance test: Unknown Multicast, Tagged, Table cache disabled"
     48 tr 40 DestMac=MCMiss Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     49 echo; echo; echo;
     50 echo "Packet TX Performance test: Known Multicast, Tagged, Table cache disabled"
     51 tr 40 DestMac=MCHit Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     52 echo; echo; echo;
     53 echo "Packet TX Performance test: Broadcast, Tagged, Table cache disabled"
     54 tr 40 DestMac=Bcast Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     55 echo; echo; echo;
     56 echo "Packet TX Performance test: PBM, Tagged, Table cache disabled"
     57 tr 40 DestMac=PBM Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op \
     58 	pbm=$pbm upbm=0x0
     59 echo; echo; echo;
     60 
     61 $cacheon
     62 
     63 echo "Packet TX Performance test: Unknown unicast, Tagged, Table cache enabled"
     64 tr 40 DestMac=UCMiss Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     65 echo; echo; echo;
     66 echo "Packet TX Performance test: Known unicast, Tagged, Table cache enabled"
     67 tr 40 DestMac=UCHIT Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     68 echo; echo; echo;
     69 echo "Packet TX Performance test: Unknown Multicast, Tagged, Table cache enabled"
     70 tr 40 DestMac=MCMiss Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     71 echo; echo; echo;
     72 echo "Packet TX Performance test: Known Multicast, Tagged, Table cache enabled"
     73 tr 40 DestMac=MCHit Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     74 echo; echo; echo;
     75 echo "Packet TX Performance test: Broadcast, Tagged, Table cache enabled"
     76 tr 40 DestMac=Bcast Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     77 echo; echo; echo;
     78 echo "Packet TX Performance test: PBM, Tagged, Table cache enabled"
     79 tr 40 DestMac=PBM Tagged=TRUE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op \
     80 	pbm=$pbm upbm=0x0
     81 
     82 $cacheoff
     83 
     84 echo; echo; echo;
     85 echo "Packet TX Performance test: Unknown unicast, Untagged, Table cache disabled"
     86 tr 40 DestMac=UCMiss Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     87 echo; echo; echo;
     88 echo "Packet TX Performance test: Known unicast, Untagged, Table cache disabled"
     89 tr 40 DestMac=UCHit Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     90 echo; echo; echo;
     91 echo "Packet TX Performance test: Unknown Multicast, Untagged, Table cache disabled"
     92 tr 40 DestMac=MCMiss Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     93 echo; echo; echo;
     94 echo "Packet TX Performance test: Known Multicast, Untagged, Table cache disabled"
     95 tr 40 DestMac=MCHit Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     96 echo; echo; echo;
     97 echo "Packet TX Performance test: Broadcast, Untagged, Table cache disabled"
     98 tr 40 DestMac=Bcast Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
     99 echo; echo; echo;
    100 echo "Packet TX Performance test: PBM, Untagged, Table cache disabled"
    101 tr 40 DestMac=PBM Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op \
    102 	pbm=$pbm upbm=0x0
    103 echo; echo; echo;
    104 
    105 $cacheon
    106 
    107 echo "Packet TX Performance test: Unknown unicast, Untagged, Table cache enabled"
    108 tr 40 DestMac=UCMiss Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
    109 echo; echo; echo;
    110 echo "Packet TX Performance test: Known unicast, Untagged, Table cache enabled"
    111 tr 40 DestMac=UCHIT Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
    112 echo; echo; echo;
    113 echo "Packet TX Performance test: Unknown Multicast, Untagged, Table cache enabled"
    114 tr 40 DestMac=MCMiss Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
    115 echo; echo; echo;
    116 echo "Packet TX Performance test: Known Multicast, Untagged, Table cache enabled"
    117 tr 40 DestMac=MCHit Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
    118 echo; echo; echo;
    119 echo "Packet TX Performance test: Broadcast, Untagged, Table cache enabled"
    120 tr 40 DestMac=Bcast Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op
    121 echo; echo; echo;
    122 echo "Packet TX Performance test: PBM, Untagged, Table cache enabled"
    123 tr 40 DestMac=PBM Tagged=FALSE vlanid=1 ls=64 le=1024 li=64 c=$count op=$op \
    124 	pbm=$pbm upbm=0x0
    125 
    126 $cacheoff
    127 
    128