Skip to content

Commit

Permalink
Merge pull request #487 from vadorovsky/new-map-types
Browse files Browse the repository at this point in the history
aya-obj: Add new map types
  • Loading branch information
vadorovsky committed Jan 10, 2023
2 parents 0399991 + 3d03c8a commit 42c4a8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aya-obj/src/maps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ impl TryFrom<u32> for crate::generated::bpf_map_type {
x if x == BPF_MAP_TYPE_CPUMAP as u32 => BPF_MAP_TYPE_CPUMAP,
x if x == BPF_MAP_TYPE_XSKMAP as u32 => BPF_MAP_TYPE_XSKMAP,
x if x == BPF_MAP_TYPE_SOCKHASH as u32 => BPF_MAP_TYPE_SOCKHASH,
x if x == BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED as u32 => {
BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED
}
x if x == BPF_MAP_TYPE_CGRP_STORAGE as u32 => BPF_MAP_TYPE_CGRP_STORAGE,
x if x == BPF_MAP_TYPE_REUSEPORT_SOCKARRAY as u32 => BPF_MAP_TYPE_REUSEPORT_SOCKARRAY,
x if x == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE as u32 => {
Expand All @@ -50,6 +53,9 @@ impl TryFrom<u32> for crate::generated::bpf_map_type {
x if x == BPF_MAP_TYPE_RINGBUF as u32 => BPF_MAP_TYPE_RINGBUF,
x if x == BPF_MAP_TYPE_INODE_STORAGE as u32 => BPF_MAP_TYPE_INODE_STORAGE,
x if x == BPF_MAP_TYPE_TASK_STORAGE as u32 => BPF_MAP_TYPE_TASK_STORAGE,
x if x == BPF_MAP_TYPE_BLOOM_FILTER as u32 => BPF_MAP_TYPE_BLOOM_FILTER,
x if x == BPF_MAP_TYPE_USER_RINGBUF as u32 => BPF_MAP_TYPE_USER_RINGBUF,
x if x == BPF_MAP_TYPE_CGRP_STORAGE as u32 => BPF_MAP_TYPE_CGRP_STORAGE,
_ => return Err(InvalidMapTypeError { map_type }),
})
}
Expand Down

0 comments on commit 42c4a8b

Please sign in to comment.