Documentation ¶
Overview ¶
Package fwdp implements the forwarder's data plane.
Index ¶
- Constants
- Variables
- func DefaultAlloc() (m map[string]eal.LCores, e error)
- type Config
- type Crypto
- type CryptoConfig
- type CryptoShared
- type DataPlane
- type Disk
- type DiskConfig
- type DispatchCounters
- type DispatchThread
- type Fwd
- func (fwd *Fwd) Close() error
- func (fwd *Fwd) Counters() (cnt FwdCounters)
- func (fwd *Fwd) Cs() *cs.Cs
- func (fwd *Fwd) GetFib() (replica unsafe.Pointer, dynIndex int)
- func (fwd *Fwd) GetFibSgGlobal() unsafe.Pointer
- func (fwd *Fwd) LatencyStat() *runningstat.RunningStat
- func (fwd *Fwd) NumaSocket() eal.NumaSocket
- func (fwd *Fwd) Pit() *pit.Pit
- func (fwd *Fwd) PktQueueOf(t ndni.PktType) *iface.PktQueue
- func (fwd *Fwd) SetFib(replica unsafe.Pointer, dynIndex int)
- func (fwd *Fwd) String() string
- func (Fwd) ThreadRole() string
- type FwdCounters
- type Input
Constants ¶
const ( RoleInput = iface.RoleRx RoleOutput = iface.RoleTx RoleCrypto = "CRYPTO" RoleDisk = "DISK" RoleFwd = "FWD" )
Thread roles.
Variables ¶
var ( GqlDispatchThreadInterface *gqlserver.Interface GqlInputType *gqlserver.NodeType[*Input] GqlCryptoType *gqlserver.NodeType[*Crypto] GqlDiskType *gqlserver.NodeType[*Disk] GqlFwdType *gqlserver.NodeType[*Fwd] GqlDataPlaneType *graphql.Object GqlDispatchCountersType *graphql.Object GqlFwdCountersType *graphql.Object GqlFibNexthopRttType *graphql.Object )
GraphQL types.
Functions ¶
Types ¶
type Config ¶
type Config struct { LCoreAlloc ealthread.Config `json:"-"` Ndt ndt.Config `json:"ndt,omitempty"` Fib fibdef.Config `json:"fib,omitempty"` Pcct pcct.Config `json:"pcct,omitempty"` Suppress pit.SuppressConfig `json:"suppress,omitempty"` Crypto CryptoConfig `json:"crypto,omitempty"` Disk DiskConfig `json:"disk,omitempty"` FwdInterestQueue iface.PktQueueConfig `json:"fwdInterestQueue,omitempty"` FwdDataQueue iface.PktQueueConfig `json:"fwdDataQueue,omitempty"` FwdNackQueue iface.PktQueueConfig `json:"fwdNackQueue,omitempty"` LatencySampleInterval int `json:"latencySampleInterval,omitempty"` }
Config contains data plane configuration.
type Crypto ¶
type Crypto struct { ealthread.ThreadWithCtrl // contains filtered or unexported fields }
Crypto represents a crypto helper thread.
func (*Crypto) DemuxOf ¶
func (fwc *Crypto) DemuxOf(t ndni.PktType) *iface.InputDemux
DemuxOf implements DispatchThread interface.
func (*Crypto) DispatchThreadID ¶
DispatchThreadID implements DispatchThread interface.
func (Crypto) ThreadRole ¶
ThreadRole implements ealthread.ThreadWithRole interface.
type CryptoConfig ¶
type CryptoConfig struct { InputCapacity int `json:"inputCapacity,omitempty"` OpPoolCapacity int `json:"opPoolCapacity,omitempty"` }
CryptoConfig contains crypto helper thread configuration.
type CryptoShared ¶
type CryptoShared struct {
// contains filtered or unexported fields
}
CryptoShared contains per NUMA socket shared resources for crypto helper threads.
func (*CryptoShared) AssignTo ¶
func (fwcsh *CryptoShared) AssignTo(fwcs []*Crypto)
AssignTo assigns shared resources to crypto helper threads.
func (*CryptoShared) ConnectTo ¶
func (fwcsh *CryptoShared) ConnectTo(fwd *Fwd)
ConnectTo connects forwarding thread to crypto input queue.
type DataPlane ¶
type DataPlane struct {
// contains filtered or unexported fields
}
DataPlane represents the forwarder data plane.
var ( // GqlDataPlane is the DataPlane instance accessible via GraphQL. GqlDataPlane *DataPlane )
type Disk ¶
Disk represents a disk helper thread.
func (*Disk) DemuxOf ¶
func (fwdisk *Disk) DemuxOf(t ndni.PktType) *iface.InputDemux
DemuxOf implements DispatchThread interface.
func (*Disk) DispatchThreadID ¶
DispatchThreadID implements DispatchThread interface.
func (Disk) ThreadRole ¶
ThreadRole implements ealthread.ThreadWithRole interface.
type DiskConfig ¶
type DiskConfig struct { // Locator describes where to create or attach a block device. bdev.Locator // Overprovision is the ratio of block device size divided by CS disk capacity. // Setting this above 1.00 can reduce disk full errors due to some slots still occupied by async I/O. // Default is 1.05. Overprovision float64 `json:"overprovision"` // Bdev specifies the block device. // If set, Locator and Overprovision are ignored. Bdev bdev.Device `json:"-"` // BdevCloser allows closing the block device. BdevCloser io.Closer `json:"-"` // contains filtered or unexported fields }
DiskConfig contains disk service thread configuration.
type DispatchCounters ¶
type DispatchCounters struct { NInterestsQueued []uint64 `json:"nInterestsQueued" gqldesc:"Interests enqueued toward each forwarding thread."` NInterestsDropped []uint64 `json:"nInterestsDropped" gqldesc:"Interests dropped toward each forwarding thread."` NDataQueued []uint64 `json:"nDataQueued" gqldesc:"Data enqueued toward each forwarding thread."` NDataDropped []uint64 `json:"nDataDropped" gqldesc:"Data dropped toward each forwarding thread."` NNacksQueued []uint64 `json:"nNacksQueued" gqldesc:"Nacks enqueued toward each forwarding thread."` NNacksDropped []uint64 `json:"nNacksDropped" gqldesc:"Nacks dropped toward each forwarding thread."` }
DispatchCounters contains counters of packets dispatched from a thread toward forwarding threads.
func ReadDispatchCounters ¶
func ReadDispatchCounters(th DispatchThread, nFwds int) (cnt DispatchCounters)
ReadDispatchCounters retrieves DispatchCounters.
type DispatchThread ¶
type DispatchThread interface { // DispatchThreadID returns numeric index of the dispatch thread. // IDs should be sequentially assigned. DispatchThreadID() int // WithInputDemuxes contains DemuxOf function that returns InputDemux. // If the dispatch thread does not handle a particular packet type, that function returns nil. iface.WithInputDemuxes }
DispatchThread represents a thread that dispatches packets to forwarding threads. It could be an input, crypto, or disk service thread.
type Fwd ¶
type Fwd struct { ealthread.ThreadWithCtrl // contains filtered or unexported fields }
Fwd represents a forwarding thread.
func (*Fwd) Counters ¶
func (fwd *Fwd) Counters() (cnt FwdCounters)
Counters retrieves forwarding thread counters.
func (*Fwd) GetFibSgGlobal ¶
GetFibSgGlobal implements fib.LookupThread interface.
func (*Fwd) LatencyStat ¶
func (fwd *Fwd) LatencyStat() *runningstat.RunningStat
LatencyStat returns latency statistics collector. Its reading reflects the latency since packet arrival until forwarding thread starts processing the packet.
func (*Fwd) NumaSocket ¶
func (fwd *Fwd) NumaSocket() eal.NumaSocket
NumaSocket implements fib.LookupThread interface.
func (*Fwd) PktQueueOf ¶
PktQueueOf returns PktQueue of specified PktType.
func (Fwd) ThreadRole ¶
ThreadRole implements ealthread.ThreadWithRole interface.
type FwdCounters ¶
type FwdCounters struct { NInterestsCongMarked uint64 `json:"nInterestsCongMarked" gqldesc:"Congestion marked added to Interests."` NDataCongMarked uint64 `json:"nDataCongMarked" gqldesc:"Congestion marked added to Data."` NNacksCongMarked uint64 `json:"nNacksCongMarked" gqldesc:"Congestion marked added to Nacks."` InputLatency runningstat.Snapshot `json:"inputLatency" gqldesc:"Latency between packet arrival and dequeuing at forwarding thread, in nanoseconds."` NNoFibMatch uint64 `json:"nNoFibMatch" gqldesc:"Interests dropped due to no FIB match."` NDupNonce uint64 `json:"nDupNonce" gqldesc:"Interests dropped due to duplicate nonce."` NSgNoFwd uint64 `json:"nSgNoFwd" gqldesc:"Interests not forwarded by strategy."` NNackMismatch uint64 `json:"nNackMismatch" gqldesc:"Nacks dropped due to outdated nonce."` }
FwdCounters contains forwarding thread counters.
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
Input represents an input thread.
func (*Input) DemuxOf ¶
func (fwi *Input) DemuxOf(t ndni.PktType) *iface.InputDemux
DemuxOf implements DispatchThread interface.
func (*Input) DispatchThreadID ¶
DispatchThreadID implements DispatchThread interface.