Skip to content

bpf: lxc: use THIS_INTERFACE_IFINDEX instead of CB_IFINDEX#33524

Merged
julianwiedmann merged 1 commit intocilium:mainfrom
julianwiedmann:1.17-bpf-lxc-ifindex
Jul 4, 2024
Merged

bpf: lxc: use THIS_INTERFACE_IFINDEX instead of CB_IFINDEX#33524
julianwiedmann merged 1 commit intocilium:mainfrom
julianwiedmann:1.17-bpf-lxc-ifindex

Conversation

@julianwiedmann
Copy link
Copy Markdown
Member

When bpf_lxc's ingress path is called via the policy tailcall map, it takes a CB_IFINDEX parameter. This is used to redirect the packet into the endpoint, after applying policy.

But now that we bake the endpoint's ifindex into the bpf_lxc program, this can be replaced by THIS_INTERFACE_IFINDEX. Allowing us to eventually condense all the boolean flags (CB_IFINDEX / CB_FROM_HOST / CB_FROM_TUNNEL) into a single skb->cb slot.

When bpf_lxc's ingress path is called via the policy tailcall map, it takes
a CB_IFINDEX parameter. This is used to redirect the packet into the
endpoint, after applying policy.

But now that we bake the endpoint's ifindex into the bpf_lxc program, this
can be replaced by THIS_INTERFACE_IFINDEX. Allowing us to eventually
condense all the boolean flags (CB_IFINDEX / CB_FROM_HOST / CB_FROM_TUNNEL)
into a single skb->cb slot.

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. needs-backport/1.16 labels Jul 2, 2024
@julianwiedmann julianwiedmann requested a review from ysksuzuki July 2, 2024 05:40
@julianwiedmann julianwiedmann requested a review from a team as a code owner July 2, 2024 05:40
@julianwiedmann
Copy link
Copy Markdown
Member Author

/test

Copy link
Copy Markdown
Member

@ysksuzuki ysksuzuki left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@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 Jul 4, 2024
@julianwiedmann julianwiedmann added this pull request to the merge queue Jul 4, 2024
Merged via the queue into cilium:main with commit 99adddc Jul 4, 2024
@julianwiedmann julianwiedmann deleted the 1.17-bpf-lxc-ifindex branch July 4, 2024 03:37
@jibi jibi mentioned this pull request Jul 8, 2024
32 tasks
@julianwiedmann julianwiedmann added backport-done/1.16 The backport for Cilium 1.16.x for this PR is done. and removed backport-pending/1.16 labels Jul 12, 2024
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. backport-done/1.16 The backport for Cilium 1.16.x for this PR is done. 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.

3 participants