Skip to content

feat: adding support for multiqueue#650

Open
drew-viles wants to merge 2 commits intoionos-cloud:mainfrom
drew-viles:network-multiqueue
Open

feat: adding support for multiqueue#650
drew-viles wants to merge 2 commits intoionos-cloud:mainfrom
drew-viles:network-multiqueue

Conversation

@drew-viles
Copy link
Copy Markdown

Issue #, if available:
#501

Description of changes:
Right now, users cannot add queues to the network NIC. With this PR, users will now be able to optionally supply a value into the CAPI provider to configure queues.

Testing performed:
Added tests for make test and ran with success. I'm currently trying to get access to a proxmox with shared storage as it appears to be required for this where as right now, I'm using local storage.

If you want to wait for that testing to be done on my side I totally get it! However, the change seems pretty straight forward on the whole so I'll let you make the call from your side.

Right now, users cannot add queues to the network NIC. With this PR, users will now be able to optionally supply a value into the CAPI provider to configure queues.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 2, 2026

Tests

Please note that running unit and e2e tests requires manual approval from a team member.

e2e tests

We use labels to control which e2e tests contexts are run:

Label Behaviour
none Run Generic tests only
e2e/none skip all e2e tests (documentation etc) - overrides all e2e/* labels Do not run any e2e tests
e2e/flatcar run Flatcar e2e tests Add Flatcar tests

ℹ️ Ask a team member to add the requested labels if you don't have enough permissions.

@wikkyk
Copy link
Copy Markdown
Collaborator

wikkyk commented Mar 3, 2026

Nice and simple change but we'll hold it for now until after we have released 0.8.0 and v1alpha2.

Copy link
Copy Markdown
Collaborator

@wikkyk wikkyk left a comment

Choose a reason for hiding this comment

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

Please port this to v1alpha2!
Remember to update the tests with the correct type, too.

// Queues is the Multiqueue field in Proxmox to assign to the NIC
// +optional
// +kubebuilder:validation:Minimum=1
Queues *uint16 `json:"queues,omitempty"`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fields must be signed. If you're expecting 65535 to be a valid value, then make it an int32 with a Maximum rule, if 65534 then int16 is fine.

// +kubebuilder:validation:Maximum=4094
VLAN *uint16 `json:"vlan,omitempty"`

// Queues is the Multiqueue field in Proxmox to assign to the NIC
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It'd be nice to make this comment a bit more informative:

Suggested change
// Queues is the Multiqueue field in Proxmox to assign to the NIC
// Queues is the number of queues assigned to the device.
// This value is passed to the Multiqueue field in PROXMOX.

}

// extractNetworkQueue returns the queue out of net device input e.g. virtio=A6:23:64:4D:84:CB,bridge=vmbr1,mtu=1500,tag=100,queue=4.
func extractNetworkQueue(input string) uint16 {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remember to fix the return value to match the Queues field.

This increases the importance of #653 :-)

Comment on lines +198 to +200
if v.Queues != nil {
queue := extractNetworkQueue(net)
if queue != *v.Queues {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This could be done with ptr.Deref.

Comment on lines +210 to +211
// example 'virtio,bridge=vmbr0,tag=100,queue=4'.
func formatNetworkDevice(model, bridge string, mtu *uint16, vlan *uint16, queue *uint16) string {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// example 'virtio,bridge=vmbr0,tag=100,queue=4'.
func formatNetworkDevice(model, bridge string, mtu *uint16, vlan *uint16, queue *uint16) string {
// example 'virtio,bridge=vmbr0,tag=100,queues=4'.
func formatNetworkDevice(model, bridge string, mtu *uint16, vlan *uint16, queues *uint16) string {

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
14 Security Hotspots
31.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@drew-viles
Copy link
Copy Markdown
Author

Sorry absolutely slammed atm, I will pick this up again asap though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants