Skip to content

Comments

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

Merged
ti-mo merged 1 commit intocilium:mainfrom
ti-mo:tb/map-decl-tags
Jun 11, 2025
Merged

map: add MapSpec.Tags field for reading btf_decl_tag attributes set on maps#1801
ti-mo merged 1 commit intocilium:mainfrom
ti-mo:tb/map-decl-tags

Conversation

@ti-mo
Copy link
Contributor

@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 <[email protected]>
@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