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

Bpf inner maps #4460

Closed
wants to merge 2 commits into from
Closed

Conversation

yanivagman
Copy link
Collaborator

1. Explain what the PR does

Refactor: Remove redundant policyManager.UpdateBPF call in initBPF
The policyManager.UpdateBPF function was being called twice during Tracee initialization. This change removes the redundant call in initBPF, simplifying the initialization logic.
The unnecessary updateProcTree and createNewMaps parameters were also removed from policyManager.UpdateBPF. New maps are now always created implicitly, simplifying the map update process.

Refactor: Move bpfInnerMaps to local scope in updateBPF
Remove bpfInnerMaps from the policies struct as it was only used within the updateBPF function and make it a local variable within updateBPF.
This change improves code organization by keeping BPF-related logic separate from policies logic, reflecting a clearer structure in the codebase.

2. Explain how to test it

3. Other comments

Remove bpfInnerMaps from the policies struct as it was only used within the
updateBPF function and make it a local variable within updateBPF.

This change improves code organization by keeping BPF-related logic separate
from policies logic, reflecting a clearer structure in the codebase.
The `policyManager.UpdateBPF` function was being called twice during
Tracee initialization. This change removes the redundant call in
`initBPF`, simplifying the initialization logic.

The unnecessary `updateProcTree` and `createNewMaps` parameters
were also removed from `policyManager.UpdateBPF`. New maps are now
always created implicitly, simplifying the map update process.
@yanivagman yanivagman closed this Dec 23, 2024
@yanivagman yanivagman deleted the bpf_inner_maps branch December 23, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant