Skip to contentSkip to conversation

xsk: Don't assume metadata is always requested in TX completion

PATCH Applied Stanislav Fomichev 2 participants 2 messages Mar 18, 2024 – Mar 19, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xsk: Don't assume metadata is always requested in TX completion

compl->tx_timestam != NULL means that the user has explicitly requested the metadata via XDP_TX_METADATA+XDP_TX_METADATA_TIMESTAMP.

Fixes 48eb03dd2630 ("xsk: Add TX timestamp and TX checksum offload support")
---
 include/net/xdp_sock.h | 2 ++
 1 file changed, 2 insertions(+)
include/net/xdp_sock.h +2 -0
index 3cb4dc9bd70e..3d54de168a6d 100644
@@ -188,6 +188,8 @@ static inline void xsk_tx_metadata_complete(struct xsk_tx_metadata_compl *compl,
 {
 	if (!compl)
 		return;
+	if (!compl->tx_timestamp)
+		return;
 
 	*compl->tx_timestamp = ops->tmo_fill_timestamp(priv);
 }
Signature · 1 line
2.44.0.291.gc1ea87d7ee-goog
#1 lore raw
This patch was applied to bpf/bpf.git (master) by Daniel Borkmann <[email protected]>:

Hello:

This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <[email protected]>:

Quoted 9 lines · On Mon, 18 Mar 2024 09:54:27 -0700 you wrote:

compl->tx_timestam != NULL means that the user has explicitly requested the metadata via XDP_TX_METADATA+XDP_TX_METADATA_TIMESTAMP.

Fixes 48eb03dd2630 ("xsk: Add TX timestamp and TX checksum offload support")

[...]

Here is the summary with links:
- [bpf-next] xsk: Don't assume metadata is always requested in TX completion

    https://git.kernel.org/bpf/bpf/c/f6e922365faf

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html