Documentation ¶
Index ¶
- func GetLcoreCount() uint
- func GetLcores() []uint
- func GetLcoresWorkers() []uint
- func GetMainLcore() uint
- func HasHugePages() bool
- func HasPCI() bool
- func HotplugAdd(d *DevArgs) error
- func HotplugRemove(d *DevArgs) error
- func LcoreIsRunning(lcoreID uint) bool
- func ProcessType() int
- func RteEalCleanup() error
- func RteEalInit(args []string) (int, error)
- type DevArgs
- type RteDevtype
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 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 HasPCI ¶
func HasPCI() bool
HasPCI tells whether EAL is using PCI bus. Disabled by –no-pci option.
func HotplugAdd ¶
Hotplug add (attach) a DPDK device. Returns error when something went wrong.
func HotplugRemove ¶
Hotplug remove (detach) a DPDK device. Returns error when something went wrong.
func LcoreIsRunning ¶
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 ¶
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) Parse ¶
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 )