Documentation ¶
Overview ¶
Package l3plugin implements the L3 plugin that handles L3 FIBs.
Index ¶
- func TransformRoute(routeInput *l3.StaticRoutes_Route, swIndex uint32, log logging.Logger) (*vppcalls.Route, error)
- type ArpConfigurator
- func (plugin *ArpConfigurator) AddArp(entry *l3.ArpTable_ArpEntry) error
- func (plugin *ArpConfigurator) ChangeArp(entry *l3.ArpTable_ArpEntry, prevEntry *l3.ArpTable_ArpEntry) error
- func (plugin *ArpConfigurator) Close() error
- func (plugin *ArpConfigurator) DeleteArp(entry *l3.ArpTable_ArpEntry) error
- func (plugin *ArpConfigurator) GetArpCache() l3idx.ARPIndexRW
- func (plugin *ArpConfigurator) GetArpDeleted() l3idx.ARPIndexRW
- func (plugin *ArpConfigurator) GetArpIndexes() l3idx.ARPIndexRW
- func (plugin *ArpConfigurator) Init(logger logging.PluginLogger, goVppMux govppmux.API, ...) (err error)
- func (plugin *ArpConfigurator) ResolveCreatedInterface(interfaceName string) error
- func (plugin *ArpConfigurator) ResolveDeletedInterface(interfaceName string, interfaceIdx uint32) error
- func (plugin *ArpConfigurator) Resync(arpEntries []*l3.ArpTable_ArpEntry) error
- type ProxyArpConfigurator
- func (plugin *ProxyArpConfigurator) AddInterface(pArpIf *l3.ProxyArpInterfaces_InterfaceList) error
- func (plugin *ProxyArpConfigurator) AddRange(pArpRng *l3.ProxyArpRanges_RangeList) error
- func (plugin *ProxyArpConfigurator) Close() error
- func (plugin *ProxyArpConfigurator) DeleteInterface(pArpIf *l3.ProxyArpInterfaces_InterfaceList) error
- func (plugin *ProxyArpConfigurator) DeleteRange(pArpRng *l3.ProxyArpRanges_RangeList) error
- func (plugin *ProxyArpConfigurator) GetArpIfCache() []string
- func (plugin *ProxyArpConfigurator) GetArpIfIndexes() idxvpp.NameToIdxRW
- func (plugin *ProxyArpConfigurator) GetArpRngIndexes() idxvpp.NameToIdxRW
- func (plugin *ProxyArpConfigurator) Init(logger logging.PluginLogger, goVppMux govppmux.API, ...) (err error)
- func (plugin *ProxyArpConfigurator) ModifyInterface(newPArpIf, oldPArpIf *l3.ProxyArpInterfaces_InterfaceList) error
- func (plugin *ProxyArpConfigurator) ModifyRange(newPArpRng, oldPArpRng *l3.ProxyArpRanges_RangeList) error
- func (plugin *ProxyArpConfigurator) ResolveCreatedInterface(ifName string, ifIdx uint32) error
- func (plugin *ProxyArpConfigurator) ResolveDeletedInterface(ifName string) error
- func (plugin *ProxyArpConfigurator) ResyncInterfaces(nbProxyArpIfs []*l3.ProxyArpInterfaces_InterfaceList) error
- func (plugin *ProxyArpConfigurator) ResyncRanges(nbProxyArpRanges []*l3.ProxyArpRanges_RangeList) error
- type RouteConfigurator
- func (plugin *RouteConfigurator) Close() error
- func (plugin *RouteConfigurator) ConfigureRoute(config *l3.StaticRoutes_Route, vrfFromKey string) error
- func (plugin *RouteConfigurator) DeleteRoute(config *l3.StaticRoutes_Route, vrfFromKey string) (wasError error)
- func (plugin *RouteConfigurator) GetCachedRouteIndexes() l3idx.RouteIndex
- func (plugin *RouteConfigurator) GetRouteIndexes() l3idx.RouteIndex
- func (plugin *RouteConfigurator) Init(logger logging.PluginLogger, goVppMux govppmux.API, ...) (err error)
- func (plugin *RouteConfigurator) ModifyRoute(newConfig *l3.StaticRoutes_Route, oldConfig *l3.StaticRoutes_Route, ...) error
- func (plugin *RouteConfigurator) ResolveCreatedInterface(ifName string, swIdx uint32)
- func (plugin *RouteConfigurator) ResolveDeletedInterface(ifName string, swIdx uint32)
- func (plugin *RouteConfigurator) Resync(nbRoutes []*l3.StaticRoutes_Route) error
- type SortedRoutes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransformRoute ¶
func TransformRoute(routeInput *l3.StaticRoutes_Route, swIndex uint32, log logging.Logger) (*vppcalls.Route, error)
TransformRoute converts raw route data to Route object.
Types ¶
type ArpConfigurator ¶
type ArpConfigurator struct {
// contains filtered or unexported fields
}
ArpConfigurator runs in the background in its own goroutine where it watches for any changes in the configuration of L3 arp entries as modelled by the proto file "../model/l3/l3.proto" and stored in ETCD under the key "/vnf-agent/{vnf-agent}/vpp/config/v1/arp". Updates received from the northbound API are compared with the VPP run-time configuration and differences are applied through the VPP binary API.
func (*ArpConfigurator) AddArp ¶
func (plugin *ArpConfigurator) AddArp(entry *l3.ArpTable_ArpEntry) error
AddArp processes the NB config and propagates it to bin api call
func (*ArpConfigurator) ChangeArp ¶
func (plugin *ArpConfigurator) ChangeArp(entry *l3.ArpTable_ArpEntry, prevEntry *l3.ArpTable_ArpEntry) error
ChangeArp processes the NB config and propagates it to bin api call
func (*ArpConfigurator) DeleteArp ¶
func (plugin *ArpConfigurator) DeleteArp(entry *l3.ArpTable_ArpEntry) error
DeleteArp processes the NB config and propagates it to bin api call
func (*ArpConfigurator) GetArpCache ¶
func (plugin *ArpConfigurator) GetArpCache() l3idx.ARPIndexRW
GetArpCache exposes list of cached ARP entries (present in ETCD but not in VPP)
func (*ArpConfigurator) GetArpDeleted ¶
func (plugin *ArpConfigurator) GetArpDeleted() l3idx.ARPIndexRW
GetArpDeleted exposes arppDeleted mapping (unsuccessfully deleted ARP entries)
func (*ArpConfigurator) GetArpIndexes ¶
func (plugin *ArpConfigurator) GetArpIndexes() l3idx.ARPIndexRW
GetArpIndexes exposes arpIndexes mapping
func (*ArpConfigurator) Init ¶
func (plugin *ArpConfigurator) Init(logger logging.PluginLogger, goVppMux govppmux.API, swIfIndexes ifaceidx.SwIfIndex, enableStopwatch bool) (err error)
Init initializes ARP configurator
func (*ArpConfigurator) ResolveCreatedInterface ¶
func (plugin *ArpConfigurator) ResolveCreatedInterface(interfaceName string) error
ResolveCreatedInterface handles case when new interface appears in the config
func (*ArpConfigurator) ResolveDeletedInterface ¶
func (plugin *ArpConfigurator) ResolveDeletedInterface(interfaceName string, interfaceIdx uint32) error
ResolveDeletedInterface handles case when interface is removed from the config
func (*ArpConfigurator) Resync ¶
func (plugin *ArpConfigurator) Resync(arpEntries []*l3.ArpTable_ArpEntry) error
Resync confgures the empty VPP (overwrites the arp entries)
type ProxyArpConfigurator ¶
type ProxyArpConfigurator struct {
// contains filtered or unexported fields
}
ProxyArpConfigurator runs in the background in its own goroutine where it watches for any changes in the configuration of L3 proxy arp entries as modelled by the proto file "../model/l3/l3.proto" and stored in ETCD under the key "/vnf-agent/{vnf-agent}/vpp/config/v1/proxyarp". Configuration uses separate keys for proxy arp range and interfaces. Updates received from the northbound API are compared with the VPP run-time configuration and differences are applied through the VPP binary API.
func (*ProxyArpConfigurator) AddInterface ¶
func (plugin *ProxyArpConfigurator) AddInterface(pArpIf *l3.ProxyArpInterfaces_InterfaceList) error
func (*ProxyArpConfigurator) AddRange ¶
func (plugin *ProxyArpConfigurator) AddRange(pArpRng *l3.ProxyArpRanges_RangeList) error
AddRange configures new IP range for proxy ARP
func (*ProxyArpConfigurator) Close ¶
func (plugin *ProxyArpConfigurator) Close() error
Close VPP channel
func (*ProxyArpConfigurator) DeleteInterface ¶
func (plugin *ProxyArpConfigurator) DeleteInterface(pArpIf *l3.ProxyArpInterfaces_InterfaceList) error
DeleteInterface disables proxy ARP interface or removes it from cache
func (*ProxyArpConfigurator) DeleteRange ¶
func (plugin *ProxyArpConfigurator) DeleteRange(pArpRng *l3.ProxyArpRanges_RangeList) error
func (*ProxyArpConfigurator) GetArpIfCache ¶
func (plugin *ProxyArpConfigurator) GetArpIfCache() []string
GetArpIfCache exposes list of cached ARP interfaces
func (*ProxyArpConfigurator) GetArpIfIndexes ¶
func (plugin *ProxyArpConfigurator) GetArpIfIndexes() idxvpp.NameToIdxRW
GetArpIfIndexes exposes list of proxy ARP interface indexes
func (*ProxyArpConfigurator) GetArpRngIndexes ¶
func (plugin *ProxyArpConfigurator) GetArpRngIndexes() idxvpp.NameToIdxRW
GetArpRngIndexes exposes list of proxy ARP range indexes
func (*ProxyArpConfigurator) Init ¶
func (plugin *ProxyArpConfigurator) Init(logger logging.PluginLogger, goVppMux govppmux.API, swIfIndexes ifaceidx.SwIfIndex, enableStopwatch bool) (err error)
Init VPP channel and check message compatibility
func (*ProxyArpConfigurator) ModifyInterface ¶
func (plugin *ProxyArpConfigurator) ModifyInterface(newPArpIf, oldPArpIf *l3.ProxyArpInterfaces_InterfaceList) error
ModifyInterface does nothing
func (*ProxyArpConfigurator) ModifyRange ¶
func (plugin *ProxyArpConfigurator) ModifyRange(newPArpRng, oldPArpRng *l3.ProxyArpRanges_RangeList) error
ModifyRange does nothing
func (*ProxyArpConfigurator) ResolveCreatedInterface ¶
func (plugin *ProxyArpConfigurator) ResolveCreatedInterface(ifName string, ifIdx uint32) error
ResolveCreatedInterface handles new registered interface for proxy ARP
func (*ProxyArpConfigurator) ResolveDeletedInterface ¶
func (plugin *ProxyArpConfigurator) ResolveDeletedInterface(ifName string) error
ResolveDeletedInterface handles new registered interface for proxy ARP
func (*ProxyArpConfigurator) ResyncInterfaces ¶
func (plugin *ProxyArpConfigurator) ResyncInterfaces(nbProxyArpIfs []*l3.ProxyArpInterfaces_InterfaceList) error
Resync confgures the empty VPP (overwrites the proxy arp entries)
func (*ProxyArpConfigurator) ResyncRanges ¶
func (plugin *ProxyArpConfigurator) ResyncRanges(nbProxyArpRanges []*l3.ProxyArpRanges_RangeList) error
Resync confgures the empty VPP (overwrites the proxy arp ranges)
type RouteConfigurator ¶
type RouteConfigurator struct {
// contains filtered or unexported fields
}
RouteConfigurator runs in the background in its own goroutine where it watches for any changes in the configuration of L3 routes as modelled by the proto file "../model/l3/l3.proto" and stored in ETCD under the key "/vnf-agent/{vnf-agent}/vpp/config/v1routes". Updates received from the northbound API are compared with the VPP run-time configuration and differences are applied through the VPP binary API.
func (*RouteConfigurator) Close ¶
func (plugin *RouteConfigurator) Close() error
Close GOVPP channel.
func (*RouteConfigurator) ConfigureRoute ¶
func (plugin *RouteConfigurator) ConfigureRoute(config *l3.StaticRoutes_Route, vrfFromKey string) error
ConfigureRoute processes the NB config and propagates it to bin api calls.
func (*RouteConfigurator) DeleteRoute ¶
func (plugin *RouteConfigurator) DeleteRoute(config *l3.StaticRoutes_Route, vrfFromKey string) (wasError error)
DeleteRoute processes the NB config and propagates it to bin api calls.
func (*RouteConfigurator) GetCachedRouteIndexes ¶
func (plugin *RouteConfigurator) GetCachedRouteIndexes() l3idx.RouteIndex
GetCachedRouteIndexes exposes rtCachedIndexes mapping
func (*RouteConfigurator) GetRouteIndexes ¶
func (plugin *RouteConfigurator) GetRouteIndexes() l3idx.RouteIndex
GetRouteIndexes exposes rtIndexes mapping
func (*RouteConfigurator) Init ¶
func (plugin *RouteConfigurator) Init(logger logging.PluginLogger, goVppMux govppmux.API, swIfIndexes ifaceidx.SwIfIndex, enableStopwatch bool) (err error)
Init members (channels...) and start go routines.
func (*RouteConfigurator) ModifyRoute ¶
func (plugin *RouteConfigurator) ModifyRoute(newConfig *l3.StaticRoutes_Route, oldConfig *l3.StaticRoutes_Route, vrfFromKey string) error
ModifyRoute processes the NB config and propagates it to bin api calls.
func (*RouteConfigurator) ResolveCreatedInterface ¶
func (plugin *RouteConfigurator) ResolveCreatedInterface(ifName string, swIdx uint32)
ResolveCreatedInterface is responsible for reconfiguring cached routes and then from removing them from route cache
func (*RouteConfigurator) ResolveDeletedInterface ¶
func (plugin *RouteConfigurator) ResolveDeletedInterface(ifName string, swIdx uint32)
ResolveDeletedInterface is responsible for moving routes of deleted interface to cache
func (*RouteConfigurator) Resync ¶
func (plugin *RouteConfigurator) Resync(nbRoutes []*l3.StaticRoutes_Route) error
Resync configures the VPP static routes.
type SortedRoutes ¶
SortedRoutes type is used to implement sort interface for slice of Route.
func (SortedRoutes) Len ¶
func (arr SortedRoutes) Len() int
Return length of slice. Implements sort.Interface
func (SortedRoutes) Less ¶
func (arr SortedRoutes) Less(i, j int) bool
Less returns true if the item at index i in slice should be sorted before the element with index j. Implements sort.Interface
func (SortedRoutes) Swap ¶
func (arr SortedRoutes) Swap(i, j int)
Swap swaps two items in slice identified by indices. Implements sort.Interface
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package vppcalls contains wrappers over VPP binary APIs for L3 FIBs.
|
Package vppcalls contains wrappers over VPP binary APIs for L3 FIBs. |
Package vppdump provides helpers for dumping all L3 FIBs configured in VPP.
|
Package vppdump provides helpers for dumping all L3 FIBs configured in VPP. |