bpf: add id and pinning fields to bpf_map_def

pull/1/head
Alessandro Decina 4 years ago
parent 40b7da6655
commit 575e85c412

@ -45,3 +45,15 @@ pub const TC_ACT_REDIRECT: i32 = gen::bindings::TC_ACT_REDIRECT as i32;
pub const TC_ACT_TRAP: i32 = gen::bindings::TC_ACT_TRAP as i32;
pub const TC_ACT_VALUE_MAX: i32 = gen::bindings::TC_ACT_VALUE_MAX as i32;
pub const TC_ACT_EXT_VAL_MASK: i32 = 268435455;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_map_def {
pub type_: ::aya_bpf_cty::c_uint,
pub key_size: ::aya_bpf_cty::c_uint,
pub value_size: ::aya_bpf_cty::c_uint,
pub max_entries: ::aya_bpf_cty::c_uint,
pub map_flags: ::aya_bpf_cty::c_uint,
pub id: ::aya_bpf_cty::c_uint,
pub pinning: ::aya_bpf_cty::c_uint,
}

@ -920,4 +920,6 @@ pub struct bpf_map_def {
pub value_size: ::aya_bpf_cty::c_uint,
pub max_entries: ::aya_bpf_cty::c_uint,
pub map_flags: ::aya_bpf_cty::c_uint,
pub id: ::aya_bpf_cty::c_uint,
pub pinning: ::aya_bpf_cty::c_uint,
}

@ -22,6 +22,8 @@ impl<T> Array<T> {
value_size: mem::size_of::<T>() as u32,
max_entries,
map_flags: flags,
id: 0,
pinning: 0,
},
_t: PhantomData,
}

@ -23,6 +23,8 @@ impl<K, V> HashMap<K, V> {
value_size: mem::size_of::<V>() as u32,
max_entries,
map_flags: flags,
id: 0,
pinning: 0,
},
_k: PhantomData,
_v: PhantomData,

@ -25,6 +25,8 @@ impl<T> PerfMap<T> {
value_size: mem::size_of::<u32>() as u32,
max_entries,
map_flags: flags,
id: 0,
pinning: 0,
},
_t: PhantomData,
}

@ -24,6 +24,8 @@ impl<K> SockHash<K> {
value_size: mem::size_of::<u32>() as u32,
max_entries,
map_flags: flags,
id: 0,
pinning: 0,
},
_k: PhantomData,
}

Loading…
Cancel
Save