summaryrefslogtreecommitdiff
path: root/samples/bpf/tracex2_user.c
diff options
context:
space:
mode:
authorOng Boon Leong <boon.leong.ong@intel.com>2021-12-30 06:54:47 +0300
committerAlexei Starovoitov <ast@kernel.org>2022-01-06 04:53:24 +0300
commiteb68db45b747756c351ea84e9af55a69468d0549 (patch)
treee0a2dfd5ddbbdba66ee0228602aca766caed5b10 /samples/bpf/tracex2_user.c
parent8121e78932018df48758985e00651e16ff34ae5f (diff)
downloadlinux-eb68db45b747756c351ea84e9af55a69468d0549.tar.xz
samples/bpf: xdpsock: Add timestamp for Tx-only operation
It may be useful to add timestamp for Tx packets for continuous or cyclic transmit operation. The timestamp and sequence ID of a Tx packet are stored according to pktgen header format. To enable per-packet timestamp, use -y|--tstamp option. If timestamp is off, pktgen header is not included in the UDP payload. This means receiving side can use the magic number for pktgen for differentiation. The implementation supports both VLAN tagged and untagged option. By default, the minimum packet size is set at 64B. However, if VLAN tagged is on (-V), the minimum packet size is increased to 66B just so to fit the pktgen_hdr size. Added hex_dump() into the code path just for future cross-checking. As before, simply change to "#define DEBUG_HEXDUMP 1" to inspect the accuracy of TX packet. Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211230035447.523177-8-boon.leong.ong@intel.com
Diffstat (limited to 'samples/bpf/tracex2_user.c')
0 files changed, 0 insertions, 0 deletions