eal

package
v0.0.0-...-8fa78e2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLcoreCount

func GetLcoreCount() uint

Returns number of CPU logical cores configured by EAL.

func GetLcores

func GetLcores() []uint

Returns all lcores registered in EAL.

func GetLcoresWorkers

func GetLcoresWorkers() []uint

Returns all worker lcores registered in EAL. Lcore is worker if it is not main.

func GetMainLcore

func GetMainLcore() uint

Returns CPU logical core id (Lcore) where the main thread is executed.

func HasHugePages

func HasHugePages() bool

HasHugePages tells if huge pages are activated.

func HasPCI

func HasPCI() bool

HasPCI tells whether EAL is using PCI bus. Disabled by –no-pci option.

func HotplugAdd

func HotplugAdd(d *DevArgs) error

Hotplug add (attach) a DPDK device. Returns error when something went wrong.

func HotplugRemove

func HotplugRemove(d *DevArgs) error

Hotplug remove (detach) a DPDK device. Returns error when something went wrong.

func LcoreIsRunning

func LcoreIsRunning(lcoreID uint) bool

func ProcessType

func ProcessType() int

Returns the current process type.

func RteEalCleanup

func RteEalCleanup() error

EalCleanup releases DPDK EAL-allocated resources, ensuring that no hugepage memory is leaked. It is expected that all DPDK SWX applications call EalCleanup() before exiting. Not calling this function could result in leaking hugepages, leading to failure during initialization of secondary processes.

func RteEalInit

func RteEalInit(args []string) (int, error)

Call rte_eal_init and report its return value and rte_errno as an error.

Types

type DevArgs

type DevArgs struct {
	// contains filtered or unexported fields
}

func (*DevArgs) Bus

func (d *DevArgs) Bus() string

func (*DevArgs) DrvArgs

func (d *DevArgs) DrvArgs() string

func (*DevArgs) Name

func (d *DevArgs) Name() string

func (*DevArgs) Parse

func (d *DevArgs) Parse(id string) error

parses device arguments like "virtio_user4,path=/dev/vhost-net,queues=1,queue_size=32,iface=sw3" to devargs struct

func (*DevArgs) SetArgs

func (d *DevArgs) SetArgs(bus string, name string, drvArgs string, dType ...RteDevtype)

func (*DevArgs) Type

func (d *DevArgs) Type() RteDevtype

type RteDevtype

type RteDevtype uint32

Type of generic device

const (
	RteDevtypeAllowed RteDevtype = iota
	RteDevtypeBlocked
	RteDevtypeVirtual
)

Jump to

Keyboard shortcuts

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