btf: remove object::pod usage

pull/1/head
Alessandro Decina 4 years ago
parent 4b65da66ea
commit fd0ba2355d

@ -7,15 +7,12 @@ use std::{
use thiserror::Error; use thiserror::Error;
use crate::{ use crate::{
generated::bpf_insn,
maps::{Map, MapError}, maps::{Map, MapError},
obj::{Object, ParseError, RelocationError}, obj::{Object, ParseError, RelocationError},
programs::{KProbe, Program, ProgramData, ProgramError, SocketFilter, TracePoint, UProbe, Xdp}, programs::{KProbe, Program, ProgramData, ProgramError, SocketFilter, TracePoint, UProbe, Xdp},
syscalls::bpf_map_update_elem_ptr, syscalls::bpf_map_update_elem_ptr,
}; };
unsafe impl object::Pod for bpf_insn {}
pub(crate) const BPF_OBJ_NAME_LEN: usize = 16; pub(crate) const BPF_OBJ_NAME_LEN: usize = 16;
/* FIXME: these are arch dependent */ /* FIXME: these are arch dependent */
@ -45,8 +42,6 @@ pub(crate) struct bpf_map_def {
pub(crate) map_flags: u32, pub(crate) map_flags: u32,
} }
unsafe impl object::Pod for bpf_map_def {}
#[derive(Debug)] #[derive(Debug)]
pub struct Bpf { pub struct Bpf {
maps: HashMap<String, RefCell<Map>>, maps: HashMap<String, RefCell<Map>>,

@ -11,9 +11,6 @@ use crate::generated::{btf_ext_header, btf_header};
use super::{BtfType, Relocation}; use super::{BtfType, Relocation};
unsafe impl object::pod::Pod for btf_header {}
unsafe impl object::pod::Pod for btf_ext_header {}
pub(crate) const MAX_RESOLVE_DEPTH: u8 = 32; pub(crate) const MAX_RESOLVE_DEPTH: u8 = 32;
pub(crate) const MAX_SPEC_LEN: usize = 64; pub(crate) const MAX_SPEC_LEN: usize = 64;

@ -14,8 +14,6 @@ use crate::{
obj::btf::{Btf, BtfError, MAX_RESOLVE_DEPTH}, obj::btf::{Btf, BtfError, MAX_RESOLVE_DEPTH},
}; };
unsafe impl object::pod::Pod for btf_type {}
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub(crate) enum BtfType { pub(crate) enum BtfType {
Unknown, Unknown,

Loading…
Cancel
Save