pub struct TestRunOptions<'a> {
pub data_in: Option<&'a [u8]>,
pub data_out: Option<&'a mut [u8]>,
pub ctx_in: Option<&'a [u8]>,
pub ctx_out: Option<&'a mut [u8]>,
pub repeat: u32,
pub attrs: TestRunAttrs,
}Expand description
Options for running a BPF program test.
See kernel doc and ebpf.io for detailed usage.
Fields§
§data_in: Option<&'a [u8]>Input packet data to pass to the program.
data_out: Option<&'a mut [u8]>Output buffer for packet data modified by the program.
ctx_in: Option<&'a [u8]>Input context to pass to the program.
ctx_out: Option<&'a mut [u8]>Output buffer for context written back by the program.
repeat: u32Number of times to repeat the test. Defaults to 1.
attrs: TestRunAttrsKernel execution attributes (XDP batch size).
Implementations§
Source§impl TestRunOptions<'_>
impl TestRunOptions<'_>
Trait Implementations§
Source§impl<'a> Debug for TestRunOptions<'a>
impl<'a> Debug for TestRunOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for TestRunOptions<'a>
impl<'a> RefUnwindSafe for TestRunOptions<'a>
impl<'a> Send for TestRunOptions<'a>
impl<'a> Sync for TestRunOptions<'a>
impl<'a> Unpin for TestRunOptions<'a>
impl<'a> UnsafeUnpin for TestRunOptions<'a>
impl<'a> !UnwindSafe for TestRunOptions<'a>
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