dpuagent

package
v0.1.0-latest-stable Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package dpuagent holds e2e validations for the DPU Agent operations that run inside the DPU (internal/provisioning/dpuagent/operations/...). The validations observe the resulting DPU OS state from a pod on the DPU cluster.

Index

Constants

View Source
const (
	// DefaultDMASFNum is the sfnum the DPU Agent uses for the SNAP DMA SF. It mirrors
	// snapDMASFNum in internal/provisioning/dpuagent/operations/sriovconfig.
	DefaultDMASFNum = 8000
)

Variables

This section is empty.

Functions

func ValidateDMAScalableFunction

func ValidateDMAScalableFunction(ctx context.Context, input DMAScalableFunctionInput)

ValidateDMAScalableFunction verifies the SNAP DMA SF that the DPU Agent creates when the DPUFlavor sets a dma entry (BlueField-4 socket-direct). It spins up a privileged hostNetwork netutils pod on every DPU cluster node, execs into it and asserts, from the DPU's own sysfs, that the SF with the expected sfnum exists, exposes an RDMA device and has no netdev of its own — the same "consumable by SNAP" contract verifyDMASFConsumable enforces agent-side, checked here end-to-end on real hardware.

It skips when the flavor does not enable the DMA SF. It does not skip when the SF is missing: a flavor that enables the feature on a DPU that is not socket-direct is a setup error the suite should surface, not hide.

Types

type DMAScalableFunctionInput

type DMAScalableFunctionInput struct {
	// DPUFlavor is the flavor the DPUs were provisioned with; its
	// spec.scalableFunctions' dma entry decides whether the validation applies at all.
	DPUFlavor *provisioningv1.DPUFlavor

	// ClusterClient targets the DPU cluster via a refreshable wrapper, so it
	// stays valid across tunnel restarts on its own.
	ClusterClient client.Client

	// RESTClient and RESTConfig target the DPU cluster over the tunneled REST
	// config. They are **rest.RESTClient/**rest.Config (pointers to the
	// suite's dpuClusterRestClient[i]/dpuClusterRestConfig[i] slice elements),
	// not plain pointers, because a background health-check can replace those
	// elements with a new client/port at any time if the tunnel drops. Code
	// that retries across time must dereference *RESTClient/*RESTConfig fresh
	// on every attempt instead of snapshotting them once - see
	// verifyDMASFRepresentorUp and the sysfs check in
	// ValidateDMAScalableFunction.
	RESTClient **rest.RESTClient
	RESTConfig **rest.Config

	// Namespace is the DPU cluster namespace the netutils pods are created in.
	Namespace string

	// NetutilsImage is the netutils image repository (no tag) and Tag the tag to
	// pull; ImagePullSecret is the pull secret available in Namespace.
	NetutilsImage   string
	Tag             string
	ImagePullSecret string

	// PodLabels are set on the netutils pods so suite-level cleanup can find them.
	PodLabels map[string]string

	// SkipCleanup leaves the netutils pods behind for post-mortem debugging.
	SkipCleanup bool
}

DMAScalableFunctionInput carries everything ValidateDMAScalableFunction needs from the e2e suite: the flavor under test and access to the DPU cluster the provisioned DPUs joined.

Jump to

Keyboard shortcuts

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