AF_XDP with Rust

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://github.com/aterlo/afxdp-rs

afxdp-rs provides a Rust interface to AF_XDP. The docs.rs build is
broken right now but at high level this provides:
- Mem mapped area
- Umem (completion queue and fill queue)
- AF_XDP sockets (Tx/Rx, Tx-only, Rx-only)
- Buf (to represent a packet). Templated to allow user customization.
- BufPool to manage Bufs (this doesn't do much in the sample programs
but is useful in more complicated scenarios)
- 1 link and 2 link forwarding examples

Performance

Test System:

* Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
* Single X710 (4 physical 10G ports) (i40e)
* Kernel: 5.4.2-300.fc31.x86_64
* Kernel boot args: skew_tick=1 mitigations=off selinux=0 isolcpus=4-27 
nohz_full=4-27 rcu_nobcs=4-27 default_hugepagesz=1G hugepagesz=1G
hugepages=4

Traffic Generator:

* Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
* Single X710 (4 physical 10G ports) (i40e)
* Traffic goes from one port, through test system and to second port on
the same X710
* T-Rex traffic generator (https://trex-tgn.cisco.com/) (DPDK)
* 64-byte UDP packets

Scenario 1: l2fwd-2link on a single core running userspace and NAPI

Small amounts of packet loss start at about 6.5M packets-per-second
(PPS) unidirectional and 6.0M PPS bi-directional (3M each direction).

Little effort has been put into optimizing this so I expect there are
some easy performance wins still.




[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux