Skip to content

Conversation

julianwiedmann
Copy link
Member

Replies by a local backend either get their L2 resolution by the stack, or (when bpf_lxc uses bpf-host-routing) by bpf_redirect_neigh(). But fib_redirect_*() will never fall through to the L2 neigh cache to get the client's MAC address.

Replies by a local backend either get their L2 resolution by the stack, or
(when bpf_lxc uses bpf-host-routing) by bpf_redirect_neigh(). But
fib_redirect_*() will never fall through to the L2 neigh cache to get
the client's MAC address.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann added area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/misc This PR makes changes that have no direct user impact. labels Mar 13, 2023
@julianwiedmann julianwiedmann requested a review from borkmann March 13, 2023 06:57
@julianwiedmann julianwiedmann requested a review from a team as a code owner March 13, 2023 06:57
@julianwiedmann
Copy link
Member Author

/test

Copy link
Member

@borkmann borkmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@julianwiedmann
Copy link
Member Author

Filed #24342 for the test-runtime flake, re-running.

@julianwiedmann
Copy link
Member Author

/test-runtime

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 13, 2023
@borkmann borkmann merged commit 3d96cb5 into cilium:master Mar 13, 2023
@julianwiedmann julianwiedmann deleted the 1.14-bpf-nodeport-l2-addr branch March 13, 2023 18:51
julianwiedmann added a commit to julianwiedmann/cilium that referenced this pull request May 20, 2025
This re-introduces the optimization from
cilium#24324.

The reasoning back then was
> Replies by a local backend either get their L2 resolution by the stack,
> or (when bpf_lxc uses bpf-host-routing) by bpf_redirect_neigh().
> But fib_redirect_*() will never fall through to the L2 neigh cache to get
> the client's MAC address.

But this was later reverted in cilium#34303
because we had missed one case - older kernels which don't have
fib_redirect_neigh(), and where Cilium thus might end up looking for the
client's MAC in the neighbor map.

Now that we have bumped the minimum kernel requirement to v5.10 and
*require* fib_redirect_neigh() to be available, let's bring this change
back.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
github-merge-queue bot pushed a commit that referenced this pull request May 20, 2025
This re-introduces the optimization from
#24324.

The reasoning back then was
> Replies by a local backend either get their L2 resolution by the stack,
> or (when bpf_lxc uses bpf-host-routing) by bpf_redirect_neigh().
> But fib_redirect_*() will never fall through to the L2 neigh cache to get
> the client's MAC address.

But this was later reverted in #34303
because we had missed one case - older kernels which don't have
fib_redirect_neigh(), and where Cilium thus might end up looking for the
client's MAC in the neighbor map.

Now that we have bumped the minimum kernel requirement to v5.10 and
*require* fib_redirect_neigh() to be available, let's bring this change
back.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants