Documentation ¶
Overview ¶
Package vppinit contains initialization code for vpp
Index ¶
- func InitLinks(ctx context.Context, vppConn api.Connection, deviceNames map[string]string, ...) error
- func LinkToSocket(ctx context.Context, vppConn api.Connection, tunnelIP net.IP, family AfType) (net.IP, error)
- func Must(tunnelIP net.IP, err error) net.IP
- func None(_ context.Context, _ api.Connection, tunnelIP net.IP) (net.IP, error)
- type AfPacketParams
- type AfType
- type AfXDPParams
- type Func
- type Parameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLinks ¶ added in v1.1.1
func InitLinks(ctx context.Context, vppConn api.Connection, deviceNames map[string]string, tunnelIP net.IP) error
InitLinks creates AF_PACKET interface if needed and put the given interfaces in promisc mode
func LinkToSocket ¶ added in v1.9.0
func LinkToSocket(ctx context.Context, vppConn api.Connection, tunnelIP net.IP, family AfType) (net.IP, error)
LinkToSocket - will link vpp via af_packet or af_xdp to the interface having the tunnelIP if tunnelIP is nil, it will find the interface for the default route and use that instead. It returns the resulting tunnelIP
Types ¶
type AfPacketParams ¶ added in v1.13.0
type AfPacketParams struct { Mode af_packet.AfPacketMode `yaml:"mode"` RxFrameSize uint32 `yaml:"rxFrameSize"` TxFrameSize uint32 `yaml:"txFrameSize"` RxFramesPerBlock uint32 `yaml:"rxFramesPerBlock"` TxFramesPerBlock uint32 `yaml:"txFramesPerBlock"` NumRxQueues uint16 `yaml:"numRxQueues"` NumTxQueues uint16 `yaml:"numTxQueues"` Flags af_packet.AfPacketFlags `yaml:"flags"` }
AfPacketParams contains configuration parameters for AF_PACKET interface
func GetAfPacketValues ¶ added in v1.13.0
func GetAfPacketValues(ctx context.Context) *AfPacketParams
GetAfPacketValues get parameter values for af-packet interface creation
type AfXDPParams ¶ added in v1.13.0
type AfXDPParams struct { Mode af_xdp.AfXdpMode `yaml:"mode"` RxqSize uint16 `yaml:"rxqSize"` TxqSize uint16 `yaml:"txqSize"` Flags af_xdp.AfXdpFlag `yaml:"flags"` }
AfXDPParams contains configuration parameters for AF_XDP interface
func GetAfXdpValues ¶ added in v1.13.0
func GetAfXdpValues(ctx context.Context) *AfXDPParams
GetAfXdpValues get parameter values for af-xdp interface creation
type Func ¶
type Func struct {
// contains filtered or unexported fields
}
Func - vpp initialization function
type Parameters ¶ added in v1.13.0
type Parameters struct { AfPacket *AfPacketParams `yaml:"AF_PACKET"` AfXdp *AfXDPParams `yaml:"AF_XDP"` }
Parameters contains parameters for various AF types
func (*Parameters) String ¶ added in v1.13.0
func (c *Parameters) String() string