Skip to content

map: add MapSpec.Tags field for reading btf_decl_tag attributes set on maps #1801

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

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented Jun 11, 2025

This commit exposes btf_decl_tag values set on map defintions in the following manner:

struct {
	__uint(type, BPF_MAP_TYPE_ARRAY);
  ...
} map_def __attribute__((btf_decl_tag("my_tag"))) __section(".maps");

The MapSpec.Tags field is currently read-only and doesn't affect what's being loaded into the kernel.

@ti-mo ti-mo requested a review from a team as a code owner June 11, 2025 13:38
…n maps

This commit exposes btf_decl_tag values set on map defintions in the following manner:

```
struct {
	__uint(type, BPF_MAP_TYPE_ARRAY);
  ...
} map_def __attribute__((btf_decl_tag("my_tag"))) __section(".maps");

```

The MapSpec.Tags field is currently read-only and doesn't affect what's being
loaded into the kernel.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo force-pushed the tb/map-decl-tags branch from cc04464 to afc1e4c Compare June 11, 2025 13:40
@ti-mo ti-mo merged commit 3f1a755 into cilium:main Jun 11, 2025
17 of 18 checks passed
@ti-mo ti-mo deleted the tb/map-decl-tags branch June 11, 2025 13:47
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.

1 participant