Re: [PATCH v1 bpf-next 0/2] bpf: bpf_redirect_peer egress redirection
From: Paul Chaignon <hidden>
Date: 2026-06-16 22:06:13
Also in:
bpf
From: Paul Chaignon <hidden>
Date: 2026-06-16 22:06:13
Also in:
bpf
On Tue, Jun 16, 2026 at 01:49:26PM -0700, Jordan Rife wrote:
quoted
IMO, calling it BPF_F_EGRESS would be less confusing. It's a shame we can't have the same flag API between bpf_redirect() and bpf_redirect_peer(), but this is creating inconsistent semantics for the terms egress/ingress across the two helpers.Yeah, one annoying thing about BPF_F_EGRESS is that it would only apply to bpf_redirect_peer, so you still have inconsistencies across
Yes, that's what I meant by "we can't have the same flag API" :) Alternatively, we could define BPF_F_EGRESS as 1ULL << 1, for both helpers, but I'm not sure it's worth it. Maybe Daniel will have another idea?
helpers. Perhaps this is less weird than having BPF_F_INGRESS perform an egress redirection though. Jordan