diff options
| author | Jakub Sitnicki <jakub@cloudflare.com> | 2025-11-05 21:19:38 +0100 |
|---|---|---|
| committer | Martin KaFai Lau <martin.lau@kernel.org> | 2025-11-10 10:52:31 -0800 |
| commit | 8989d328dfe7c7a3b9f4b9f0ef60006d277f81cc (patch) | |
| tree | 853def18c21561b7fb19625f8739062d74101d10 /kernel/bpf/helpers.c | |
| parent | a0c3aefb08cd81864b17c23c25b388dba90b9dad (diff) | |
net: Helper to move packet data and metadata after skb_push/pull
Lay groundwork for fixing BPF helpers available to TC(X) programs.
When skb_push() or skb_pull() is called in a TC(X) ingress BPF program, the
skb metadata must be kept in front of the MAC header. Otherwise, BPF
programs using the __sk_buff->data_meta pseudo-pointer lose access to it.
Introduce a helper that moves both metadata and a specified number of
packet data bytes together, suitable as a drop-in replacement for
memmove().
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20251105-skb-meta-rx-path-v4-1-5ceb08a9b37b@cloudflare.com
Diffstat (limited to 'kernel/bpf/helpers.c')
0 files changed, 0 insertions, 0 deletions