5 Other Features
420
430
410
410
420
410
420
430
410
420
420
420
420
420
420
420
These differences should be roughly equivalent to the latency the DUT incurs on ethernet. The values are
positive if the latency values on port A are higher than on port b.
See the ”PTP Timestamps” section for details on the quality of the timestamps.
By default, 10000 samples are sent (depending on sender configuration), and the receiver reports ”Prob-
lems detected: no” only if all samples were included. If you see errors logged on the terminal, there is
probably some sort of problem due to packet drop or corruption.
5.10 Packet Injection
It is possible to manually inject new packets into the ethernet connection. As no actual network interface
is provided, OS mechanisms (such as sockets) cannot be used. Using the host tool is required.
The
inject
command provides this functionality. It is possible to send arbitrary ethernet packets, includ-
ing packets that are not spec-compliant. This is not a high speed send path – full ethernet bandwidth
cannot be reached. (Although you can instruct the command to repeat packets, in which case it will pro-
duce a high bandwidth stream of the same packet being repeated.)
Use
inject_stop
to disable the injector again. Use
hw_info
to check whether it’s currently enabled.
CRC errors can be injected. Degenerate packets (too short, IPG too low) can be created with the ”
raw
”
parameter. Low level physical layer coding errors can be generated with the ”
gen-error
” parameter (PHY
emits symbol error for a specific byte). The IPG can be controlled with the ”
gap
” parameter, which will set
the distance to other generated packets as well as packets that are normally transferred through the wire.
Since host tool v1.3, packet data can be read from files with ”
--file filename
”.
Since host tool v1.5, the ”
--bw-packets
” and ”
--bw-bytes
” parameters can be used to repeat the packets
at a specific bandwidth.
--bw-bytes
accepts ”kib” or ”mib” asd suffix for convenience. Using either of
the parameters overwrite the ”
gap
” parameter with a value needed to reach the specified bandwidth, and
”
num
” is set to
inf
. If the ”
num
” parameter passed by the user is not
1
(the default) or
inf
, or ”
loop-count
”
is used, the parameters are silently ignored. If the requested bandwidth cannot be achieved in theory, the
command fails. If there is other communication on the ethernet line, the actual bandwidth may be different.
If the ethernet speed mode changes, the command has to be run again to set the correct parameters. The
23