10 releases

Uses old Rust 2015

0.1.5 Aug 12, 2018
0.1.4 Aug 8, 2018
0.1.0 Jul 31, 2018
0.0.6 Jul 18, 2018
0.0.1 Jun 1, 2017

#1 in #mempool

Download history 67/week @ 2023-10-19 75/week @ 2023-10-26 61/week @ 2023-11-02 53/week @ 2023-11-09 83/week @ 2023-11-16 86/week @ 2023-11-23 73/week @ 2023-11-30 57/week @ 2023-12-07 73/week @ 2023-12-14 68/week @ 2023-12-21 40/week @ 2023-12-28 58/week @ 2024-01-04 58/week @ 2024-01-11 58/week @ 2024-01-18 64/week @ 2024-01-25 43/week @ 2024-02-01

237 downloads per month
Used in 18 crates (17 directly)

MIT license

23MB
602K SLoC

C 574K SLoC // 0.1% comments Rust 25K SLoC // 0.1% comments Shell 2.5K SLoC // 0.2% comments Python 1K SLoC // 0.2% comments Forge Config 415 SLoC // 0.1% comments RPM Specfile 79 SLoC // 0.0% comments

dpdk-sys

dpdk-sys is a Rust crate which has FFI bindings for DPDK.

Versioning

Bindings are currently built for DPDK 18.05. To rebuild the bindings, run tools/recreate-bindings. The bindings are checked in, even though they can be generated. Building them as part of a Cargo build.rs has proven to be too fragile, not least because of the complexity of DPDK and the need to patch it to work with musl libc and to support compilation on Mac OS X.

Notes

The function rte_vlog is not exported as it makes uses of va_list; this macro maps to different code for different platforms. When using musl on Linux, it can be supported with:-

pub type va_list = __builtin_va_list;

pub type __builtin_va_list = [__va_list_tag; 1usize];

#[repr(C)]
#[derive(Copy, Clone)]
#[derive(Debug)]
pub struct __va_list_tag
{
	pub gp_offset: c_uint,
	pub fp_offset: c_uint,
	pub overflow_arg_area: *mut c_void,
	pub reg_save_area: *mut c_void,
}

impl Default for __va_list_tag
{
    fn default() -> Self
	{
		unsafe { zeroed() }
	}
}

Hopefully one day code like this might end up in the libc crate, but it's not likely as it's very difficult to make use of va_list in any event.

https://stackoverflow.com/questions/38156867/how-to-direct-packets-belonging-to-a-tcp-connection-to-a-specific-lcore-in-dpdk/39708686 https://galsagie.github.io/2015/02/26/dpdk-tips-1/

Licensing

The license for this project is MIT.

Dependencies

~3MB
~85K SLoC