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_map_lookup_batch] Fix bpf_map_lookup_batch data retrieval and add test cases for percpu hash map batch lookup #3590

Merged
merged 14 commits into from
Jul 16, 2024

Conversation

shpalani
Copy link
Collaborator

@shpalani shpalani commented May 28, 2024

Description

Problem:

  1. bpf_map_lookup_batch failed to retrieve data for per-cpu map types.
  2. There were no test cases for per-cpu hash map types.

Resolution:

  1. Fixed the ebpf_map_lookup_element_batch function to get the right value_size for the per-cpu map types.
  2. Added test cases for the per-cpu hash.
  • BPF_MAP_TYPE_PERCPU_HASH
  • BPF_MAP_TYPE_LRU_PERCPU_HASH

Testing

_Do any existing tests cover this change? Yes.
Are new tests needed? Yes

Documentation

_Is there any documentation impact for this change? No

Installation

_Is there any installer impact for this change? No

@shpalani shpalani changed the title Initial commit [bpf_map_lookup_batch] Add test case for percpu hash map batch lookup May 28, 2024
@shpalani shpalani marked this pull request as ready for review July 3, 2024 20:56
@shpalani shpalani changed the title [bpf_map_lookup_batch] Add test case for percpu hash map batch lookup [bpf_map_lookup_batch] Fix bpf_map_lookup_batch data retrieval and add test cases for percpu hash map batch lookup Jul 3, 2024
tests/unit/libbpf_test.cpp Outdated Show resolved Hide resolved
libs/api/ebpf_api.cpp Show resolved Hide resolved
tests/unit/libbpf_test.cpp Show resolved Hide resolved
@shpalani shpalani added this pull request to the merge queue Jul 16, 2024
Merged via the queue into microsoft:main with commit 7ee9edf Jul 16, 2024
88 checks passed
@shpalani shpalani deleted the shpalan/map-percpu-hash branch July 16, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants