nfp

package
v0.0.0-...-0093c61 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EMU0_ISLAND                              = 24
	EMU1_ISLAND                              = 25
	EMU2_ISLAND                              = 26
	BUCKETSIZE_LW                            = 16
	ENTRYSIZE_LW                             = 64
	PAYLOADSIZE_LW                           = 64
	KEY_OFFSET                               = 5
	KEY_SIZE                                 = 32
	NFP_FLOWER_LAYER_EXT_META                = (1 << 0)
	NFP_FLOWER_LAYER_PORT                    = (1 << 1)
	NFP_FLOWER_LAYER_MAC                     = (1 << 2)
	NFP_FLOWER_LAYER_TP                      = (1 << 3)
	NFP_FLOWER_LAYER_IPV4                    = (1 << 4)
	NFP_FLOWER_LAYER_IPV6                    = (1 << 5)
	NFP_FLOWER_LAYER_VXLAN                   = (1 << 7)
	NFP_FLOWER_LAYER2_GRE                    = (1 << 0)
	NFP_FLOWER_LAYER2_QINQ                   = (1 << 4)
	NFP_FLOWER_LAYER2_GENEVE                 = (1 << 5)
	NFP_FLOWER_LAYER2_GENEVE_OP              = (1 << 6)
	NFP_FLOWER_LAYER2_TUN_IPV6               = (1 << 7)
	NFP_FLOWER_PORT_TYPE                     = (0xF << 28)
	NFP_FLOWER_PORT_TYPE_PHYS_PORT           = 0x1
	NFP_FLOWER_PORT_TYPE_PCIE_PORT           = 0x2
	NFP_FLOWER_PORT_VNIC_TYPE                = (0x7 << 11)
	NFP_FLOWER_PORT_VNIC_TYPE_VF             = 0
	NFP_FLOWER_PORT_VNIC_TYPE_PF             = 1
	NFP_FL_PORT_TYPE_TUN                     = 0x50000000
	NFP_FLOWER_TUNNEL_GRE                    = 0x1
	NFP_FLOWER_TUNNEL_VXLAN                  = 0x2
	NFP_FLOWER_TUNNEL_GENVE                  = 0x4
	NFP_FLOWER_ACTION_OPCODE_OUTPUT          = 0
	NFP_FLOWER_ACTION_OPCODE_PUSH_VLAN       = 1
	NFP_FLOWER_ACTION_OPCODE_POP_VLAN        = 2
	NFP_FLOWER_ACTION_OPCODE_PUSH_MPLS       = 3
	NFP_FLOWER_ACTION_OPCODE_POP_MPLS        = 4
	NFP_FLOWER_ACTION_OPCODE_SET_TUN_KEY     = 6
	NFP_FLOWER_ACTION_OPCODE_SET_ETH_ADDRS   = 7
	NFP_FLOWER_ACTION_OPCODE_SET_MPLS        = 8
	NFP_FLOWER_ACTION_OPCODE_SET_IPV4_ADDRS  = 9
	NFP_FLOWER_ACTION_OPCODE_SET_IPV4_FIELDS = 10
	NFP_FLOWER_ACTION_OPCODE_SET_IPV6_SRC    = 11
	NFP_FLOWER_ACTION_OPCODE_SET_IPV6_DST    = 12
	NFP_FLOWER_ACTION_OPCODE_SET_IPV6_FIELDS = 13
	NFP_FLOWER_ACTION_OPCODE_SET_UDP         = 14
	NFP_FLOWER_ACTION_OPCODE_SET_TCP         = 15
	NFP_FLOWER_ACTION_OPCODE_PRE_LAG         = 16
	NFP_FLOWER_ACTION_OPCODE_PRE_TUNNEL      = 17
	NFP_FLOWER_ACTION_OPCODE_PUSH_GENEVE     = 26

	NfpReadBufferSize  = 128 * 1024
	NFP_PCIE_LAT       = 18
	NetSysDir          = "/sys/class/net"
	PciSysDir          = "/sys/bus/pci/devices"
	NetdevPhysPortName = "phys_port_name"
	CorigineVendor     = "0x1da8"
	NetronomeVendor    = "0x19ee"
	NFP4000            = "0x4000"
	NFP6000            = "0x6000"
	TUNNEL_VXLAN       = "Vxlan"
	TUNNEL_GRE         = "Gre"
	TUNNEL_GENVE       = "Genve"
	NonPortName        = "Other"
)

Variables

This section is empty.

Functions

func DisplayFlowEntry

func DisplayFlowEntry(filter *FlowFilter)

func GetCorigineNicDevice

func GetCorigineNicDevice() []string

func StatsFlowEntry

func StatsFlowEntry() map[string]uint32

Types

type FlowEntry

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

func (*FlowEntry) PrintEntryInfo

func (flow *FlowEntry) PrintEntryInfo()

type FlowEntryAction

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

type FlowEntryActionOutPort

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

type FlowEntryActionSetEth

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

type FlowEntryActionSetIp

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

type FlowEntryActionSetTp

type FlowEntryActionSetTp struct {
	L4srcPort     uint16
	L4srcPortMask uint16
	L4dstPort     uint16
	L4dstPortMask uint16
}

type FlowEntryActionSetTunnel

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

type FlowEntryKey

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

type FlowFilter

type FlowFilter struct {
	DevName   string
	SrcIp     string
	DstIp     string
	L4SrcPort uint16
	L4DstPort uint16
}

type NfpDevice

type NfpDevice struct {
	PciDevice string
	// contains filtered or unexported fields
}

func NewNfpDevice

func NewNfpDevice(devNo uint, pciDevice string) *NfpDevice

func (*NfpDevice) Close

func (dev *NfpDevice) Close()

func (*NfpDevice) GetBucketCount

func (dev *NfpDevice) GetBucketCount(emmu uint32) int

func (*NfpDevice) GetDevNameByPortIndex

func (dev *NfpDevice) GetDevNameByPortIndex(port uint32) (string, error)

func (*NfpDevice) GetLatancy

func (dev *NfpDevice) GetLatancy() (uint32, error)

func (*NfpDevice) GetTemperature

func (dev *NfpDevice) GetTemperature() (float32, error)

func (*NfpDevice) GetVfRepPortName

func (dev *NfpDevice) GetVfRepPortName(portIndex uint32) (string, error)

Jump to

Keyboard shortcuts

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