History

bpf: Clarify handling of mark and tstamp by redirect_peer

When switching network namespaces with the bpf_redirect_peer helper, the skb->mark and skb->tstamp fields are not zeroed out like they can be on a typical netns switch. This patch clarifies that in the helper description.

Paul Chaignon committed 1 year ago

Commit f5c79ff1 parent c4327222 files · +6 −0Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/bpf.h+3−0
@@ -4968,6 +4968,9 @@ union bpf_attr { · 4967 unmodified lines
4968 * the netns switch takes place from ingress to ingress without4968 * the netns switch takes place from ingress to ingress without
4969 * going through the CPU's backlog queue.4969 * going through the CPU's backlog queue.
4970 *4970 *
4971 * *skb*\ **->mark** and *skb*\ **->tstamp** are not cleared during
4972 * the netns switch.
4973 *
4971 * The *flags* argument is reserved and must be 0. The helper is4974 * The *flags* argument is reserved and must be 0. The helper is
4972 * currently only supported for tc BPF program types at the4975 * currently only supported for tc BPF program types at the
4973 * ingress hook and for veth and netkit target device types. The4976 * ingress hook and for veth and netkit target device types. The