ethringdev

package
v0.0.0-...-6c4fd92 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: NIST-PD-fallback Imports: 17 Imported by: 0

Documentation

Overview

Package ethringdev contains bindings of DPDK net_eth_ring driver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(rxRings, txRings []*ringbuffer.Ring, socket eal.NumaSocket) (dev ethdev.EthDev, e error)

New creates an EthDev from a set of software FIFOs.

Types

type Pair

type Pair struct {
	PortA ethdev.EthDev
	PortB ethdev.EthDev
	// contains filtered or unexported fields
}

Pair represents a pair of EthDevs connected via ring-based PMD.

func NewPair

func NewPair(cfg PairConfig) (pair *Pair, e error)

NewPair creates a pair of connected EthDevs.

func (*Pair) Close

func (pair *Pair) Close() error

Close stops both ports.

func (*Pair) EthDevConfig

func (pair *Pair) EthDevConfig() ethdev.Config

EthDevConfig returns Config that can be used to start a port.

type PairConfig

type PairConfig struct {
	NQueues       int            // number of queues on EthDev
	RingCapacity  int            // ring capacity connecting pair of EthDevs
	QueueCapacity int            // queue capacity in each EthDev
	Socket        eal.NumaSocket // where to allocate data structures
	RxPool        *pktmbuf.Pool  // mempool for packet reception
}

PairConfig contains configuration for Pair.

type VNet

type VNet struct {
	ealthread.Thread // bridge thread

	Ports  []ethdev.EthDev // app-side EthDev
	NDrops int             // number of dropped packets
	// contains filtered or unexported fields
}

VNet represents a simulated Ethernet subnet.

func NewVNet

func NewVNet(cfg VNetConfig) (vnet *VNet, e error)

NewVNet creates a virtual Ethernet subnet.

func (*VNet) Close

func (vnet *VNet) Close() error

Close stops the bridge and closes all ports.

func (*VNet) ThreadRole

func (*VNet) ThreadRole() string

ThreadRole returns "VNETBRIDGE" used in lcore allocator.

type VNetConfig

type VNetConfig struct {
	PairConfig
	NNodes int // number of nodes

	BurstSize       int
	LossProbability float64
	Shuffle         bool
}

VNetConfig contains VNet configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL