Skip to content

Commit f5c79ff

Browse files
pchaignokuba-moo
authored andcommitted
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. Signed-off-by: Paul Chaignon <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Acked-by: Martin KaFai Lau <[email protected]> Link: https://patch.msgid.link/ccc86af26d43c5c0b776bcba2601b7479c0d46d0.1746460653.git.paul.chaignon@gmail.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c432722 commit f5c79ff

File tree

2 files changed

+6
-0
lines changed
  • include/uapi/linux
  • tools/include/uapi/linux

2 files changed

+6
-0
lines changed

include/uapi/linux/bpf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4968,6 +4968,9 @@ union bpf_attr {
49684968
* the netns switch takes place from ingress to ingress without
49694969
* going through the CPU's backlog queue.
49704970
*
4971+
* *skb*\ **->mark** and *skb*\ **->tstamp** are not cleared during
4972+
* the netns switch.
4973+
*
49714974
* The *flags* argument is reserved and must be 0. The helper is
49724975
* currently only supported for tc BPF program types at the
49734976
* ingress hook and for veth and netkit target device types. The

tools/include/uapi/linux/bpf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4968,6 +4968,9 @@ union bpf_attr {
49684968
* the netns switch takes place from ingress to ingress without
49694969
* going through the CPU's backlog queue.
49704970
*
4971+
* *skb*\ **->mark** and *skb*\ **->tstamp** are not cleared during
4972+
* the netns switch.
4973+
*
49714974
* The *flags* argument is reserved and must be 0. The helper is
49724975
* currently only supported for tc BPF program types at the
49734976
* ingress hook and for veth and netkit target device types. The

0 commit comments

Comments
 (0)