All of lore.kernel.org
 help / color / mirror / Atom feed
* AF_XDP with Rust
@ 2020-01-14 20:52 dan
  0 siblings, 0 replies; only message in thread
From: dan @ 2020-01-14 20:52 UTC (permalink / raw)
  To: xdp-newbies

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-14 20:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 20:52 AF_XDP with Rust dan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.