linux-stable/samples
Ong Boon Leong eb68db45b7 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
2022-01-05 17:53:24 -08:00
..
acrn sample/acrn: Introduce a sample of HSM ioctl interface usage 2021-02-09 10:58:19 +01:00
auxdisplay .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
binderfs .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
bpf samples/bpf: xdpsock: Add timestamp for Tx-only operation 2022-01-05 17:53:24 -08:00
configfs treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
connector .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
fanotify Add gitignore file for samples/fanotify/ subdirectory 2021-11-07 11:19:24 -08:00
ftrace ftrace/samples: Add module to test multi direct modify interface 2021-12-09 13:02:44 -05:00
hidraw .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
hw_breakpoint samples/hw_breakpoint: drop use of kallsyms_lookup_name() 2020-04-07 10:43:44 -07:00
kdb kdb: Rename members of struct kdbtab_t 2021-07-27 17:05:06 +01:00
kfifo samples/kfifo: Rename read_lock/write_lock 2021-10-13 14:36:48 +02:00
kmemleak mm,kmemleak-test.c: move kmemleak-test.c to samples dir 2020-10-13 18:38:27 -07:00
kobject treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
kprobes samples/kretprobes: Fix return value if register_kretprobe() failed 2021-10-26 17:23:46 -04:00
landlock samples/landlock: Add a sandbox manager example 2021-04-22 12:22:11 -07:00
livepatch livepatch: Handle allocation failure in the sample of shadow variable API 2020-01-17 11:12:06 +01:00
mei samples: mei: don't wait on read completion upon write. 2021-08-01 09:54:22 +02:00
nitro_enclaves nitro_enclaves: Add fixes for checkpatch blank line reports 2021-09-14 11:11:20 +02:00
pidfd .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
pktgen samples: pktgen: add trap SIGINT for printing execution result 2021-08-25 13:44:30 +01:00
qmi samples: qmi: Constify static qmi ops 2020-11-24 17:08:47 -06:00
rpmsg samples/rpmsg: Introduce a module parameter for message count 2019-08-26 22:10:39 -07:00
seccomp samples: seccomp: Use __BYTE_ORDER__ 2021-10-25 20:39:42 -07:00
timers .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
trace_events tracing: Add trace_event helper macros __string_len() and __assign_str_len() 2021-08-17 11:47:52 -04:00
trace_printk samples/trace_printk: Wait for IRQ work to finish 2019-12-21 16:08:22 -05:00
uhid kbuild: introduce hostprogs-always-y and userprogs-always-y 2020-08-10 01:32:59 +09:00
v4l media: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:52:39 +01:00
vfio-mdev Char/Misc driver update for 5.16-rc1 2021-11-04 08:21:47 -07:00
vfs .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
watch_queue .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
watchdog .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig ftrace/samples: add missing Kconfig option for ftrace direct multi sample 2021-11-18 17:50:54 +01:00
Makefile ftrace/samples: add missing Kconfig option for ftrace direct multi sample 2021-11-18 17:50:54 +01:00