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

Extend eBPF kernel target with support for additional BPF helpers and more types of BPF maps #3119

Merged
merged 4 commits into from
Mar 14, 2022

Conversation

osinstom
Copy link
Contributor

This PR extends the eBPF kernel target with:

  • support for defining other BPF map types
  • support for BPF map-in-maps
  • support for BPF maps using BPF spinlocks
  • method to generate packet descriptor type (e.g. __sk_buff) depending on the eBPF hook type. It's required to support mixed deployments leveraging both TC and XDP programs.
  • method to generate packet buffer's size adjustment
  • BTF annotation of BPF maps, so that BPF types can be read at runtime

This PR is one from the series of PRs bringing the support for the PSA model to eBPF backend. The goal is to shrink the "main PR" with the full implementation of PSA for eBPF to facilitate review.

@osinstom osinstom changed the title Extend eBPF kernel target with support for more types of BPF maps Extend eBPF kernel target with support for additional BPF helpers and more types of BPF maps Mar 10, 2022
@osinstom
Copy link
Contributor Author

CC: @mbudiu-vmw

Copy link
Contributor

@mihaibudiu mihaibudiu left a comment

Choose a reason for hiding this comment

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

I hope that you will soon submit a PR which tests some of these new table type too.
I am approving, but perhaps you can consider the small changes that I requested.

backends/ebpf/target.cpp Show resolved Hide resolved
backends/ebpf/target.h Show resolved Hide resolved
@osinstom
Copy link
Contributor Author

@mbudiu-vmw I've address your review, thanks! We have ~70 test cases based on the PTF framework that verify different mechanisms of PSA impl for eBPF backend. We'll contribute them too.

@mihaibudiu mihaibudiu merged commit 1d18af3 into p4lang:main Mar 14, 2022
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.

2 participants