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

Update loading bpf programs with reuse map options #309

Merged
merged 1 commit into from Nov 20, 2023

Conversation

sanfern
Copy link
Contributor

@sanfern sanfern commented Nov 9, 2023

The purpose of this PR is to load the BPF program with the option to reuse maps. When we need to load two programs in case of TM (ingress, egress), shared bpf map i.e. redirect_iface. We need to avoid creating two instance of maps, and pin one map. Here we need to reuse same map for the both programs.
Implementing this, we need to define maps with the pinning attribute and provide the map pin path during loading from the l3afd. If the map already exists while loading, it will be reuse instead of creating a new one.

Signed-off-by: sanfern  <santhosh.fernandes@gmail.com>
Signed-off-by: sferna1 <santhosh.fernandes@gmail.com>
@sanfern sanfern changed the title Update loading bpf programs with reuse maps Update loading bpf programs with reuse map options Nov 9, 2023
@sanfern sanfern linked an issue Nov 9, 2023 that may be closed by this pull request
Copy link

@charleskbliu0 charleskbliu0 left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link

@ajayR006 ajayR006 left a comment

Choose a reason for hiding this comment

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

Verified and Approved.

@sanfern sanfern merged commit 04cce01 into l3af-project:main Nov 20, 2023
7 checks passed
@sanfern sanfern deleted the sanfern-loading-fix branch November 20, 2023 09:39
@sanfern sanfern self-assigned this Nov 21, 2023
Atul-source pushed a commit to Atul-source/l3afd that referenced this pull request Nov 28, 2023
Signed-off-by: sanfern  <santhosh.fernandes@gmail.com>
Signed-off-by: Atul-source <atulprajapati6031@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Maps are not reused while loading the BPF program
3 participants