Documentation ¶
Overview ¶
Network counters + packet/byte counters optimized for large tables and cache locality.
Index ¶
- Constants
- Variables
- func AddInit(f initHook, deps ...*dep.Dep)
- func ByteAdd(a []byte, x uint64)
- func HostIsNetworkByteOrder() bool
- func IPAdd(ip *net.IP, x uint64)
- func MakePacket(args ...PacketHeader) (b []byte)
- func Perform2Rewrites(r0, r1 *Ref, rw0, rw1 *Rewrite)
- func PerformRewrite(r0 *Ref, rw0 *Rewrite)
- func Pointer(b []byte) unsafe.Pointer
- func RefFlag1(f BufferFlag, r []Ref, i uint) bool
- func RefFlag2(f BufferFlag, r []Ref, i uint) bool
- func RefFlag4(f BufferFlag, r []Ref, i uint) bool
- type ActionType
- type Arper
- type Bandwidth
- type Bool
- type BridgeAddDelHook_t
- type BridgeMemberAddDelHook_t
- type BridgeMemberLookup_t
- type BridgeNotifierFn
- type Buffer
- type BufferError
- type BufferFlag
- type BufferPool
- func (p *BufferPool) AllocCachedRefs() (r RefVec)
- func (p *BufferPool) AllocRefs(r RefVec)
- func (p *BufferPool) AllocRefsStride(r *Ref, n, stride uint)
- func (p *BufferPool) FreeRefs(r *Ref, n uint, freeNext bool)
- func (p *BufferPool) GetBufferTemplate() *Buffer
- func (p *BufferPool) GetRefTemplate() *Ref
- func (p *BufferPool) ValidateRef(r *Ref, want BufferState)
- func (p *BufferPool) ValidateRefs(refs []Ref, want hw.BufferState)
- type BufferState
- type CombinedCounter
- type CombinedCounterVec
- func (p CombinedCounterVec) Len() uint
- func (p *CombinedCounterVec) ResetLen()
- func (p *CombinedCounterVec) Resize(n uint)
- func (p *CombinedCounterVec) Validate(i uint) *CombinedCounter
- func (p *CombinedCounterVec) ValidateInit(i uint, zero CombinedCounter) *CombinedCounter
- func (p *CombinedCounterVec) ValidateLen(l uint) (v *CombinedCounter)
- func (p *CombinedCounterVec) ValidateLenInit(l uint, zero CombinedCounter) (v *CombinedCounter)
- type CombinedCounters
- func (c *CombinedCounters) Add(i uint, p, b uint)
- func (c *CombinedCounters) Add64(i uint, p, b uint64)
- func (c *CombinedCounters) Clear(i uint)
- func (c *CombinedCounters) ClearAll()
- func (c *CombinedCounters) Get(i uint, r *CombinedCounter)
- func (c *CombinedCounters) Validate(i uint)
- func (c *CombinedCounters) Value(i uint) (v CombinedCounter)
- type CombinedCountersVec
- func (c CombinedCountersVec) ClearAll()
- func (p CombinedCountersVec) Len() uint
- func (p *CombinedCountersVec) ResetLen()
- func (p *CombinedCountersVec) Resize(n uint)
- func (p *CombinedCountersVec) Validate(i uint) *CombinedCounters
- func (p *CombinedCountersVec) ValidateInit(i uint, zero CombinedCounters) *CombinedCounters
- func (p *CombinedCountersVec) ValidateLen(l uint) (v *CombinedCounters)
- func (p *CombinedCountersVec) ValidateLenInit(l uint, zero CombinedCounters) (v *CombinedCounters)
- type ConfigFileData
- type Counters
- func (c *Counters) Add(i, x uint)
- func (c *Counters) Add64(i uint, x uint64)
- func (c *Counters) Clear(i uint)
- func (c *Counters) ClearAll()
- func (c *Counters) Get(i uint, v *uint64)
- func (c *Counters) Set(i uint, x uint64)
- func (c *Counters) Validate(i uint)
- func (c *Counters) Value(i uint) (v uint64)
- type CountersVec
- func (c CountersVec) ClearAll()
- func (p CountersVec) Len() uint
- func (p *CountersVec) ResetLen()
- func (p *CountersVec) Resize(n uint)
- func (p *CountersVec) Validate(i uint) *Counters
- func (p *CountersVec) ValidateInit(i uint, zero Counters) *Counters
- func (p *CountersVec) ValidateLen(l uint) (v *Counters)
- func (p *CountersVec) ValidateLenInit(l uint, zero Counters) (v *Counters)
- type DestConfigData
- type DestConfigFileData
- type Devicer
- type ErrorRef
- type Event
- type Eventer
- type FromFeMsg
- type GivenPayload
- type Hi
- func (i Hi) GetAddress(v *Vnet) []byte
- func (hi Hi) IsLinkUp(v *Vnet) bool
- func (hi Hi) IsProvisioned(v *Vnet) bool
- func (i Hi) Name(v *Vnet) string
- func (hi *Hi) ParseWithArgs(in *parse.Input, args *parse.Args)
- func (hi Hi) SetAdminUp(v *Vnet, isUp bool) (err error)
- func (hi Hi) SetMedia(v *Vnet, pi string) error
- func (hi Hi) SetSpeed(v *Vnet, s Bandwidth) error
- func (hi Hi) Si(m *Vnet) Si
- type HostUint16
- type HostUint32
- type HostUint64
- type HwIf
- func (h *HwIf) DefaultId() IfId
- func (h *HwIf) ElogName() elog.StringRef
- func (h *HwIf) FormatId(a IfId) string
- func (h *HwIf) GetHwIf() *HwIf
- func (h *HwIf) GetSwInterfaceCounterNames() (nm InterfaceCounterNames)
- func (h *HwIf) GetVnet() *Vnet
- func (h *HwIf) Hi() Hi
- func (h *HwIf) IsLinkUp() bool
- func (h *HwIf) IsProvisioned() bool
- func (h *HwIf) IsUnix() bool
- func (h *HwIf) LaneMask() LaneMask
- func (a *HwIf) LessThan(b HwInterfacer) bool
- func (h *HwIf) LessThanId(a, b IfId) bool
- func (h *HwIf) LinkString() (s string)
- func (h *HwIf) MaxPacketSize() uint
- func (h *HwIf) Media() string
- func (h *HwIf) Name() string
- func (h *HwIf) ParseId(a *IfId, in *parse.Input) bool
- func (h *HwIf) SetAdminUp(isUp bool) (err error)
- func (h *HwIf) SetLinkUp(v bool) (err error)
- func (h *HwIf) SetLoopback(v IfLoopbackType) (err error)
- func (h *HwIf) SetMaxPacketSize(v uint) (err error)
- func (hw *HwIf) SetMedia(pi string) (err error)
- func (h *HwIf) SetName(v *Vnet, name string)
- func (h *HwIf) SetProvisioned(v bool) (err error)
- func (hw *HwIf) SetSpeed(v Bandwidth) (err error)
- func (h *HwIf) Si() Si
- func (h *HwIf) Speed() Bandwidth
- func (h *HwIf) ValidateMedia(pi string) (err error)
- func (h *HwIf) ValidateSpeed(v Bandwidth) (err error)
- type HwIfAddDelHook
- type HwIfAddDelHookVec
- type HwIfChooser
- type HwIfClasser
- type HwIfCombinedCounterKind
- type HwIfCounterKind
- type HwIfLinkUpDownHook
- type HwIfLinkUpDownHookVec
- type HwIfProvisionHook
- type HwIfProvisionHookVec
- type HwInterfacer
- type IfId
- type IfIndex
- type IfLoopbackType
- type InOutNode
- type InOutNoder
- type IncrementingPayload
- type InputNode
- type InputNoder
- type InterfaceCounterNames
- type InterfaceNode
- type InterfaceThread
- type IsDel
- type LaneMask
- type Layer
- type LinkStateEvent
- type MaskedStringer
- type MaskedStrings
- type MirrorConfigData
- type MirrorConfigFileData
- type Node
- func (n *Node) AddSuspendActivity(i *RefIn, a int)
- func (d *Node) CountError(i, count uint)
- func (node *Node) ErrorRedirect(in *RefIn, out *RefOut, next uint, err ErrorRef)
- func (n *Node) ErrorRef(i uint) ErrorRef
- func (n *Node) GetIfThread() *InterfaceThread
- func (n *Node) GetVnetNode() *Node
- func (n *Node) NewError(s string) (r ErrorRef)
- func (node *Node) Redirect(in *RefIn, out *RefOut, next uint)
- func (n *Node) Resume(i *RefIn)
- func (n *Node) SetError(r *Ref, i uint)
- func (n *Node) SetOutLen(out *RefIn, in *RefIn, l uint)
- func (n *Node) SignalEvent(r Eventer)
- func (n *Node) SignalEventAfter(r Eventer, dt float64)
- func (n *Node) SignalEventAfterp(r Eventer, dt float64, p elog.PointerToFirstArg)
- func (n *Node) SignalEventp(r Eventer, p elog.PointerToFirstArg)
- func (n *Node) Suspend(i *RefIn)
- type Noder
- type OutputInterfaceNode
- type OutputNode
- type OutputNoder
- type Package
- type Packager
- type PacketHeader
- type PacketType
- type PortEntry
- type PortsMap
- func (p *PortsMap) Foreach(f func(ifname string, pe *PortEntry))
- func (p *PortsMap) ForeachNameByIndex(f func(ifindex int32, ifname string))
- func (p *PortsMap) ForeachSiByIndex(f func(ifindex int32, si Si))
- func (p *PortsMap) GetNameByIndex(ifindex int32) (string, bool)
- func (p *PortsMap) GetNumSubports(ifname string) (numSubports uint)
- func (p *PortsMap) GetPortByIndex(ifindex int32) (*PortEntry, bool)
- func (p *PortsMap) GetPortByName(ifname string) (*PortEntry, bool)
- func (p *PortsMap) GetSiByIndex(ifindex int32) (Si, bool)
- func (p *PortsMap) IfName(portindex, subportindex int) (name string)
- func (p *PortsMap) SetPort(ifname string) (pe *PortEntry)
- func (p *PortsMap) SetPortByIndex(ifindex int32, ifname string) *PortEntry
- func (p *PortsMap) SetSiByIfindex(ifindex int32, si Si)
- func (p *PortsMap) UnsetPort(ifname string)
- type Ref
- func (r *Ref) Flags() BufferFlag
- func (r *Ref) Foreach(f func(r *Ref, i uint))
- func (r *Ref) GetBuffer() *Buffer
- func (r *Ref) NextRef() *Ref
- func (r *Ref) NextValidFlag() BufferFlag
- func (r *Ref) Trace(p *BufferPool, i hw.BufferTracer, e int)
- func (r *Ref) ValidateState(p *BufferPool, s BufferState)
- type RefChain
- type RefHeader
- type RefIn
- func (i *RefIn) AddLen(v *Vnet) (l uint)
- func (r *RefIn) AllocPoolRefs(p *BufferPool, n uint)
- func (i *RefIn) AllocRefs(n uint)
- func (r *RefIn) Cap() uint
- func (i *RefIn) Dup(x *RefIn)
- func (r *RefIn) FreePoolRefs(p *BufferPool, n uint)
- func (i *RefIn) FreeRefs(n uint)
- func (r *RefIn) Get1(i uint) (_ *Ref)
- func (r *RefIn) Get2(i uint) (_, _ *Ref)
- func (r *RefIn) Get4(i uint) (_, _, _, _ *Ref)
- func (i *RefIn) GetLen(v *Vnet) uint
- func (in *RefIn) SetLen(v *Vnet, new_len uint)
- func (i *RefIn) SetPoolAndLen(v *Vnet, p *BufferPool, l uint)
- type RefOpaque
- type RefOut
- type RefVec
- type RefVecIn
- type Reg32
- type Reg64
- type Rewrite
- func (r *Rewrite) AddData(p unsafe.Pointer, size uintptr) (l uintptr)
- func (r *Rewrite) Data() []byte
- func (r *Rewrite) GetData() unsafe.Pointer
- func (r *Rewrite) Len() uint
- func (r *Rewrite) Lines(v *Vnet) (lines []string)
- func (r *Rewrite) ParseWithArgs(in *parse.Input, args *parse.Args)
- func (r *Rewrite) ResetData()
- func (r *Rewrite) SetData(d []byte)
- func (r *Rewrite) SetLen(l uint)
- func (r *Rewrite) SetMaxPacketSize(hw *HwIf)
- func (r *Rewrite) Slice() []byte
- func (r *Rewrite) String() (dump string)
- type RxDmaDescriptorFlags
- type RxDmaRefState
- type RxDmaRing
- func (g *RxDmaRing) Flush()
- func (g *RxDmaRing) MaxNext() (n uint)
- func (g *RxDmaRing) RefillRef(i rxDmaRingIndex) *Ref
- func (r *RxDmaRing) RingIndex(i uint) rxDmaRingIndex
- func (g *RxDmaRing) Rx1Descriptor(ri rxDmaRingIndex, b0 uint, f0 RxDmaDescriptorFlags)
- func (g *RxDmaRing) Rx4Descriptors(ri rxDmaRingIndex, b0, b1, b2, b3 uint, f0, f1, f2, f3 RxDmaDescriptorFlags)
- func (g *RxDmaRing) RxDmaRingInit(v *Vnet, r RxDmaRinger, flags RxDmaDescriptorFlags, ...)
- func (g *RxDmaRing) RxRef(i rxDmaRingIndex) *Ref
- func (r *RxDmaRing) WrapRefill()
- type RxDmaRinger
- type RxTx
- type SflowConfigData
- type SflowConfigFileData
- type Si
- func (si Si) GetType(v *Vnet) swInterfaceTyper
- func (si Si) Id(v *Vnet) (id IfId)
- func (si Si) IsAdminUp(v *Vnet) bool
- func (si Si) IsSwSubInterface(v *Vnet) bool
- func (si Si) Kind(v *Vnet) SwIfKind
- func (si *Si) ParseWithArgs(in *parse.Input, args *parse.Args)
- func (si Si) SetAdminUp(v *Vnet, isUp bool) (err error)
- func (si Si) SetId(v *Vnet, id IfId)
- func (si Si) SupSi(v *Vnet) Si
- type SiName
- type SviVnetFeMsg
- type SwIf
- type SwIfAddDelHook
- type SwIfAddDelHookVec
- type SwIfAdminUpDownHook
- type SwIfAdminUpDownHookVec
- type SwIfChooser
- type SwIfCounterSyncHook
- type SwIfCounterSyncHookVec
- type SwIfKind
- type SwInterfaceType
- func (t *SwInterfaceType) GetSwInterfaceType() *SwInterfaceType
- func (t *SwInterfaceType) SwInterfaceLessThan(v *Vnet, a, b *SwIf) bool
- func (t *SwInterfaceType) SwInterfaceName(v *Vnet, s *SwIf) string
- func (t *SwInterfaceType) SwInterfaceRewriteString(v *Vnet, r *Rewrite) []string
- func (t *SwInterfaceType) SwInterfaceSetRewrite(rw *Rewrite, si Si, noder Noder, typ PacketType)
- type TxDmaRing
- type TxRefVecIn
- type Uint16
- type Uint32
- type Uint64
- type Uint8
- type Vnet
- func (v *Vnet) AddBufferPool(p *BufferPool)
- func (v *Vnet) AddNamedNext(n Noder, name string) uint
- func (v *Vnet) AddPackage(name string, r Packager) (pi uint)
- func (m *Vnet) CleanAndDownSwInterface(si Si)
- func (v *Vnet) CliAdd(c *cli.Command)
- func (v *Vnet) CliInit()
- func (v *Vnet) Configure(in *parse.Input) (err error)
- func (v *Vnet) ConfigurePackages(in *parse.Input) (err error)
- func (v *Vnet) CurrentEvent() *loop.Event
- func (m *Vnet) DelSwIf(si Si)
- func (m *Vnet) ExitPackages() (err error)
- func (v *Vnet) Fatalf(format string, args ...interface{})
- func (v *Vnet) ForeachHighFreqHwIfCounter(zero bool, unixOnly bool, f func(hi Hi, name string, value uint64))
- func (v *Vnet) ForeachHwIf(unixOnly bool, f func(hi Hi))
- func (v *Vnet) ForeachHwIfCounter(zero bool, unixOnly bool, f func(hi Hi, name string, value uint64))
- func (v *Vnet) ForeachSwIf(f func(si Si))
- func (v *Vnet) ForeachSwIfCounter(zero bool, f func(si Si, siName, counterName string, value uint64))
- func (v *Vnet) FreeTxRefIn(i *TxRefVecIn)
- func (m *Vnet) GetIfThread(id uint) (t *InterfaceThread)
- func (v *Vnet) GetLoop() *loop.Loop
- func (m *Vnet) GetPackage(i uint) Packager
- func (m *Vnet) HwIf(i Hi) *HwIf
- func (v *Vnet) HwIfByName(name string) (Hi, bool)
- func (m *Vnet) HwIfer(i Hi) HwInterfacer
- func (m *Vnet) HwIferForSupSi(si Si) (h HwInterfacer)
- func (v *Vnet) HwLessThan(a, b *HwIf) bool
- func (m *Vnet) HwSwCombinedIfCounter(i uint) swIfCombinedCounterKind
- func (m *Vnet) HwSwSingleIfCounter(i uint) swIfCounterKind
- func (m *Vnet) InitPackages() (err error)
- func (v *Vnet) Logf(format string, args ...interface{})
- func (v *Vnet) Logln(args ...interface{})
- func (v *Vnet) NewSwCombinedCounters(names []string) swIfCombinedCounterKind
- func (v *Vnet) NewSwCounters(names []string) swIfCounterKind
- func (m *Vnet) NewSwIf(kind SwIfKind, id IfId, ifname string) Si
- func (m *Vnet) NewSwSubInterface(supSi Si, id IfId, ifname string) (si Si)
- func (m *Vnet) PackageByName(name string) (i uint, ok bool)
- func (v *Vnet) Quit()
- func (v *Vnet) RegisterAndProvisionHwInterface(h HwInterfacer, provision bool, format string, args ...interface{}) (err error)
- func (v *Vnet) RegisterBridgeAddDelHook(h BridgeAddDelHook_t)
- func (v *Vnet) RegisterBridgeMemberAddDelHook(h BridgeMemberAddDelHook_t)
- func (v *Vnet) RegisterBridgeMemberLookup(h BridgeMemberLookup_t)
- func (m *Vnet) RegisterHwIfAddDelHook(h HwIfAddDelHook)
- func (m *Vnet) RegisterHwIfLinkUpDownHook(h HwIfLinkUpDownHook)
- func (m *Vnet) RegisterHwIfProvisionHook(h HwIfProvisionHook)
- func (v *Vnet) RegisterHwInterface(h HwInterfacer, format string, args ...interface{}) (err error)
- func (v *Vnet) RegisterInOutNode(n InOutNoder, name string, args ...interface{})
- func (v *Vnet) RegisterInputNode(n InputNoder, name string, args ...interface{})
- func (v *Vnet) RegisterInterfaceNode(n inputOutputInterfaceNoder, hi Hi, name string, args ...interface{})
- func (v *Vnet) RegisterNode(n Noder, format string, args ...interface{})
- func (v *Vnet) RegisterOutputInterfaceNode(n outputInterfaceNoder, hi Hi, name string, args ...interface{})
- func (v *Vnet) RegisterOutputNode(n OutputNoder, name string, args ...interface{})
- func (m *Vnet) RegisterSwIfAddDelHook(h SwIfAddDelHook)
- func (m *Vnet) RegisterSwIfAdminUpDownHook(h SwIfAdminUpDownHook)
- func (m *Vnet) RegisterSwIfCounterSyncHook(h SwIfCounterSyncHook)
- func (i *Vnet) RegisterSwInterfaceType(r swInterfaceTyper)
- func (v *Vnet) Run(in *parse.Input) (err error)
- func (v *Vnet) SetRewrite(rw *Rewrite, si Si, noder Noder, t PacketType, dstAddr []byte)
- func (v *Vnet) SetRewriteNodeHwIf(rw *Rewrite, hw *HwIf, noder Noder) (h HwInterfacer)
- func (v *Vnet) SignalEvent(r Eventer)
- func (v *Vnet) SignalEventAfter(r Eventer, dt float64)
- func (m *Vnet) SupHi(si Si) Hi
- func (m *Vnet) SupHwIf(s *SwIf) (h *HwIf)
- func (m *Vnet) SupSi(i Si) Si
- func (m *Vnet) SupSwIf(s *SwIf) (sup *SwIf)
- func (m *Vnet) SwIf(i Si) *SwIf
- func (m *Vnet) SwIfValid(i Si) bool
- func (v *Vnet) SwLessThan(a, b *SwIf) bool
- func (v *Vnet) TimeDiff(t0, t1 cpu.Time) float64
Constants ¶
const ( BufferUnknown = BufferState(hw.BufferUnknown) BufferKnownAllocated = BufferState(hw.BufferKnownAllocated) BufferKnownFree = BufferState(hw.BufferKnownFree) )
const ( NextValid = BufferFlag(hw.NextValid) Cloned = BufferFlag(hw.Cloned) )
const ( SiNil Si = ^Si(0) HiNil Hi = ^Hi(0) )
const ( Bps = 1e0 Kbps = 1e3 Mbps = 1e6 Gbps = 1e9 Tbps = 1e12 Bytes = 1 Kbytes = 1 << 10 Mbytes = 1 << 20 Gbytes = 1 << 30 )
To clarify units: 1e9 * vnet.Bps
const ( IfDrops swIfCounterKind = iota IfPunts )
const ( IfRxCounter swIfCombinedCounterKind = iota IfTxCounter )
const ( MSG_FROM_VNET = iota MSG_SVI_BRIDGE_ADD MSG_SVI_BRIDGE_DELETE MSG_SVI_BRIDGE_MEMBER_ADD MSG_SVI_BRIDGE_MEMBER_DELETE )
const ( MSG_FROM_FE = iota + 128 MSG_SVI_FDB_ADD MSG_SVI_FDB_DELETE )
const License = `` /* 15871-byte string literal not displayed */
const MaxOutstandingTxRefs = 16 * MaxVectorLen
Largest number of outstanding transmit buffers before we suspend.
const MaxVectorLen = loop.MaxVectorLen
const Version = "v1.4.6"
Version format :: v<MAJOR>.<MINOR>.<PATCH>[-rc.<CANDIDATE>]
Variables ¶
var ( PortIsCopper = func(ifname string) bool { return false } PortIsFec74 = func(ifname string) bool { return false } PortIsFec91 = func(ifname string) bool { return false } )
var AdjDebug bool
Debug Flags
var DefaultBufferPool = &BufferPool{
Name: "default",
BufferTemplate: getDefaultBufferTemplate(),
}
var ErrNotSupported = errors.New("not supported")
var ErrorNode = &errorNode{}
var SviFromFeCh chan FromFeMsg // for l2-mod learning event reporting
Functions ¶
func HostIsNetworkByteOrder ¶
func HostIsNetworkByteOrder() bool
func MakePacket ¶
func MakePacket(args ...PacketHeader) (b []byte)
func Perform2Rewrites ¶
func PerformRewrite ¶
Types ¶
type ActionType ¶
type ActionType int
const ( PreVnetd ActionType = iota // before vnetd is started ReadyVnetd // vnetd has declared it's ready PostReadyVnetd // vnetd processing something initated from previous state Dynamic // free-run case )
type Arper ¶
type Arper interface {
SupportsArp()
}
Interface defines SupportsArp method to enable glean adjacencies.
type Bool ¶
type Bool bool
func (Bool) MaskedString ¶
func (v Bool) MaskedString(r MaskedStringer) (s string)
type BridgeAddDelHook_t ¶
type BridgeAddDelHook_t func(brsi Si, stag uint16, puntIndex uint8, addr net.HardwareAddr, isAdd bool) (err error)
simplified hooks for direct calls to fe1 from vnet
type BridgeMemberLookup_t ¶
type BridgeMemberLookup_t func(stag uint16, addr net.HardwareAddr) (pipe_port uint16, err error)
type BridgeNotifierFn ¶
type BridgeNotifierFn func()
type BufferError ¶
type BufferError struct {
// contains filtered or unexported fields
}
type BufferFlag ¶
type BufferFlag hw.BufferFlag
type BufferPool ¶
type BufferPool hw.BufferPool
func (*BufferPool) AllocCachedRefs ¶
func (p *BufferPool) AllocCachedRefs() (r RefVec)
func (*BufferPool) AllocRefs ¶
func (p *BufferPool) AllocRefs(r RefVec)
func (*BufferPool) AllocRefsStride ¶
func (p *BufferPool) AllocRefsStride(r *Ref, n, stride uint)
func (*BufferPool) GetBufferTemplate ¶
func (p *BufferPool) GetBufferTemplate() *Buffer
func (*BufferPool) GetRefTemplate ¶
func (p *BufferPool) GetRefTemplate() *Ref
func (*BufferPool) ValidateRef ¶
func (p *BufferPool) ValidateRef(r *Ref, want BufferState)
func (*BufferPool) ValidateRefs ¶
func (p *BufferPool) ValidateRefs(refs []Ref, want hw.BufferState)
type BufferState ¶
type BufferState hw.BufferState
type CombinedCounter ¶
type CombinedCounter struct{ Packets, Bytes uint64 }
func (*CombinedCounter) Add ¶
func (c *CombinedCounter) Add(d *CombinedCounter)
func (*CombinedCounter) Sub ¶
func (c *CombinedCounter) Sub(d *CombinedCounter)
func (*CombinedCounter) Zero ¶
func (c *CombinedCounter) Zero()
type CombinedCounterVec ¶
type CombinedCounterVec []CombinedCounter
func (CombinedCounterVec) Len ¶
func (p CombinedCounterVec) Len() uint
func (*CombinedCounterVec) ResetLen ¶
func (p *CombinedCounterVec) ResetLen()
func (*CombinedCounterVec) Resize ¶
func (p *CombinedCounterVec) Resize(n uint)
func (*CombinedCounterVec) Validate ¶
func (p *CombinedCounterVec) Validate(i uint) *CombinedCounter
func (*CombinedCounterVec) ValidateInit ¶
func (p *CombinedCounterVec) ValidateInit(i uint, zero CombinedCounter) *CombinedCounter
func (*CombinedCounterVec) ValidateLen ¶
func (p *CombinedCounterVec) ValidateLen(l uint) (v *CombinedCounter)
func (*CombinedCounterVec) ValidateLenInit ¶
func (p *CombinedCounterVec) ValidateLenInit(l uint, zero CombinedCounter) (v *CombinedCounter)
type CombinedCounters ¶
type CombinedCounters struct {
// contains filtered or unexported fields
}
func (*CombinedCounters) Add ¶
func (c *CombinedCounters) Add(i uint, p, b uint)
func (*CombinedCounters) Add64 ¶
func (c *CombinedCounters) Add64(i uint, p, b uint64)
Add packet and byte increment to counter.
func (*CombinedCounters) Clear ¶
func (c *CombinedCounters) Clear(i uint)
func (*CombinedCounters) ClearAll ¶
func (c *CombinedCounters) ClearAll()
func (*CombinedCounters) Get ¶
func (c *CombinedCounters) Get(i uint, r *CombinedCounter)
Get counter value: 2 flavors.
func (*CombinedCounters) Validate ¶
func (c *CombinedCounters) Validate(i uint)
func (*CombinedCounters) Value ¶
func (c *CombinedCounters) Value(i uint) (v CombinedCounter)
type CombinedCountersVec ¶
type CombinedCountersVec []CombinedCounters
func (CombinedCountersVec) ClearAll ¶
func (c CombinedCountersVec) ClearAll()
func (CombinedCountersVec) Len ¶
func (p CombinedCountersVec) Len() uint
func (*CombinedCountersVec) ResetLen ¶
func (p *CombinedCountersVec) ResetLen()
func (*CombinedCountersVec) Resize ¶
func (p *CombinedCountersVec) Resize(n uint)
func (*CombinedCountersVec) Validate ¶
func (p *CombinedCountersVec) Validate(i uint) *CombinedCounters
func (*CombinedCountersVec) ValidateInit ¶
func (p *CombinedCountersVec) ValidateInit(i uint, zero CombinedCounters) *CombinedCounters
func (*CombinedCountersVec) ValidateLen ¶
func (p *CombinedCountersVec) ValidateLen(l uint) (v *CombinedCounters)
func (*CombinedCountersVec) ValidateLenInit ¶
func (p *CombinedCountersVec) ValidateLenInit(l uint, zero CombinedCounters) (v *CombinedCounters)
type ConfigFileData ¶
type ConfigFileData struct { MirrorCfgFileData MirrorConfigFileData DestCfgFileData DestConfigFileData SflowCfgFileData SflowConfigFileData }
func (*ConfigFileData) ReadConfigFile ¶
func (cfd *ConfigFileData) ReadConfigFile() (err error)
func (*ConfigFileData) WriteConfigFile ¶
func (cfd *ConfigFileData) WriteConfigFile() (err error)
type Counters ¶
type Counters struct {
// contains filtered or unexported fields
}
Array of single counters
type CountersVec ¶
type CountersVec []Counters
func (CountersVec) ClearAll ¶
func (c CountersVec) ClearAll()
func (CountersVec) Len ¶
func (p CountersVec) Len() uint
func (*CountersVec) ResetLen ¶
func (p *CountersVec) ResetLen()
func (*CountersVec) Resize ¶
func (p *CountersVec) Resize(n uint)
func (*CountersVec) Validate ¶
func (p *CountersVec) Validate(i uint) *Counters
func (*CountersVec) ValidateInit ¶
func (p *CountersVec) ValidateInit(i uint, zero Counters) *Counters
func (*CountersVec) ValidateLen ¶
func (p *CountersVec) ValidateLen(l uint) (v *Counters)
func (*CountersVec) ValidateLenInit ¶
func (p *CountersVec) ValidateLenInit(l uint, zero Counters) (v *Counters)
type DestConfigData ¶
type DestConfigFileData ¶
type DestConfigFileData struct {
Dest []DestConfigData
}
type Devicer ¶
type Devicer interface { Noder loop.OutputLooper DriverName() string // name of device driver LessThan(b HwInterfacer) bool IsUnix() bool ValidateSpeed(speed Bandwidth) error ValidateMedia(pi string) error SetLoopback(v IfLoopbackType) error GetHwInterfaceCounterNames() InterfaceCounterNames GetSwInterfaceCounterNames() InterfaceCounterNames GetHwInterfaceCounterValues(t *InterfaceThread) GetHwInterfaceFinalSpeed() (s Bandwidth) }
type GivenPayload ¶
type GivenPayload struct{ Payload []byte }
Header for a given fixed payload.
func (*GivenPayload) Finalize ¶
func (i *GivenPayload) Finalize(l []PacketHeader)
func (*GivenPayload) Len ¶
func (i *GivenPayload) Len() uint
func (*GivenPayload) Read ¶
func (i *GivenPayload) Read(b []byte) PacketHeader
func (*GivenPayload) String ¶
func (i *GivenPayload) String() string
func (*GivenPayload) Write ¶
func (i *GivenPayload) Write(b []byte)
type HostUint16 ¶
type HostUint16 uint16
As above but host byte order.
func (HostUint16) MaskedString ¶
func (v HostUint16) MaskedString(r MaskedStringer) string
type HostUint32 ¶
type HostUint32 uint32
func (HostUint32) MaskedString ¶
func (v HostUint32) MaskedString(r MaskedStringer) string
type HostUint64 ¶
type HostUint64 uint64
func (HostUint64) MaskedString ¶
func (v HostUint64) MaskedString(r MaskedStringer) string
type HwIf ¶
type HwIf struct {
// contains filtered or unexported fields
}
func (*HwIf) GetSwInterfaceCounterNames ¶
func (h *HwIf) GetSwInterfaceCounterNames() (nm InterfaceCounterNames)
func (*HwIf) IsProvisioned ¶
func (*HwIf) LessThan ¶
func (a *HwIf) LessThan(b HwInterfacer) bool
func (*HwIf) LessThanId ¶
func (*HwIf) LinkString ¶
func (*HwIf) MaxPacketSize ¶
func (*HwIf) SetAdminUp ¶
func (*HwIf) SetLoopback ¶
func (h *HwIf) SetLoopback(v IfLoopbackType) (err error)
func (*HwIf) SetMaxPacketSize ¶
func (*HwIf) SetProvisioned ¶
func (*HwIf) ValidateMedia ¶
func (*HwIf) ValidateSpeed ¶
Default versions.
type HwIfAddDelHookVec ¶
type HwIfAddDelHookVec struct {
// contains filtered or unexported fields
}
func (*HwIfAddDelHookVec) Add ¶
func (t *HwIfAddDelHookVec) Add(x HwIfAddDelHook, ds ...*dep.Dep)
func (*HwIfAddDelHookVec) Get ¶
func (t *HwIfAddDelHookVec) Get(i int) HwIfAddDelHook
func (*HwIfAddDelHookVec) Len ¶
func (t *HwIfAddDelHookVec) Len() int
type HwIfChooser ¶
type HwIfChooser ifChooser
func (*HwIfChooser) Foreach ¶
func (c *HwIfChooser) Foreach(f func(v *Vnet, h HwInterfacer))
func (*HwIfChooser) Init ¶
func (c *HwIfChooser) Init(v *Vnet)
func (*HwIfChooser) Parse ¶
func (c *HwIfChooser) Parse(in *parse.Input)
type HwIfClasser ¶
type HwIfClasser interface { // Get/set/format interface address (e.g. mac address for ethernet). GetAddress() []byte SetAddress(a []byte) FormatAddress() string // Encapsulation rewrite string for this interface class. SetRewrite(v *Vnet, r *Rewrite, t PacketType, dstAddr []byte) FormatRewrite(r *Rewrite) []string ParseRewrite(r *Rewrite, in *parse.Input) // ID: for example VLAN tag(s) for ethernet. 32 bit number uniquely identifies sub-interface. DefaultId() IfId LessThanId(a, b IfId) bool ParseId(a *IfId, in *parse.Input) bool FormatId(a IfId) string ConfigureHwIf(in *cli.Input) (ok bool, err error) }
Class of hardware interfaces, for example, ethernet, sonet, srp, docsis, etc.
type HwIfCombinedCounterKind ¶
type HwIfCombinedCounterKind uint16
func (HwIfCombinedCounterKind) Add ¶
func (c HwIfCombinedCounterKind) Add(t *InterfaceThread, hi Hi, packets, bytes uint)
func (HwIfCombinedCounterKind) Add64 ¶
func (c HwIfCombinedCounterKind) Add64(t *InterfaceThread, hi Hi, packets, bytes uint64)
type HwIfCounterKind ¶
type HwIfCounterKind uint16
func (HwIfCounterKind) Add ¶
func (c HwIfCounterKind) Add(t *InterfaceThread, hi Hi, value uint)
func (HwIfCounterKind) Add64 ¶
func (c HwIfCounterKind) Add64(t *InterfaceThread, hi Hi, value uint64)
func (HwIfCounterKind) Set ¶
func (c HwIfCounterKind) Set(t *InterfaceThread, hi Hi, value uint)
type HwIfLinkUpDownHookVec ¶
type HwIfLinkUpDownHookVec struct {
// contains filtered or unexported fields
}
func (*HwIfLinkUpDownHookVec) Add ¶
func (t *HwIfLinkUpDownHookVec) Add(x HwIfLinkUpDownHook, ds ...*dep.Dep)
func (*HwIfLinkUpDownHookVec) Get ¶
func (t *HwIfLinkUpDownHookVec) Get(i int) HwIfLinkUpDownHook
func (*HwIfLinkUpDownHookVec) Len ¶
func (t *HwIfLinkUpDownHookVec) Len() int
type HwIfProvisionHookVec ¶
type HwIfProvisionHookVec struct {
// contains filtered or unexported fields
}
func (*HwIfProvisionHookVec) Add ¶
func (t *HwIfProvisionHookVec) Add(x HwIfProvisionHook, ds ...*dep.Dep)
func (*HwIfProvisionHookVec) Get ¶
func (t *HwIfProvisionHookVec) Get(i int) HwIfProvisionHook
func (*HwIfProvisionHookVec) Len ¶
func (t *HwIfProvisionHookVec) Len() int
type HwInterfacer ¶
type HwInterfacer interface { Devicer HwIfClasser GetHwIf() *HwIf }
type IfLoopbackType ¶
type IfLoopbackType int
Interface can loopback at MAC or PHY.
const ( IfLoopbackNone IfLoopbackType = iota IfLoopbackMac IfLoopbackPhy )
func (*IfLoopbackType) Parse ¶
func (x *IfLoopbackType) Parse(in *parse.Input)
type InOutNode ¶
type InOutNode struct { Node // contains filtered or unexported fields }
func (*InOutNode) GetEnqueue ¶
func (*InOutNode) GetInOutNode ¶
func (*InOutNode) LoopInputOutput ¶
func (*InOutNode) MakeLoopIn ¶
func (*InOutNode) MakeLoopOut ¶
type InOutNoder ¶
type IncrementingPayload ¶
type IncrementingPayload struct{ Count uint }
Packet header with incrementing data of given byte count.
func (*IncrementingPayload) Finalize ¶
func (i *IncrementingPayload) Finalize(l []PacketHeader)
func (*IncrementingPayload) Len ¶
func (i *IncrementingPayload) Len() uint
func (*IncrementingPayload) Read ¶
func (i *IncrementingPayload) Read(b []byte) PacketHeader
func (*IncrementingPayload) String ¶
func (i *IncrementingPayload) String() string
func (*IncrementingPayload) Write ¶
func (i *IncrementingPayload) Write(b []byte)
type InputNode ¶
type InputNode struct { Node // contains filtered or unexported fields }
func (*InputNode) GetInputNode ¶
func (*InputNode) MakeLoopOut ¶
type InputNoder ¶
type InterfaceCounterNames ¶
type InterfaceCounterNames struct {
Single, Combined []string
}
type InterfaceNode ¶
type InterfaceNode struct {
// contains filtered or unexported fields
}
func (*InterfaceNode) GetInterfaceNode ¶
func (n *InterfaceNode) GetInterfaceNode() *interfaceNode
func (*InterfaceNode) LoopOutput ¶
func (*InterfaceNode) MakeLoopIn ¶
func (*InterfaceNode) MakeLoopOut ¶
type InterfaceThread ¶
type LinkStateEvent ¶
func (*LinkStateEvent) EventAction ¶
func (e *LinkStateEvent) EventAction()
func (*LinkStateEvent) String ¶
func (e *LinkStateEvent) String() string
type MaskedStringer ¶
type MaskedStringer interface {
MaskedString(mask MaskedStringer) string
}
type MaskedStrings ¶
type MaskedStrings struct {
// contains filtered or unexported fields
}
func (*MaskedStrings) Add ¶
func (x *MaskedStrings) Add(key string, v, m MaskedStringer)
func (*MaskedStrings) String ¶
func (x *MaskedStrings) String() (s string)
func (*MaskedStrings) Strings ¶
func (x *MaskedStrings) Strings() (s []string)
type MirrorConfigData ¶
type MirrorConfigFileData ¶
type MirrorConfigFileData struct {
Mirror []MirrorConfigData
}
type Node ¶
type Node struct { Vnet *Vnet loop.Node Dep dep.Dep Errors []string // contains filtered or unexported fields }
func (*Node) AddSuspendActivity ¶
func (*Node) CountError ¶
func (*Node) ErrorRedirect ¶
func (*Node) GetIfThread ¶
func (n *Node) GetIfThread() *InterfaceThread
func (*Node) GetVnetNode ¶
func (*Node) SignalEvent ¶
func (*Node) SignalEventAfter ¶
func (*Node) SignalEventAfterp ¶
func (n *Node) SignalEventAfterp(r Eventer, dt float64, p elog.PointerToFirstArg)
func (*Node) SignalEventp ¶
func (n *Node) SignalEventp(r Eventer, p elog.PointerToFirstArg)
type OutputInterfaceNode ¶
type OutputInterfaceNode struct {
// contains filtered or unexported fields
}
func (*OutputInterfaceNode) GetInterfaceNode ¶
func (n *OutputInterfaceNode) GetInterfaceNode() *interfaceNode
func (*OutputInterfaceNode) LoopOutput ¶
func (*OutputInterfaceNode) MakeLoopIn ¶
func (*OutputInterfaceNode) MakeLoopOut ¶
type OutputNode ¶
type OutputNode struct { Node // contains filtered or unexported fields }
func (*OutputNode) GetOutputNode ¶
func (n *OutputNode) GetOutputNode() *OutputNode
func (*OutputNode) LoopOutput ¶
func (n *OutputNode) LoopOutput(l *loop.Loop, i loop.LooperIn)
func (*OutputNode) MakeLoopIn ¶
func (n *OutputNode) MakeLoopIn() loop.LooperIn
type OutputNoder ¶
type OutputNoder interface { Noder GetOutputNode() *OutputNode NodeOutput(i *RefIn) }
type Package ¶
type Package struct { Vnet *Vnet // contains filtered or unexported fields }
func (*Package) DependedOnBy ¶
func (*Package) GetPackage ¶
type PacketHeader ¶
type PacketHeader interface { // Number of packet bytes in this header's payload. Len() uint // Write this header's packet data to given slice. Write([]byte) // Return given slice as packet header type. Read([]byte) PacketHeader String() string }
func ReadPacket ¶
func ReadPacket(b []byte, args ...PacketHeader) (hs []PacketHeader)
type PacketType ¶
type PacketType int
Generic packet type
const ( IP4 PacketType = 1 + iota IP6 MPLS_UNICAST MPLS_MULTICAST ARP )
type PortEntry ¶
type PortEntry struct { Net uint64 Ifindex int32 Iflinkindex int32 // system side eth# ifindex Ifname string Flags xeth.EthtoolPrivFlags Iff net.Flags Speed xeth.Mbps Autoneg uint8 PortVid uint16 Stag uint16 // internal vlan tag for bridge Ctag uint16 // vlan tag to identify vlan member and set l3_iif/vrf via vlan_xlate Portindex int16 Subportindex int8 PuntIndex uint8 // 0-based meth#, derived from Iflinkindex Devtype uint8 StationAddr net.HardwareAddr IPNets []*net.IPNet }
type PortsMap ¶
type PortsMap struct { sync.Map // indexed by ifname, value is *PortEntry // contains filtered or unexported fields }
var Ports PortsMap
func (*PortsMap) ForeachNameByIndex ¶
func (*PortsMap) ForeachSiByIndex ¶
func (*PortsMap) GetNumSubports ¶
func (*PortsMap) GetPortByIndex ¶
func (*PortsMap) SetPortByIndex ¶
func (*PortsMap) SetSiByIfindex ¶
type Ref ¶
func (*Ref) Flags ¶
func (r *Ref) Flags() BufferFlag
func (*Ref) NextValidFlag ¶
func (r *Ref) NextValidFlag() BufferFlag
func (*Ref) Trace ¶
func (r *Ref) Trace(p *BufferPool, i hw.BufferTracer, e int)
func (*Ref) ValidateState ¶
func (r *Ref) ValidateState(p *BufferPool, s BufferState)
type RefIn ¶
type RefIn struct { Refs [MaxVectorLen]Ref // contains filtered or unexported fields }
func (*RefIn) AllocPoolRefs ¶
func (r *RefIn) AllocPoolRefs(p *BufferPool, n uint)
func (*RefIn) FreePoolRefs ¶
func (r *RefIn) FreePoolRefs(p *BufferPool, n uint)
func (*RefIn) SetPoolAndLen ¶
func (i *RefIn) SetPoolAndLen(v *Vnet, p *BufferPool, l uint)
type RefOpaque ¶
type RefVecIn ¶
type RefVecIn struct { Refs RefVec // contains filtered or unexported fields }
func (*RefVecIn) FreePoolRefs ¶
func (r *RefVecIn) FreePoolRefs(p *BufferPool, freeNext bool)
type Reg32 ¶
type Reg32 uint32
type Reg64 ¶
type Reg64 uint64
type Rewrite ¶
type Rewrite struct { // Software interface to mark re-written packets with. Si Si Stag uint16 // Node where packet will be rewritten. NodeIndex uint32 // Next node to feed packet after rewrite. NextIndex uint32 // Max packet size layer 3 (MTU) for output interface. // Used for MTU check after packet rewrite. // Avoids having to lookup egress interface's MTU. MaxL3PacketSize uint16 // contains filtered or unexported fields }
func (*Rewrite) SetMaxPacketSize ¶
type RxDmaDescriptorFlags ¶
type RxDmaDescriptorFlags uint64
type RxDmaRefState ¶
type RxDmaRing ¶
type RxDmaRing struct { RxDmaRefState // contains filtered or unexported fields }
func (*RxDmaRing) RingIndex ¶
For even ring sequence, rx refs are even; refills are odd; vice versa for odd sequences.
func (*RxDmaRing) Rx1Descriptor ¶
func (g *RxDmaRing) Rx1Descriptor(ri rxDmaRingIndex, b0 uint, f0 RxDmaDescriptorFlags)
func (*RxDmaRing) Rx4Descriptors ¶
func (g *RxDmaRing) Rx4Descriptors(ri rxDmaRingIndex, b0, b1, b2, b3 uint, f0, f1, f2, f3 RxDmaDescriptorFlags)
func (*RxDmaRing) RxDmaRingInit ¶
func (g *RxDmaRing) RxDmaRingInit(v *Vnet, r RxDmaRinger, flags RxDmaDescriptorFlags, desc_flag_end_of_packet_shift uint, pool *BufferPool, ring_len uint)
func (*RxDmaRing) WrapRefill ¶
func (r *RxDmaRing) WrapRefill()
Allocate new re-fill buffers when ring wraps.
type RxDmaRinger ¶
type RxDmaRinger interface { GetRefState(flags RxDmaDescriptorFlags) RxDmaRefState // contains filtered or unexported methods }
type SflowConfigData ¶
type SflowConfigFileData ¶
type SflowConfigFileData struct {
Sflow []SflowConfigData
}
type Si ¶
type Si IfIndex
Software and hardware interface index. Alias for commonly used types.
func (Si) IsSwSubInterface ¶
type SviVnetFeMsg ¶
type SviVnetFeMsg struct {
// contains filtered or unexported fields
}
Could collapse all vnet Hooks calls into this message to avoid direct function calls from vnet to fe
type SwIf ¶
type SwIf struct { Name string //if SwIfKindHardware, then name should same as HwIf.name // contains filtered or unexported fields }
type SwIfAddDelHookVec ¶
type SwIfAddDelHookVec struct {
// contains filtered or unexported fields
}
func (*SwIfAddDelHookVec) Add ¶
func (t *SwIfAddDelHookVec) Add(x SwIfAddDelHook, ds ...*dep.Dep)
func (*SwIfAddDelHookVec) Get ¶
func (t *SwIfAddDelHookVec) Get(i int) SwIfAddDelHook
func (*SwIfAddDelHookVec) Len ¶
func (t *SwIfAddDelHookVec) Len() int
type SwIfAdminUpDownHookVec ¶
type SwIfAdminUpDownHookVec struct {
// contains filtered or unexported fields
}
func (*SwIfAdminUpDownHookVec) Add ¶
func (t *SwIfAdminUpDownHookVec) Add(x SwIfAdminUpDownHook, ds ...*dep.Dep)
func (*SwIfAdminUpDownHookVec) Get ¶
func (t *SwIfAdminUpDownHookVec) Get(i int) SwIfAdminUpDownHook
func (*SwIfAdminUpDownHookVec) Len ¶
func (t *SwIfAdminUpDownHookVec) Len() int
type SwIfChooser ¶
type SwIfChooser ifChooser
func (*SwIfChooser) Foreach ¶
func (c *SwIfChooser) Foreach(f func(v *Vnet, si Si))
func (*SwIfChooser) Init ¶
func (c *SwIfChooser) Init(v *Vnet)
func (*SwIfChooser) Parse ¶
func (c *SwIfChooser) Parse(in *parse.Input)
type SwIfCounterSyncHook ¶
type SwIfCounterSyncHook func(v *Vnet)
type SwIfCounterSyncHookVec ¶
type SwIfCounterSyncHookVec struct {
// contains filtered or unexported fields
}
func (*SwIfCounterSyncHookVec) Add ¶
func (t *SwIfCounterSyncHookVec) Add(x SwIfCounterSyncHook, ds ...*dep.Dep)
func (*SwIfCounterSyncHookVec) Get ¶
func (t *SwIfCounterSyncHookVec) Get(i int) SwIfCounterSyncHook
func (*SwIfCounterSyncHookVec) Len ¶
func (t *SwIfCounterSyncHookVec) Len() int
type SwInterfaceType ¶
type SwInterfaceType struct {
SwIfKind SwIfKind
}
func (*SwInterfaceType) GetSwInterfaceType ¶
func (t *SwInterfaceType) GetSwInterfaceType() *SwInterfaceType
func (*SwInterfaceType) SwInterfaceLessThan ¶
func (t *SwInterfaceType) SwInterfaceLessThan(v *Vnet, a, b *SwIf) bool
func (*SwInterfaceType) SwInterfaceName ¶
func (t *SwInterfaceType) SwInterfaceName(v *Vnet, s *SwIf) string
func (*SwInterfaceType) SwInterfaceRewriteString ¶
func (t *SwInterfaceType) SwInterfaceRewriteString(v *Vnet, r *Rewrite) []string
func (*SwInterfaceType) SwInterfaceSetRewrite ¶
func (t *SwInterfaceType) SwInterfaceSetRewrite(rw *Rewrite, si Si, noder Noder, typ PacketType)
type TxDmaRing ¶
type TxDmaRing struct { ToInterrupt chan *TxRefVecIn // contains filtered or unexported fields }
Transmit ring common code.
func (*TxDmaRing) InterruptAdvance ¶
type TxRefVecIn ¶
type TxRefVecIn struct { RefVecIn // contains filtered or unexported fields }
func (*TxRefVecIn) Free ¶
func (i *TxRefVecIn) Free(v *Vnet)
type Uint16 ¶
type Uint16 uint16
func (Uint16) MaskedString ¶
func (v Uint16) MaskedString(r MaskedStringer) string
type Uint32 ¶
type Uint32 uint32
func (Uint32) MaskedString ¶
func (v Uint32) MaskedString(r MaskedStringer) string
type Uint64 ¶
type Uint64 uint64
func (Uint64) MaskedString ¶
func (v Uint64) MaskedString(r MaskedStringer) string
type Uint8 ¶
type Uint8 uint8 // dummy used to satisfy MaskedStringer interface
Network byte order helpers.
func (Uint8) MaskedString ¶
func (v Uint8) MaskedString(r MaskedStringer) string
type Vnet ¶
type Vnet struct { hw.BufferMain BridgeAddDelHook BridgeAddDelHook_t BridgeMemberAddDelHook BridgeMemberAddDelHook_t BridgeMemberLookup BridgeMemberLookup_t // contains filtered or unexported fields }
Main structure.
func (*Vnet) AddBufferPool ¶
func (v *Vnet) AddBufferPool(p *BufferPool)
func (*Vnet) CleanAndDownSwInterface ¶
remove ifaddr, neighbor via hooks and admin down (removes glean and local fib), but does not delete the SwIf
func (*Vnet) CurrentEvent ¶
func (*Vnet) ExitPackages ¶
func (m *Vnet) ExitPackages() (err error)
func (*Vnet) ForeachHighFreqHwIfCounter ¶
func (*Vnet) ForeachHwIf ¶
func (*Vnet) ForeachHwIfCounter ¶
func (*Vnet) ForeachSwIf ¶
func (*Vnet) ForeachSwIfCounter ¶
func (*Vnet) FreeTxRefIn ¶
func (v *Vnet) FreeTxRefIn(i *TxRefVecIn)
func (*Vnet) GetIfThread ¶
func (m *Vnet) GetIfThread(id uint) (t *InterfaceThread)
func (*Vnet) GetPackage ¶
func (*Vnet) HwIfer ¶
func (m *Vnet) HwIfer(i Hi) HwInterfacer
func (*Vnet) HwIferForSupSi ¶
func (m *Vnet) HwIferForSupSi(si Si) (h HwInterfacer)
func (*Vnet) HwSwCombinedIfCounter ¶
func (m *Vnet) HwSwCombinedIfCounter(i uint) swIfCombinedCounterKind
func (*Vnet) HwSwSingleIfCounter ¶
func (m *Vnet) HwSwSingleIfCounter(i uint) swIfCounterKind
func (*Vnet) InitPackages ¶
func (m *Vnet) InitPackages() (err error)
func (*Vnet) NewSwCombinedCounters ¶
func (v *Vnet) NewSwCombinedCounters(names []string) swIfCombinedCounterKind
func (*Vnet) NewSwCounters ¶
func (v *Vnet) NewSwCounters(names []string) swIfCounterKind
func (*Vnet) NewSwSubInterface ¶
func (*Vnet) PackageByName ¶
func (*Vnet) RegisterAndProvisionHwInterface ¶
func (v *Vnet) RegisterAndProvisionHwInterface(h HwInterfacer, provision bool, format string, args ...interface{}) (err error)
func (*Vnet) RegisterBridgeAddDelHook ¶
func (v *Vnet) RegisterBridgeAddDelHook(h BridgeAddDelHook_t)
func (*Vnet) RegisterBridgeMemberAddDelHook ¶
func (v *Vnet) RegisterBridgeMemberAddDelHook(h BridgeMemberAddDelHook_t)
func (*Vnet) RegisterBridgeMemberLookup ¶
func (v *Vnet) RegisterBridgeMemberLookup(h BridgeMemberLookup_t)
func (*Vnet) RegisterHwIfAddDelHook ¶
func (m *Vnet) RegisterHwIfAddDelHook(h HwIfAddDelHook)
func (*Vnet) RegisterHwIfLinkUpDownHook ¶
func (m *Vnet) RegisterHwIfLinkUpDownHook(h HwIfLinkUpDownHook)
func (*Vnet) RegisterHwIfProvisionHook ¶
func (m *Vnet) RegisterHwIfProvisionHook(h HwIfProvisionHook)
func (*Vnet) RegisterHwInterface ¶
func (v *Vnet) RegisterHwInterface(h HwInterfacer, format string, args ...interface{}) (err error)
func (*Vnet) RegisterInOutNode ¶
func (v *Vnet) RegisterInOutNode(n InOutNoder, name string, args ...interface{})
func (*Vnet) RegisterInputNode ¶
func (v *Vnet) RegisterInputNode(n InputNoder, name string, args ...interface{})
func (*Vnet) RegisterInterfaceNode ¶
func (*Vnet) RegisterNode ¶
func (*Vnet) RegisterOutputInterfaceNode ¶
func (*Vnet) RegisterOutputNode ¶
func (v *Vnet) RegisterOutputNode(n OutputNoder, name string, args ...interface{})
func (*Vnet) RegisterSwIfAddDelHook ¶
func (m *Vnet) RegisterSwIfAddDelHook(h SwIfAddDelHook)
func (*Vnet) RegisterSwIfAdminUpDownHook ¶
func (m *Vnet) RegisterSwIfAdminUpDownHook(h SwIfAdminUpDownHook)
func (*Vnet) RegisterSwIfCounterSyncHook ¶
func (m *Vnet) RegisterSwIfCounterSyncHook(h SwIfCounterSyncHook)
func (*Vnet) RegisterSwInterfaceType ¶
func (i *Vnet) RegisterSwInterfaceType(r swInterfaceTyper)
func (*Vnet) SetRewrite ¶
func (*Vnet) SetRewriteNodeHwIf ¶
func (v *Vnet) SetRewriteNodeHwIf(rw *Rewrite, hw *HwIf, noder Noder) (h HwInterfacer)
func (*Vnet) SignalEvent ¶
func (*Vnet) SignalEventAfter ¶
func (*Vnet) SwLessThan ¶
Source Files ¶
- buf.go
- byte_order.go
- byte_order_little.go
- cli.go
- counter.go
- error.go
- event.go
- gentemplate_dep_hwifadddelhook.go
- gentemplate_dep_hwiflinkupdownhook.go
- gentemplate_dep_hwifprovisionhook.go
- gentemplate_dep_inithook.go
- gentemplate_dep_swifadddelhook.go
- gentemplate_dep_swifadminupdownhook.go
- gentemplate_dep_swifcountersynchookvec.go
- gentemplate_pool_hwif.go
- gentemplate_pool_swif.go
- gentemplate_vec_combinedcounter.go
- gentemplate_vec_combinedcountersvec.go
- gentemplate_vec_countersvec.go
- gentemplate_vec_enqueue.go
- gentemplate_vec_error.go
- gentemplate_vec_errorthread.go
- gentemplate_vec_ifthread.go
- gentemplate_vec_minicombinedcounter.go
- gentemplate_vec_ref.go
- header.go
- interface.go
- interface_cli.go
- interface_counter.go
- interface_node.go
- license.go
- mirror_sflow_config.go
- node.go
- package.go
- packet.go
- rewrite.go
- rx_dma_ring.go
- stringer.go
- version.go
- vnet.go
Directories ¶
Path | Synopsis |
---|---|
devices
|
|
ethernet/ixge
Driver for Intel 10G Ethernet controllers.
|
Driver for Intel 10G Ethernet controllers. |
phy/xge
10 GIG E (XGE) PHY IEEE 802.3 clause 45 definitions.
|
10 GIG E (XGE) PHY IEEE 802.3 clause 45 definitions. |
internal
|
|
platforms
|
|