|
@@ -119,6 +119,11 @@ int loopback_test ( struct net_device *sender, struct net_device *receiver,
|
119
|
119
|
ifstat ( sender );
|
120
|
120
|
ifstat ( receiver );
|
121
|
121
|
|
|
122
|
+ /* Freeze receive queue processing on the receiver, so that we
|
|
123
|
+ * can extract all received packets.
|
|
124
|
+ */
|
|
125
|
+ netdev_rx_freeze ( receiver );
|
|
126
|
+
|
122
|
127
|
/* Perform loopback test */
|
123
|
128
|
for ( successes = 0 ; ; successes++ ) {
|
124
|
129
|
|
|
@@ -155,8 +160,7 @@ int loopback_test ( struct net_device *sender, struct net_device *receiver,
|
155
|
160
|
goto done;
|
156
|
161
|
}
|
157
|
162
|
/* Poll network devices */
|
158
|
|
- netdev_poll ( sender );
|
159
|
|
- netdev_poll ( receiver );
|
|
163
|
+ net_poll();
|
160
|
164
|
} while ( ( iobuf = netdev_rx_dequeue ( receiver ) ) == NULL );
|
161
|
165
|
|
162
|
166
|
/* Check received packet */
|
|
@@ -203,6 +207,7 @@ int loopback_test ( struct net_device *sender, struct net_device *receiver,
|
203
|
207
|
done:
|
204
|
208
|
printf ( "\n");
|
205
|
209
|
free_iob ( iobuf );
|
|
210
|
+ netdev_rx_unfreeze ( receiver );
|
206
|
211
|
|
207
|
212
|
/* Dump final statistics */
|
208
|
213
|
ifstat ( sender );
|