|
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
|
DPDK datagram source (rx_backend = "dpdk"): one ethdev port, one RX and one TX queue polled from the venue's network thread. More...
#include "fastmm/core/config_macros.hpp"#include "fastmm/core/time.hpp"#include "fastmm/net/datagram_source.hpp"#include "fastmm/net/udp_frame.hpp"#include <array>#include <cstddef>#include <cstdint>#include <span>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | fastmm::net::DpdkSubscription |
| struct | fastmm::net::DpdkConfig |
| struct | fastmm::net::DpdkStats |
| class | fastmm::net::DpdkDatagramSource |
Namespaces | |
| namespace | fastmm |
| namespace | fastmm::net |
Functions | |
| bool | fastmm::net::dpdk_available () noexcept |
| True when this build has the DPDK backend. | |
DPDK datagram source (rx_backend = "dpdk"): one ethdev port, one RX and one TX queue polled from the venue's network thread.
Frames are parsed with parse_udp_frame (Ethernet, at most one 802.1Q tag, IPv4, UDP), matched against the subscriptions and handed to the handler; every mbuf of the burst is freed (or passed on) before poll() returns, so payload spans are valid only inside the handler call.
Frames that are not a subscribed datagram:
Multicast: a kernel UDP socket per subscription joins the group on interface so the IGMP report goes out (the exception interface when the port is bound to vfio-pci; the port's own netdev for af_packet vdevs). A unicast subscription (a local address) needs no join.
Built only with -DFASTMM_WITH_DPDK=ON (FASTMM_HAS_DPDK=1); the header compiles without DPDK so the venue can name the type. No DPDK header is included here.
EAL: initialised once per process by the first open() with DpdkConfig::eal_args; a later open() must pass the same arguments. The calling thread's CPU affinity is restored after rte_eal_init. Unprivileged use (tests, bench over veth): "\--no-huge \--no-pci \--in-memory \--no-telemetry \--vdev=net_af_packet0,iface=\<netdev\>" inside a user + network namespace (CAP_NET_RAW there).