Skip to content
3 changes: 1 addition & 2 deletions apis/v1alpha1/cluster_tc_program_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ type ClTcAttachInfo struct {
// +optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=1000
// +kubebuilder:default:=1000
Priority int32 `json:"priority,omitempty"`
Priority *int32 `json:"priority,omitempty"`

// proceedOn is an optional field and allows the user to call other TC programs
// in a chain, or not call the next program in a chain based on the exit code
Expand Down
3 changes: 1 addition & 2 deletions apis/v1alpha1/cluster_tcx_program_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ type ClTcxAttachInfo struct {
// +optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=1000
// +kubebuilder:default:=1000
Priority int32 `json:"priority,omitempty"`
Priority *int32 `json:"priority,omitempty"`
}

type ClTcxProgramInfoState struct {
Expand Down
3 changes: 1 addition & 2 deletions apis/v1alpha1/cluster_xdp_program_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ type ClXdpAttachInfo struct {
// +optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=1000
// +kubebuilder:default:=1000
Priority int32 `json:"priority,omitempty"`
Priority *int32 `json:"priority,omitempty"`

// proceedOn is an optional field and allows the user to call other XDP
// programs in a chain, or not call the next program in a chain based on the
Expand Down
6 changes: 6 additions & 0 deletions apis/v1alpha1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// DefaultAttachPriority is the default priority used when attaching BPF
// programs (XDP, TC, TCX) to network interfaces. Priority determines execution
// order relative to other programs at the same attachment point, where lower
// values indicate higher precedence. Valid range is 0-1000.
const DefaultAttachPriority int32 = 1000
Copy link
Contributor Author

@andreaskaris andreaskaris Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concern here is that this will have to go, as is, into the OpenShift API. And I'm wondering if we want to do that - because having such values in the API will make changes difficult if needed.


type InterfaceDiscovery struct {
// interfaceAutoDiscovery is an optional field. When enabled, the agent
// monitors the creation and deletion of interfaces and automatically
Expand Down
3 changes: 1 addition & 2 deletions apis/v1alpha1/tc_program_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ type TcAttachInfo struct {
// +optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=1000
// +kubebuilder:default:=1000
Priority int32 `json:"priority,omitempty"`
Priority *int32 `json:"priority,omitempty"`

// proceedOn is an optional field and allows the user to call other TC programs
// in a chain, or not call the next program in a chain based on the exit code
Expand Down
3 changes: 1 addition & 2 deletions apis/v1alpha1/tcx_program_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ type TcxAttachInfo struct {
// +optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=1000
// +kubebuilder:default:=1000
Priority int32 `json:"priority,omitempty"`
Priority *int32 `json:"priority,omitempty"`
}

type TcxProgramInfoState struct {
Expand Down
3 changes: 1 addition & 2 deletions apis/v1alpha1/xdp_program_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ type XdpAttachInfo struct {
// +optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=1000
// +kubebuilder:default:=1000
Priority int32 `json:"priority,omitempty"`
Priority *int32 `json:"priority,omitempty"`

// proceedOn is an optional field and allows the user to call other XDP
// programs in a chain, or not call the next program in a chain based on the
Expand Down
30 changes: 30 additions & 0 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ metadata:
capabilities: Basic Install
categories: OpenShift Optional
containerImage: quay.io/bpfman/bpfman-operator:latest
createdAt: "2026-01-15T18:23:35Z"
createdAt: "2026-01-29T11:46:57Z"
description: The bpfman Operator is designed to manage eBPF programs for applications.
features.operators.openshift.io/cnf: "false"
features.operators.openshift.io/cni: "false"
Expand Down
3 changes: 0 additions & 3 deletions bundle/manifests/bpfman.io_bpfapplications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the TC
program relative to other TC programs attached to the same attachment point.
Expand Down Expand Up @@ -676,7 +675,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the TCX
program relative to other TCX programs attached to the same attachment
Expand Down Expand Up @@ -1161,7 +1159,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the XDP
program relative to other XDP programs attached to the same attachment
Expand Down
3 changes: 0 additions & 3 deletions bundle/manifests/bpfman.io_clusterbpfapplications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the TC
program relative to other TC programs attached to the same attachment point.
Expand Down Expand Up @@ -869,7 +868,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the TCX
program relative to other TCX programs attached to the same attachment
Expand Down Expand Up @@ -1444,7 +1442,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the XDP
program relative to other XDP programs attached to the same attachment
Expand Down
1 change: 1 addition & 0 deletions cmd/bpfman-agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ func main() {
NodeName: nodeName,
Containers: containerGetter,
Interfaces: &sync.Map{},
NetNsCache: &bpfmanagent.ReconcilerNetNsCache{},
}

if err = (&bpfmanagent.ClBpfApplicationReconciler{
Expand Down
3 changes: 0 additions & 3 deletions config/crd/bases/bpfman.io_bpfapplications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the TC
program relative to other TC programs attached to the same attachment point.
Expand Down Expand Up @@ -676,7 +675,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the TCX
program relative to other TCX programs attached to the same attachment
Expand Down Expand Up @@ -1161,7 +1159,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the XDP
program relative to other XDP programs attached to the same attachment
Expand Down
3 changes: 0 additions & 3 deletions config/crd/bases/bpfman.io_clusterbpfapplications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the TC
program relative to other TC programs attached to the same attachment point.
Expand Down Expand Up @@ -869,7 +868,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the TCX
program relative to other TCX programs attached to the same attachment
Expand Down Expand Up @@ -1444,7 +1442,6 @@ spec:
- pods
type: object
priority:
default: 1000
description: |-
priority is an optional field and determines the execution order of the XDP
program relative to other XDP programs attached to the same attachment
Expand Down
2 changes: 1 addition & 1 deletion controllers/bpfman-agent/cl_application_program.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (r *ClBpfApplicationReconciler) Reconcile(ctx context.Context, req ctrl.Req
r.Logger = ctrl.Log.WithName("cluster-app")
r.finalizer = internal.ClBpfApplicationControllerFinalizer
r.recType = internal.ApplicationString
r.NetnsCache = make(map[string]uint64)
r.NetNsCache.Reset()

r.Logger.Info("Enter ClusterBpfApplication Reconcile", "Name", req.Name)

Expand Down
Loading
Loading