Documentation
¶
Overview ¶
Package dpdk provides DPDK device binding and management functionality for the AWS Multi-ENI Controller.
Index ¶
- type BindingError
- type BindingRequest
- type BindingStatus
- type BoundInterface
- type CircuitBreaker
- type CircuitBreakerConfig
- type CircuitBreakerState
- type Coordinator
- type Error
- type Manager
- func (m *Manager) BindInterfaceToDPDK(link vnetlink.Link, driver string) error
- func (m *Manager) BindPCIDeviceToDPDK(pciAddress string, driver string) error
- func (m *Manager) GetBoundInterfaces() map[string]BoundInterface
- func (m *Manager) GetManagerStatus() map[string]any
- func (m *Manager) IsInterfaceBound(ifaceName string) bool
- func (m *Manager) IsPCIDeviceBoundToDPDK(pciAddress string, driver string) (bool, error)
- func (m *Manager) ResetCircuitBreaker()
- func (m *Manager) UnbindInterfaceFromDPDK(ifaceName string) error
- type SRIOVUpdate
- type TimeoutError
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindingError ¶
BindingError represents a device binding error
func NewBindingError ¶
func NewBindingError(pciAddr, driver, reason string, err error) *BindingError
NewBindingError creates a new binding error
func (*BindingError) Error ¶
func (e *BindingError) Error() string
func (*BindingError) Unwrap ¶
func (e *BindingError) Unwrap() error
type BindingRequest ¶
type BindingRequest struct {
PCIAddress string
Driver string
NodeENIName string
ENIID string
InterfaceName string
ResourceName string
}
BindingRequest represents a DPDK binding request
type BindingStatus ¶
type BindingStatus struct {
IsBound bool
Driver string
PCIAddress string
ResourceName string
Error error
}
BindingStatus represents the status of a DPDK binding
type BoundInterface ¶
type BoundInterface struct {
PCIAddress string
Driver string
NodeENIName string
ENIID string
InterfaceName string
BoundAt time.Time
}
BoundInterface represents a DPDK bound interface
type CircuitBreaker ¶
type CircuitBreaker struct {
// contains filtered or unexported fields
}
CircuitBreaker implements the circuit breaker pattern for DPDK operations
func NewCircuitBreaker ¶
func NewCircuitBreaker(config CircuitBreakerConfig) *CircuitBreaker
NewCircuitBreaker creates a new circuit breaker
func (*CircuitBreaker) GetState ¶
func (cb *CircuitBreaker) GetState() CircuitBreakerState
GetState returns the current state of the circuit breaker
func (*CircuitBreaker) GetStats ¶
func (cb *CircuitBreaker) GetStats() map[string]interface{}
GetStats returns statistics about the circuit breaker
func (*CircuitBreaker) Reset ¶
func (cb *CircuitBreaker) Reset()
Reset resets the circuit breaker to closed state
type CircuitBreakerConfig ¶
type CircuitBreakerConfig struct {
FailureThreshold int // Number of failures before opening
SuccessThreshold int // Number of successes before closing from half-open
Timeout time.Duration // Time to wait before trying half-open
}
CircuitBreakerConfig holds configuration for the circuit breaker
func DefaultCircuitBreakerConfig ¶
func DefaultCircuitBreakerConfig() CircuitBreakerConfig
DefaultCircuitBreakerConfig returns default circuit breaker configuration
type CircuitBreakerState ¶
type CircuitBreakerState int
CircuitBreakerState represents the state of a circuit breaker
const ( // StateClosed means the circuit breaker is closed (normal operation) StateClosed CircuitBreakerState = iota // StateOpen means the circuit breaker is open (failing fast) StateOpen // StateHalfOpen means the circuit breaker is half-open (testing) StateHalfOpen )
func (CircuitBreakerState) String ¶
func (s CircuitBreakerState) String() string
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
Coordinator orchestrates DPDK binding operations for NodeENI resources
func NewCoordinator ¶
func NewCoordinator(cfg *config.ENIManagerConfig) *Coordinator
NewCoordinator creates a new DPDK coordinator
func (*Coordinator) CheckForUnbinding ¶
func (c *Coordinator) CheckForUnbinding(ctx context.Context, nodeName string, nodeENIs []networkingv1alpha1.NodeENI) error
CheckForUnbinding checks for interfaces that need to be unbound from DPDK
func (*Coordinator) ProcessNodeENIBindings ¶
func (c *Coordinator) ProcessNodeENIBindings(ctx context.Context, nodeName string, nodeENIs []networkingv1alpha1.NodeENI) error
ProcessNodeENIBindings processes DPDK bindings for all NodeENI resources
type Error ¶
Error represents a DPDK-specific error
func (*Error) IsRetryable ¶
IsRetryable determines if a DPDK error is retryable
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles DPDK device binding operations
func NewManager ¶
func NewManager(cfg *config.ENIManagerConfig) *Manager
NewManager creates a new DPDK manager instance
func (*Manager) BindInterfaceToDPDK ¶
BindInterfaceToDPDK binds a network interface to a DPDK driver
func (*Manager) BindPCIDeviceToDPDK ¶
BindPCIDeviceToDPDK binds a PCI device to a DPDK driver
func (*Manager) GetBoundInterfaces ¶
func (m *Manager) GetBoundInterfaces() map[string]BoundInterface
GetBoundInterfaces returns a map of currently bound DPDK interfaces
func (*Manager) GetManagerStatus ¶
GetManagerStatus returns the current status of the DPDK manager
func (*Manager) IsInterfaceBound ¶
IsInterfaceBound checks if an interface is bound to DPDK
func (*Manager) IsPCIDeviceBoundToDPDK ¶
IsPCIDeviceBoundToDPDK checks if a PCI device is bound to a DPDK driver
func (*Manager) ResetCircuitBreaker ¶
func (m *Manager) ResetCircuitBreaker()
ResetCircuitBreaker resets the circuit breaker to closed state
func (*Manager) UnbindInterfaceFromDPDK ¶
UnbindInterfaceFromDPDK unbinds an interface from DPDK
type SRIOVUpdate ¶
type SRIOVUpdate struct {
PCIAddress string
Driver string
ResourceName string
ResourcePrefix string
}
SRIOVUpdate represents an SR-IOV configuration update for DPDK
type TimeoutError ¶
TimeoutError represents a timeout error
func NewTimeoutError ¶
func NewTimeoutError(operation string, duration time.Duration) *TimeoutError
NewTimeoutError creates a new timeout error
func (*TimeoutError) Error ¶
func (e *TimeoutError) Error() string
type ValidationError ¶
ValidationError represents a validation error
func NewValidationError ¶
func NewValidationError(field, value, reason string) *ValidationError
NewValidationError creates a new validation error
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string