ctrl_mgr

package
v0.0.0-...-918ceb5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const INVALID_VAL_16bit uint64 = (0x7FFF)

Variables

This section is empty.

Functions

func LeafCPInitAllVer

func LeafCPInitAllVer(ctx context.Context,
	leaf *model.Node,
	bfrtclient *bfrtC.Client,
	spines []_SpineConfig,
	topology *model.Topology)

func ManagerInitAllVer

func ManagerInitAllVer(ctx context.Context, bfrtclient *bfrtC.Client)

func NewAsicEndPoint

func NewAsicEndPoint(ifName string,
	leaves []*leafController,
	spines []*spineController,
	asicIngress chan []byte,
	asicEgress chan []byte) *asicEndPoint

func NewBareLeafController

func NewBareLeafController(ctrlID uint16, pipeID uint32, cfg *rootConfig, opts ...TopologyOption) *leafController

func NewSpineController

func NewSpineController(ctrlID uint16, pipeID uint32, topoFp string, cfg *rootConfig) *spineController

func NewSwitchManager

func NewSwitchManager(topoFp, cfgFp string, opts ...SwitchManagerOption) *switchManager

func OnServerChangeAllVer

func OnServerChangeAllVer(ctx context.Context, leaf *model.Node, updated []*model.Node, bfrtclient *bfrtC.Client, added bool)

func ReadConfigFile

func ReadConfigFile(configName string, configPaths ...string) *rootConfig

func SpineCPInitAllVer

func SpineCPInitAllVer(ctx context.Context,
	bfrtclient *bfrtC.Client,
	spine *model.Node,
	topology *model.Topology)

func SpineCPOnLeafChangeAllVer

func SpineCPOnLeafChangeAllVer(ctx context.Context,
	bfrtclient *bfrtC.Client,
	spine *model.Node,
	leafID uint64,
	topology *model.Topology,
	added bool)

Types

type BfrtLeafCP_V1

type BfrtLeafCP_V1 struct {
	Topology *model.Topology
	// contains filtered or unexported fields
}

func NewBfrtLeafCP_V1

func NewBfrtLeafCP_V1(client *bfrtC.Client, leaf *model.Node, spines []_SpineConfig,
	topology *model.Topology) *BfrtLeafCP_V1

func (*BfrtLeafCP_V1) Cleanup

func (cp *BfrtLeafCP_V1) Cleanup(leafID uint16)

* Parham: This function is only needed when multiple leaves are *emulated* using one switch. * The failed switch state should be cleaned up and same memory location is reused by the next added leaf. * Cleanup() Resets the linkeage state and aggregate queue len state of the *failed* leaf.

func (*BfrtLeafCP_V1) Init

func (cp *BfrtLeafCP_V1) Init()

func (*BfrtLeafCP_V1) OnServerChange

func (cp *BfrtLeafCP_V1) OnServerChange(updated []*model.Node, added bool)

type BfrtLeafCP_V2

type BfrtLeafCP_V2 struct {
	Topology *model.Topology
	// contains filtered or unexported fields
}

func NewBfrtLeafCP_V2

func NewBfrtLeafCP_V2(client *bfrtC.Client,
	leaf *model.Node,
	spines []_SpineConfig,
	topology *model.Topology) *BfrtLeafCP_V2

func (*BfrtLeafCP_V2) Cleanup

func (cp *BfrtLeafCP_V2) Cleanup(leafID uint16)

func (*BfrtLeafCP_V2) Init

func (cp *BfrtLeafCP_V2) Init()

func (*BfrtLeafCP_V2) OnServerChange

func (cp *BfrtLeafCP_V2) OnServerChange(updated []*model.Node, added bool)

type BfrtManagerCP_V1

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

func NewBfrtManagerCP_V1

func NewBfrtManagerCP_V1(client *bfrtC.Client) *BfrtManagerCP_V1

func (*BfrtManagerCP_V1) DumpFinalStats

func (cp *BfrtManagerCP_V1) DumpFinalStats(_ context.Context)

func (*BfrtManagerCP_V1) Init

func (cp *BfrtManagerCP_V1) Init()

func (*BfrtManagerCP_V1) InitRandomAdjustTables

func (cp *BfrtManagerCP_V1) InitRandomAdjustTables()

func (*BfrtManagerCP_V1) MonitorStats

func (cp *BfrtManagerCP_V1) MonitorStats(ctx context.Context)

type BfrtManagerCP_V2

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

func NewBfrtManagerCP_V2

func NewBfrtManagerCP_V2(client *bfrtC.Client) *BfrtManagerCP_V2

func (*BfrtManagerCP_V2) DumpFinalStats

func (cp *BfrtManagerCP_V2) DumpFinalStats(context.Context)

func (*BfrtManagerCP_V2) Init

func (cp *BfrtManagerCP_V2) Init()

func (*BfrtManagerCP_V2) InitRandomAdjustTables

func (cp *BfrtManagerCP_V2) InitRandomAdjustTables()

func (*BfrtManagerCP_V2) MonitorStats

func (cp *BfrtManagerCP_V2) MonitorStats(context.Context)

type BfrtSpineCP_V1

type BfrtSpineCP_V1 struct {
	Topology *model.Topology
	// contains filtered or unexported fields
}

func NewBfrtSpineCP_V1

func NewBfrtSpineCP_V1(client *bfrtC.Client,
	spine *model.Node,
	topology *model.Topology) *BfrtSpineCP_V1

func (*BfrtSpineCP_V1) Init

func (cp *BfrtSpineCP_V1) Init()

func (*BfrtSpineCP_V1) InitRandomAdjustTables

func (cp *BfrtSpineCP_V1) InitRandomAdjustTables()

func (*BfrtSpineCP_V1) MonitorStats

func (cp *BfrtSpineCP_V1) MonitorStats()

func (*BfrtSpineCP_V1) OnLeafChange

func (cp *BfrtSpineCP_V1) OnLeafChange(leafID uint64, index uint64, added bool)

type BfrtSpineCP_V2

type BfrtSpineCP_V2 struct {
	Topology *model.Topology
	// contains filtered or unexported fields
}

func NewBfrtSpineCP_V2

func NewBfrtSpineCP_V2(client *bfrtC.Client,
	spine *model.Node,
	topology *model.Topology) *BfrtSpineCP_V2

func (*BfrtSpineCP_V2) Init

func (cp *BfrtSpineCP_V2) Init()

func (*BfrtSpineCP_V2) InitRandomAdjustTables

func (cp *BfrtSpineCP_V2) InitRandomAdjustTables()

func (*BfrtSpineCP_V2) MonitorStats

func (cp *BfrtSpineCP_V2) MonitorStats()

func (*BfrtSpineCP_V2) OnLeafChange

func (cp *BfrtSpineCP_V2) OnLeafChange(leafID uint64, index uint64, added bool)

type BfrtUpdateFn

type BfrtUpdateFn func(context.Context, *pb.TableEntry) error

type FakeLeafCP

type FakeLeafCP struct {
	Topology *model.Topology
	// contains filtered or unexported fields
}

func NewFakeLeafCP

func NewFakeLeafCP(leaf *model.Node,
	spines []_SpineConfig,
	topology *model.Topology) *FakeLeafCP

func (*FakeLeafCP) Cleanup

func (cp *FakeLeafCP) Cleanup(leafID uint16)

func (*FakeLeafCP) Init

func (cp *FakeLeafCP) Init()

func (*FakeLeafCP) OnServerChange

func (cp *FakeLeafCP) OnServerChange([]*model.Node, bool)

type FakeManagerCP

type FakeManagerCP struct {
}

func NewFakeManagerCP

func NewFakeManagerCP() *FakeManagerCP

func (*FakeManagerCP) DumpFinalStats

func (cp *FakeManagerCP) DumpFinalStats(context.Context)

func (*FakeManagerCP) Init

func (cp *FakeManagerCP) Init()

func (*FakeManagerCP) InitRandomAdjustTables

func (cp *FakeManagerCP) InitRandomAdjustTables()

func (*FakeManagerCP) MonitorStats

func (cp *FakeManagerCP) MonitorStats(context.Context)

type FakeSpineCP

type FakeSpineCP struct {
	Topology *model.Topology
	// contains filtered or unexported fields
}

func NewFakeSpineCP

func NewFakeSpineCP(spine *model.Node, topology *model.Topology) *FakeSpineCP

func (*FakeSpineCP) Init

func (cp *FakeSpineCP) Init()

func (*FakeSpineCP) InitRandomAdjustTables

func (cp *FakeSpineCP) InitRandomAdjustTables()

func (*FakeSpineCP) MonitorStats

func (cp *FakeSpineCP) MonitorStats()

func (*FakeSpineCP) OnLeafChange

func (cp *FakeSpineCP) OnLeafChange(uint64, uint64, bool)

type LeafBus

type LeafBus struct {
	*LeafBusChan

	DoneChan chan bool
	// contains filtered or unexported fields
}

LeafBus ...

func NewBareLeafBus

func NewBareLeafBus(ctrlID uint16, busChan *LeafBusChan,
	cp LeafCP) *LeafBus

NewLeafBus ...

func (*LeafBus) SetHealthManager

func (e *LeafBus) SetHealthManager(healthMgr *core.LeafHealthManager)

func (*LeafBus) SetTopology

func (e *LeafBus) SetTopology(topology *model.Topology)

func (*LeafBus) SetVCManager

func (e *LeafBus) SetVCManager(vcm *core.VCManager)

func (*LeafBus) Shutdown

func (e *LeafBus) Shutdown()

func (*LeafBus) Start

func (e *LeafBus) Start()

type LeafBusChan

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

LeafBusChan ...

func NewLeafBusChan

func NewLeafBusChan(hmIngressActiveNode chan *core.LeafHealthMsg,
	updatedServersRPC chan *core.LeafHealthMsg,
	newServersRPC chan *horus_net.ServerAddedMessage,
	newVCsRPC chan *horus_net.VCUpdatedMessage,
	asicIngress chan []byte,
	asicEgress chan []byte) *LeafBusChan

NewLeafBusChan ...

type LeafCP

type LeafCP interface {
	Init()
	OnServerChange([]*model.Node, bool)
	Cleanup(uint16)
}

type ManagerCP

type ManagerCP interface {
	Init()
	InitRandomAdjustTables()
	MonitorStats(context.Context)
	DumpFinalStats(context.Context)
}

type SpineBus

type SpineBus struct {
	*SpineBusChan
	// contains filtered or unexported fields
}

SpineBus ...

func NewSpineBus

func NewSpineBus(ctrlID uint16,
	busChan *SpineBusChan,
	topology *model.Topology,
	vcm *core.VCManager,
	healthMgr *core.LeafHealthManager,
	cp SpineCP) *SpineBus

NewSpineBus ...

func (*SpineBus) Start

func (e *SpineBus) Start()

type SpineBusChan

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

SpineBusChan ...

func NewSpineBusChan

func NewSpineBusChan(hmIngressActiveNode chan *core.LeafHealthMsg,
	rpcFailedLeaves chan *horus_net.LeafFailedMessage,
	rpcFailedServers chan *horus_net.ServerFailedMessage,
	newLeaves chan *horus_net.LeafAddedMessage,
	newServers chan *horus_net.ServerAddedMessage,
	newVCs chan *horus_net.VCUpdatedMessage,
	asicIngress chan []byte,
	asicEgress chan []byte) *SpineBusChan

NewSpineBusChan ...

type SpineCP

type SpineCP interface {
	Init()
	InitRandomAdjustTables()
	OnLeafChange(uint64, uint64, bool)
	MonitorStats()
}

type StatsObject

type StatsObject struct {
	TotalTaskCount           uint64
	TotalResubLeaf           uint64
	TotalMsgIdle             uint64
	TotalMsgLoad             uint64
	TotalStateUpdateMessages uint64
}

type SwitchManagerOption

type SwitchManagerOption func(*switchManager)

type TopologyOption

type TopologyOption func(*model.Topology) error

func WithExtraLeaf

func WithExtraLeaf(leafInfo *horus_pb.LeafInfo) TopologyOption

func WithoutLeaves

func WithoutLeaves() TopologyOption

Jump to

Keyboard shortcuts

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