Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tracking skb #410

Merged
merged 3 commits into from
Aug 30, 2024
Merged

Fix tracking skb #410

merged 3 commits into from
Aug 30, 2024

Conversation

jschwinger233
Copy link
Member

This PR uses &skb to track skb instead of skb->head to prevent several issues. XDP tracing is also taken care of by introducing a new bpf map xdp_dhs_skb_heads.

cilium#339 changed how pwru tracks skb from
using &skb to skb->head for xdp tracing. We found it causing problems
such as:
1. An skb can have multiple different skb->head values during its
   lifetime, especically after (e.g. IPsec) encryption. Pwru now is
   likely to lose track of skb after encryption.
2. Some subtle issues like cilium#401. This
   is because some other tracking mechanism relies on &skb.

This commit brings back tracking &skb instead of skb->head. As for XDP
tracing, I'll introduce a new solution in the following patches.

Signed-off-by: gray <gray.liang@isovalent.com>
This commit records xdp->data_hard_start at fexit/xdp. The skb built
from xdp_md will have the same value of skb->head.

Signed-off-by: gray <gray.liang@isovalent.com>
Signed-off-by: gray <gray.liang@isovalent.com>
@jschwinger233 jschwinger233 marked this pull request as ready for review August 6, 2024 10:49
@jschwinger233 jschwinger233 requested a review from a team as a code owner August 6, 2024 10:49
@jschwinger233 jschwinger233 requested review from tklauser and removed request for a team August 6, 2024 10:49
@tklauser tklauser requested a review from brb August 6, 2024 10:55
@tklauser
Copy link
Member

tklauser commented Aug 6, 2024

Requesting an additional review from @brb since I'm not that familiar with the BPF bits of pwru.

Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

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

🚀

@brb brb merged commit 2893168 into cilium:main Aug 30, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants