pub struct MapFdInfo {
pub map_type: MapType,
pub key_size: u32,
pub value_size: u32,
pub max_entries: u32,
pub map_flags: Option<u32>,
pub map_extra: Option<u64>,
pub memlock: Option<u64>,
pub map_id: Option<u32>,
pub frozen: Option<bool>,
pub owner_prog_type: Option<ProgramType>,
pub owner_jited: Option<bool>,
}Expand description
Information about a BPF map obtained from /proc/self/fdinfo.
This provides information not available through MapInfo, such as
memlock (memory usage) and frozen status.
The fields correspond to those printed by
bpf_map_show_fdinfo
in the kernel source. See also bpftool’s
get_fdinfo
for the matching userspace parsing logic.
Fields§
§map_type: MapTypeThe map type.
key_size: u32The size of the map’s keys in bytes.
value_size: u32The size of the map’s values in bytes.
max_entries: u32The maximum number of entries in the map.
map_flags: Option<u32>The map flags.
map_extra: Option<u64>Extra map-specific data.
memlock: Option<u64>The amount of memory locked by the map in bytes.
map_id: Option<u32>The map’s ID.
frozen: Option<bool>Whether the map is frozen.
owner_prog_type: Option<ProgramType>The type of the owner program (only for prog_array maps).
owner_jited: Option<bool>Whether the owner program is JIT-compiled (only for prog_array maps).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MapFdInfo
impl RefUnwindSafe for MapFdInfo
impl Send for MapFdInfo
impl Sync for MapFdInfo
impl Unpin for MapFdInfo
impl UnsafeUnpin for MapFdInfo
impl UnwindSafe for MapFdInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more