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

Add support for unlimited map size #3348

Merged
merged 25 commits into from
Apr 25, 2024

Conversation

saxena-anurag
Copy link
Contributor

@saxena-anurag saxena-anurag commented Mar 11, 2024

Fixes #3328

Description

This PR changes the behavior of the below hash-table based map types, to have unlimited entries. The max_entries count in the map definition acts as a hint to the number of buckets to be created when the map is created.

  1. BPF_MAP_TYPE_HASH
  2. BPF_MAP_TYPE_PERCPU_HASH
  3. BPF_MAP_TYPE_HASH_OF_MAPS
  4. BPF_MAP_TYPE_LPM_TRIE

Behavior of the below hash-table based maps is not changed:

  1. BPF_MAP_TYPE_LRU_HASH
  2. BPF_MAP_TYPE_LRU_PERCPU_HASH

Testing

Added new tests and updated existing tests to validate the new behavior.

Documentation

NA

Installation

NA

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

Attention: Patch coverage is 93.54839% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 84.46%. Comparing base (d7c7af6) to head (16efb95).
Report is 61 commits behind head on main.

Files Patch % Lines
libs/execution_context/ebpf_maps.c 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3348      +/-   ##
==========================================
+ Coverage   83.78%   84.46%   +0.68%     
==========================================
  Files         143      147       +4     
  Lines       27297    27229      -68     
==========================================
+ Hits        22870    22999     +129     
+ Misses       4427     4230     -197     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@saxena-anurag saxena-anurag changed the title [DRAFT] Add support for unlimited map size Apr 22, 2024
@saxena-anurag saxena-anurag marked this pull request as ready for review April 22, 2024 16:37
tests/end_to_end/end_to_end.cpp Outdated Show resolved Hide resolved
tests/end_to_end/end_to_end.cpp Outdated Show resolved Hide resolved
tests/end_to_end/end_to_end.cpp Outdated Show resolved Hide resolved
dthaler
dthaler previously approved these changes Apr 22, 2024
@dthaler dthaler dismissed their stale review April 22, 2024 18:59

Waiting for other comments to be addressed or at least responded to

@saxena-anurag saxena-anurag requested a review from dthaler April 22, 2024 22:31
dthaler
dthaler previously approved these changes Apr 22, 2024
shpalani
shpalani previously approved these changes Apr 24, 2024
@saxena-anurag saxena-anurag added this pull request to the merge queue Apr 24, 2024
@saxena-anurag saxena-anurag removed this pull request from the merge queue due to a manual request Apr 24, 2024
@saxena-anurag saxena-anurag dismissed stale reviews from shpalani and dthaler via 18b6f0a April 25, 2024 01:41
@saxena-anurag saxena-anurag enabled auto-merge April 25, 2024 01:42
@saxena-anurag saxena-anurag added this pull request to the merge queue Apr 25, 2024
Merged via the queue into microsoft:main with commit 586fd21 Apr 25, 2024
86 checks passed
@saxena-anurag saxena-anurag deleted the user/anusa/issue_3328 branch April 25, 2024 17:26
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.

Add support for unlimited map size
4 participants