Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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  <[email protected]>
Signed-off-by: sferna1 <[email protected]>
@sanfern sanfern force-pushed the sanfern-loading-fix branch from e1339ce to d457840 Compare November 9, 2023 17:50
@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
@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
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