[ab0c689] | 1 | @c |
---|
| 2 | @c Written by Eric Norum |
---|
| 3 | @c |
---|
| 4 | @c COPYRIGHT (c) 1988-1998. |
---|
| 5 | @c On-Line Applications Research Corporation (OAR). |
---|
| 6 | @c All rights reserved. |
---|
| 7 | @c |
---|
| 8 | @c $Id$ |
---|
| 9 | @c |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | @chapter Testing the Driver |
---|
| 13 | |
---|
| 14 | @section Preliminary Setup |
---|
| 15 | |
---|
| 16 | The network used to test the driver should include at least: |
---|
| 17 | |
---|
| 18 | @itemize @bullet |
---|
| 19 | |
---|
| 20 | @item The hardware on which the driver is to run. |
---|
| 21 | It makes testing much easier if you can run a debugger to control |
---|
| 22 | the operation of the target machine. |
---|
| 23 | |
---|
| 24 | @item An Ethernet network analyzer or a workstation with an |
---|
| 25 | `Ethernet snoop' program such as @code{ethersnoop} or |
---|
| 26 | @code{tcpdump}. |
---|
| 27 | |
---|
| 28 | @item A workstation. |
---|
| 29 | |
---|
| 30 | @end itemize |
---|
| 31 | |
---|
| 32 | During early debug, you should consider putting the target, workstation, |
---|
| 33 | and snooper on a small network by themselves. This offers a few |
---|
| 34 | advantages: |
---|
| 35 | |
---|
| 36 | @itemize @bullet |
---|
| 37 | |
---|
| 38 | @item There is less traffic to look at on the snooper and for the target |
---|
| 39 | to process while bringing the driver up. |
---|
| 40 | |
---|
| 41 | @item Any serious errors will impact only your small network not a building |
---|
| 42 | or campus network. You want to avoid causing any unnecessary problems. |
---|
| 43 | |
---|
| 44 | @item Test traffic is easier to repeatably generate. |
---|
| 45 | |
---|
| 46 | @item Performance measurements are not impacted by other systems on |
---|
| 47 | the network. |
---|
| 48 | |
---|
| 49 | @end itemize |
---|
| 50 | |
---|
| 51 | @section Driver basic operation |
---|
| 52 | |
---|
| 53 | The network demonstration program @code{netdemo} may be used for these tests. |
---|
| 54 | |
---|
| 55 | @itemize @bullet |
---|
| 56 | |
---|
| 57 | @item Edit @code{networkconfig.h} to reflect the values for your network. |
---|
| 58 | |
---|
| 59 | @item Start with @code{RTEMS_USE_BOOTP} not defined. |
---|
| 60 | |
---|
| 61 | @item Edit @code{networkconfig.h} to configure the driver |
---|
| 62 | with an |
---|
| 63 | explicit Ethernet and Internet address and with reception of |
---|
| 64 | broadcast packets disabled: |
---|
| 65 | |
---|
| 66 | Verify that the program continues to run once the driver has been attached. |
---|
| 67 | |
---|
| 68 | @item Issue a @samp{u} command to send UDP |
---|
| 69 | packets to the `discard' port. |
---|
| 70 | Verify that the packets appear on the network. |
---|
| 71 | |
---|
| 72 | @item Issue a @samp{s} command to print the network and driver statistics. |
---|
| 73 | |
---|
| 74 | @item On a workstation, add a static route to the target system. |
---|
| 75 | |
---|
| 76 | @item On that same workstation try to `ping' the target system. |
---|
| 77 | Verify that the ICMP echo request and reply packets appear on the net. |
---|
| 78 | |
---|
| 79 | @item Remove the static route to the target system. |
---|
| 80 | Modify @code{networkconfig.h} to attach the driver |
---|
| 81 | with reception of broadcast packets enabled. |
---|
| 82 | Try to `ping' the target system again. |
---|
| 83 | Verify that ARP request/reply and ICMP echo request/reply packets appear |
---|
| 84 | on the net. |
---|
| 85 | |
---|
| 86 | @item Issue a @samp{t} command to send TCP |
---|
| 87 | packets to the `discard' port. |
---|
| 88 | Verify that the packets appear on the network. |
---|
| 89 | |
---|
| 90 | @item Issue a @samp{s} command to print the network and driver statistics. |
---|
| 91 | |
---|
| 92 | @item Verify that you can telnet to ports 24742 |
---|
| 93 | and 24743 on the target system from one or more |
---|
| 94 | workstations on your network. |
---|
| 95 | |
---|
| 96 | @end itemize |
---|
| 97 | |
---|
[df4eb76e] | 98 | @section BOOTP/DHCP operation |
---|
[ab0c689] | 99 | |
---|
[df4eb76e] | 100 | Set up a BOOTP/DHCP server on the network. |
---|
[ab0c689] | 101 | Set define @code{RTEMS USE_BOOT} in @code{networkconfig.h}. |
---|
| 102 | Run the @code{netdemo} test program. |
---|
[df4eb76e] | 103 | Verify that the target system configures itself from the BOOTP/DHCP server and |
---|
[ab0c689] | 104 | that all the above tests succeed. |
---|
| 105 | |
---|
| 106 | @section Stress Tests |
---|
| 107 | |
---|
| 108 | Once the driver passes the tests described in the previous section it should |
---|
| 109 | be subjected to conditions which exercise it more |
---|
| 110 | thoroughly and which test its error handling routines. |
---|
| 111 | |
---|
| 112 | @subsection Giant packets |
---|
| 113 | |
---|
| 114 | @itemize @bullet |
---|
| 115 | @item Recompile the driver with @code{MAXIMUM_FRAME_SIZE} set to |
---|
| 116 | a smaller value, say 514. |
---|
| 117 | |
---|
| 118 | @item `Ping' the driver from another workstation and verify |
---|
| 119 | that frames larger than 514 bytes are correctly rejected. |
---|
| 120 | |
---|
| 121 | @item Recompile the driver with @code{MAXIMUM_FRAME_SIZE} restored to 1518. |
---|
| 122 | @end itemize |
---|
| 123 | |
---|
| 124 | @subsection Resource Exhaustion |
---|
| 125 | |
---|
| 126 | @itemize @bullet |
---|
| 127 | @item Edit @code{networkconfig.h} |
---|
| 128 | so that the driver is configured with just two receive and transmit descriptors. |
---|
| 129 | |
---|
| 130 | @item Compile and run the @code{netdemo} program. |
---|
| 131 | |
---|
| 132 | @item Verify that the program operates properly and that you can |
---|
| 133 | still telnet to both the ports. |
---|
| 134 | |
---|
| 135 | @item Display the driver statistics (Console `@code{s}' command or telnet |
---|
| 136 | `control-G' character) and verify that: |
---|
| 137 | |
---|
| 138 | @enumerate |
---|
| 139 | |
---|
| 140 | @item The number of transmit interrupts is non-zero. |
---|
| 141 | This indicates that all transmit descriptors have been in use at some time. |
---|
| 142 | |
---|
| 143 | @item The number of missed packets is non-zero. |
---|
| 144 | This indicates that all receive descriptors have been in use at some time. |
---|
| 145 | |
---|
| 146 | @end enumerate |
---|
| 147 | |
---|
| 148 | @end itemize |
---|
| 149 | |
---|
| 150 | @subsection Cable Faults |
---|
| 151 | |
---|
| 152 | @itemize @bullet |
---|
| 153 | @item Run the @code{netdemo} program. |
---|
| 154 | |
---|
| 155 | @item Issue a `@code{u}' console command to make the target machine transmit |
---|
| 156 | a bunch of UDP packets. |
---|
| 157 | |
---|
| 158 | @item While the packets are being transmitted, disconnect and reconnect the |
---|
| 159 | network cable. |
---|
| 160 | |
---|
| 161 | @item Display the network statistics and verify that the driver has |
---|
| 162 | detected the loss of carrier. |
---|
| 163 | |
---|
| 164 | @item Verify that you can still telnet to both ports on the target machine. |
---|
| 165 | |
---|
| 166 | @end itemize |
---|
| 167 | |
---|
| 168 | @subsection Throughput |
---|
| 169 | |
---|
| 170 | Run the @code{ttcp} network benchmark program. |
---|
| 171 | Transfer large amounts of data (100's of megabytes) to and from the target |
---|
| 172 | system. |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | |
---|