Documentation
¶
Index ¶
- Constants
- Variables
- func CheckAndAddPeerToPeerP4Rules(p types.P4RTClient)
- func FindInterfaceForGivenMac(macAddr string) (string, error)
- func GetFilteredPFs(pfList *[]netlink.Link) error
- func GetMacforNetworkInterface(intf string, linkList []netlink.Link) (string, error)
- func GetPciFromNetDev(ifName string) (string, error)
- func GetVFList(pf string) (vfList []string, err error)
- func GetVfDeviceCount(pciAddr string) (int, error)
- func InitHandlers()
- func NewIpuPlugin(port int, brCtlr types.BridgeController, p4Client types.P4RTClient, ...) types.Runnable
- func NewLinuxBridgeController(bridge string) types.BridgeController
- func NewOvsBridgeController(bridgeName, ovsCliDir string, ovsDbPath string) types.BridgeController
- func SetNumSriovVfs(mode string, pciAddr string, vfCnt int32) error
- func SetNumVfs(mode string, numVfs int32) (int32, error)
- type DevicePluginService
- type ExecutableHandler
- type ExecutableHandlerImpl
- type FXPHandler
- type FXPHandlerImpl
- type FileSystemHandler
- type FileSystemHandlerImpl
- type LifeCycleServiceServer
- type NetworkFunctionServiceServer
- type NetworkHandler
- type NetworkHandlerImpl
- type SSHHandler
- type SSHHandlerImpl
Constants ¶
const ( PHY_PORT0_PRIMARY_INTF_INDEX = 1 PHY_PORT0_SECONDARY_INTF_INDEX = 4 NF_IN_PR_INTF_INDEX = 9 NF_OUT_PR_INTF_INDEX = 10 )
Reserved ACC interfaces(using vport_id or last digit of interface name, like 4 represents-> enp0s1f0d4)
const (
ACC_VM_PR_IP = "192.168.100.252/24"
)
const (
ApfNumber = 16
)
Variables ¶
var AccApfMacList []string
var AccIntfNames = [ApfNumber]string{"enp0s1f0", "enp0s1f0d1", "enp0s1f0d2", "enp0s1f0d3", "enp0s1f0d4", "enp0s1f0d5", "enp0s1f0d6",
"enp0s1f0d7", "enp0s1f0d8", "enp0s1f0d9", "enp0s1f0d10", "enp0s1f0d11", "enp0s1f0d12", "enp0s1f0d13", "enp0s1f0d14", "enp0s1f0d15"}
TODO: GetFilteredPFs can be used to fill the array.
var InitAccApfMacs = false
var PeerToPeerP4RulesAdded = false
Functions ¶
func CheckAndAddPeerToPeerP4Rules ¶
func CheckAndAddPeerToPeerP4Rules(p types.P4RTClient)
If ipu-plugin's Init function gets invoked on ACC, prior to getting invoked on x86, then host VFs will not be setup yet. In that case, peer2peer rules will get added in CreateBridgePort or CreateNetworkFunction.
func GetFilteredPFs ¶
TODO: Can we cache 2 PF lists for host and ACC, to avoid repeated calls to GetFilteredPFs
func GetPciFromNetDev ¶
GetPciFromNetDev takes in a network device name and returns its PCI address Note: This function(GetPciFromNetDev) is based on similar api in dpu-operator/dpu-cni/pkgs/sriovutils
func GetVFList ¶
Note: This function below was taken from open-source sriov plugin, which is also under the same apache license, with few additional changes. Returns a List containing PCI addr for all VF discovered in a given PF
func GetVfDeviceCount ¶
func InitHandlers ¶
func InitHandlers()
func NewIpuPlugin ¶
func NewIpuPlugin(port int, brCtlr types.BridgeController, p4Client types.P4RTClient, p4Image string, servingAddr, servingProto, bridge, intf, p4cpInstall, mode, daemonHostIp, daemonIpuIp string, daemonPort int) types.Runnable
func NewLinuxBridgeController ¶
func NewLinuxBridgeController(bridge string) types.BridgeController
func NewOvsBridgeController ¶
func NewOvsBridgeController(bridgeName, ovsCliDir string, ovsDbPath string) types.BridgeController
Types ¶
type DevicePluginService ¶
type DevicePluginService struct { pb.UnimplementedDeviceServiceServer // contains filtered or unexported fields }
func NewDevicePluginService ¶
func NewDevicePluginService(mode string) *DevicePluginService
func (*DevicePluginService) GetDevices ¶
func (s *DevicePluginService) GetDevices(context.Context, *pb.Empty) (*pb.DeviceListResponse, error)
type ExecutableHandler ¶
type ExecutableHandler interface { SetupAccApfs() error // contains filtered or unexported methods }
var ExecutableHandlerGlobal ExecutableHandler
type ExecutableHandlerImpl ¶
type ExecutableHandlerImpl struct{}
func (*ExecutableHandlerImpl) SetupAccApfs ¶
func (e *ExecutableHandlerImpl) SetupAccApfs() error
type FXPHandler ¶
type FXPHandler interface {
// contains filtered or unexported methods
}
type FXPHandlerImpl ¶
type FXPHandlerImpl struct{}
type FileSystemHandler ¶
type FileSystemHandlerImpl ¶
type FileSystemHandlerImpl struct{}
type LifeCycleServiceServer ¶
type LifeCycleServiceServer struct { pb.UnimplementedLifeCycleServiceServer // contains filtered or unexported fields }
func NewLifeCycleService ¶
func NewLifeCycleService(daemonHostIp, daemonIpuIp string, daemonPort int, mode string, p4rtClient types.P4RTClient, brCtlr types.BridgeController) *LifeCycleServiceServer
func (*LifeCycleServiceServer) Init ¶
func (s *LifeCycleServiceServer) Init(ctx context.Context, in *pb.InitRequest) (*pb.IpPort, error)
type NetworkFunctionServiceServer ¶
type NetworkFunctionServiceServer struct { pb.UnimplementedNetworkFunctionServiceServer Ports map[string]*types.BridgePortInfo // contains filtered or unexported fields }
func NewNetworkFunctionService ¶
func NewNetworkFunctionService(ports map[string]*types.BridgePortInfo, brCtlr types.BridgeController, p4Client types.P4RTClient) *NetworkFunctionServiceServer
func (*NetworkFunctionServiceServer) CreateNetworkFunction ¶
func (*NetworkFunctionServiceServer) DeleteNetworkFunction ¶
type NetworkHandler ¶
type NetworkHandlerImpl ¶
type NetworkHandlerImpl struct{}
type SSHHandler ¶
type SSHHandler interface {
// contains filtered or unexported methods
}
type SSHHandlerImpl ¶
type SSHHandlerImpl struct{}