* [PATCH bpf-next v2 1/1] selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata
@ 2024-12-05 5:19 Song Yoong Siang
2024-12-06 1:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Song Yoong Siang @ 2024-12-05 5:19 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, David S . Miller,
Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend,
Andrii Nakryiko, Eduard Zingerman, Mykola Lysenko,
Martin KaFai Lau, Song Liu, Yonghong Song, KP Singh,
Stanislav Fomichev, Hao Luo, Jiri Olsa, Shuah Khan
Cc: netdev, bpf, linux-kselftest, linux-kernel
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>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
---
v1: https://patchwork.kernel.org/project/netdevbpf/patch/20241204115715.3148412-1-yoong.siang.song@intel.com/
v1->v2 changelog:
- Add detail in commit msg on why HWTSTAMP_TX_ON is needed (Stanislav).
- Separate the patch into two, current one submit to bpf-next,
another one submit to bpf.
---
tools/testing/selftests/bpf/xdp_hw_metadata.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/xdp_hw_metadata.c b/tools/testing/selftests/bpf/xdp_hw_metadata.c
index 06266aad2f99..96c65500f4b4 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);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next v2 1/1] selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata
2024-12-05 5:19 [PATCH bpf-next v2 1/1] selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata Song Yoong Siang
@ 2024-12-06 1:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-12-06 1:00 UTC (permalink / raw)
To: Song Yoong Siang
Cc: ast, daniel, davem, kuba, hawk, john.fastabend, andrii, eddyz87,
mykolal, martin.lau, song, yonghong.song, kpsingh, sdf, haoluo,
jolsa, shuah, netdev, bpf, linux-kselftest, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (net)
by Martin KaFai Lau <martin.lau@kernel.org>:
On Thu, 5 Dec 2024 13:19:36 +0800 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [bpf-next,v2,1/1] selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata
https://git.kernel.org/bpf/bpf-next/c/2309132fc5d9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-06 1:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 5:19 [PATCH bpf-next v2 1/1] selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata Song Yoong Siang
2024-12-06 1:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox