xsk: Don't assume metadata is always requested in TX completion
Subsystems (4)
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")
Reported-by Daniele Salvatore Albano <[email protected]>
Signed-off-by Stanislav Fomichev <[email protected]>
--- include/net/xdp_sock.h | 2 ++ 1 file changed, 2 insertions(+)
include/net/xdp_sock.h +2 -0
@@ -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
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 != NULLmeans 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")Reported-by Daniele Salvatore Albano <[email protected]>Signed-off-by Stanislav Fomichev <[email protected]>[...]
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