Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 2.13 KB

README.md

File metadata and controls

56 lines (37 loc) · 2.13 KB

ndn-dpdk/dpdk

This directory contains Go bindings for the Data Plane Development Kit (DPDK) and the Storage Performance Development Kit (SPDK).

Go Bindings

DPDK:

  • EAL, lcore, launch
  • mempool, pktmbuf
  • ring
  • vdev
  • ethdev
  • cryptodev

SPDK:

  • json
  • thread
  • poller
  • bdev

Go bindings are object-oriented when possible.

Other Go Types and Functions

ealthread.Thread abstracts a thread that can be run on an LCore and controls its lifetime.

ealthread.Allocator provides an LCore allocator. It allows a program to reserve a number of LCores for each "role", and then obtain a NUMA-local LCore reserved for a certain role when needed.

ealthread.LoadStat contains statistics of thread empty polls. It is a simplified version of DPDK empty poll API, intended for informational purpose instead of power management.

ealthread.Ctrl controls a C polling thread and collects LoadStat information.

pktmbuf.Template is a template of mempool configuration. It can be used to create per-NUMA mempools for packet buffers.

ethdev has functions to create virtual Ethernet devices based on rte_net_memif, rte_net_af_xdp, rte_net_af_packet, and rte_net_tap drivers.

ethringdev.Pair builds a pair of virtual Ethernet devices based on rte_net_ring driver. ethringdev.VNet further builds a virtual network of bridged Ethernet devices. They can be used in unit tests to simulate links.

Main Thread

Certain DPDK library functions must run on the initial lcore; certain SPDK library functions must run on an SPDK thread. To satisfy both requirements, package ealinit creates and launches a main thread on the initial lcore. This thread is initialized as an SPDK thread and is also registered as a URCU read-side thread. Most operations invoked via the Go API run on this thread.

SPDK Internal RPC Client

Several SPDK features are not exposed in SPDK header files, but are only accessible through its JSON-RPC server. Package spdkenv enables SPDK's JSON-RPC server and creates an internal JSON-RPC client to send commands to it.