Format fixes

pull/1/head
Alessandro Decina 4 years ago
parent 0cf5d17e38
commit a3ab2eff57

@ -12,8 +12,10 @@ use thiserror::Error;
use crate::{ use crate::{
generated::bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY, generated::bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY,
maps::perf_map::{Events, PerfBuffer, PerfBufferError}, maps::{
maps::{Map, MapError, MapRefMut}, perf_map::{Events, PerfBuffer, PerfBufferError},
Map, MapError, MapRefMut,
},
sys::bpf_map_update_elem, sys::bpf_map_update_elem,
}; };

@ -12,8 +12,7 @@ use thiserror::Error;
use crate::{ use crate::{
generated::{btf_ext_header, btf_header}, generated::{btf_ext_header, btf_header},
obj::btf::relocation::Relocation, obj::btf::{relocation::Relocation, BtfType},
obj::btf::BtfType,
}; };
pub(crate) const MAX_RESOLVE_DEPTH: u8 = 32; pub(crate) const MAX_RESOLVE_DEPTH: u8 = 32;

@ -6,7 +6,12 @@ pub mod xdp;
use libc::{close, ENOSPC}; use libc::{close, ENOSPC};
use std::{ use std::{
cell::RefCell, cmp, convert::TryFrom, ffi::CStr, io, os::raw::c_uint, os::unix::io::RawFd, cell::RefCell,
cmp,
convert::TryFrom,
ffi::CStr,
io,
os::{raw::c_uint, unix::io::RawFd},
rc::Rc, rc::Rc,
}; };
use thiserror::Error; use thiserror::Error;

@ -9,9 +9,7 @@ use crate::{
XDP_FLAGS_HW_MODE, XDP_FLAGS_REPLACE, XDP_FLAGS_SKB_MODE, XDP_FLAGS_UPDATE_IF_NOEXIST, XDP_FLAGS_HW_MODE, XDP_FLAGS_REPLACE, XDP_FLAGS_SKB_MODE, XDP_FLAGS_UPDATE_IF_NOEXIST,
}, },
programs::{load_program, FdLink, Link, LinkRef, ProgramData, ProgramError}, programs::{load_program, FdLink, Link, LinkRef, ProgramData, ProgramError},
sys::bpf_link_create, sys::{bpf_link_create, kernel_version, netlink_set_xdp_fd},
sys::kernel_version,
sys::netlink_set_xdp_fd,
}; };
#[derive(Debug, Error)] #[derive(Debug, Error)]

Loading…
Cancel
Save