diff options
| author | Song Yoong Siang <yoong.siang.song@intel.com> | 2024-12-05 08:19:36 +0300 |
|---|---|---|
| committer | Martin KaFai Lau <martin.lau@kernel.org> | 2024-12-06 03:37:16 +0300 |
| commit | 2309132fc5d9d87deb15bda3497326aded6bfe4a (patch) | |
| tree | f436289f1a0334fb85e6c0f4c1e9200d46f5f2ba | |
| parent | 0bee36d1a51366fa57b731f8975f26f92943b43e (diff) | |
| download | linux-2309132fc5d9d87deb15bda3497326aded6bfe4a.tar.xz | |
selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata
Currently, user needs to manually enable transmit hardware timestamp
feature of certain Ethernet drivers, e.g. stmmac and igc drivers, through
following command after running the xdp_hw_metadata app.
sudo hwstamp_ctl -i eth0 -t 1
To simplify the step test of xdp_hw_metadata, set tx_type to HWTSTAMP_TX_ON
to enable hardware timestamping for all outgoing packets, so that user no
longer need to execute hwstamp_ctl command.
Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20241205051936.3156307-1-yoong.siang.song@intel.com
| -rw-r--r-- | tools/testing/selftests/bpf/xdp_hw_metadata.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/xdp_hw_metadata.c b/tools/testing/selftests/bpf/xdp_hw_metadata.c index ad6c08dfd6c8..e38675d9b118 100644 --- a/tools/testing/selftests/bpf/xdp_hw_metadata.c +++ b/tools/testing/selftests/bpf/xdp_hw_metadata.c @@ -551,6 +551,7 @@ static void hwtstamp_enable(const char *ifname) { struct hwtstamp_config cfg = { .rx_filter = HWTSTAMP_FILTER_ALL, + .tx_type = HWTSTAMP_TX_ON, }; hwtstamp_ioctl(SIOCGHWTSTAMP, ifname, &saved_hwtstamp_cfg); |
