Page MenuHomeFreeBSD

gve: Add feature to adjust RX/TX queue counts
ClosedPublic

Authored by veethebee_google.com on Mar 20 2025, 8:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 21, 10:32 AM
Unknown Object (File)
Thu, Aug 14, 11:48 PM
Unknown Object (File)
Mon, Aug 11, 6:08 PM
Unknown Object (File)
Thu, Aug 7, 2:12 AM
Unknown Object (File)
Tue, Aug 5, 2:24 AM
Unknown Object (File)
Mon, Aug 4, 3:53 AM
Unknown Object (File)
Fri, Aug 1, 10:34 PM
Unknown Object (File)
Wed, Jul 30, 1:18 AM
Subscribers

Details

Summary

This change introduces new sysctl handlers that allow the user to change
RX/TX queue counts. As before, the default queue counts will be the max
value the device can support. When chaning queue counts, the interface turns
down momentarily while allocating/freeing resources as necessary.

Signed-off-by: Vee Agarwal <veethebee@google.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63318
Build 60202: arc lint + arc unit

Event Timeline

Set priv rx/tx fields to NULL after free

This revision is now accepted and ready to land.Apr 1 2025, 12:06 AM
share/man/man4/gve.4
241

It'd be nicer IMO to document the two sysctls together rather than effectively duplicating the description.

243
sys/dev/gve/gve_main.c
214

Please use C-style /* */ comments in the kernel.

568

Why do we alloc resources for max_queues queues instead of num_queues queues?

sys/dev/gve/gve_sysctl.c
288
369

I would suggest using a plain CTLTYPE_UINT instead of constraining the queue count to 16. It feels a bit strange to encode the type of max_queues in the sysctl ABI. For command-line usage it doesn't matter, but for consistency with other NIC drivers it might be nicer to use a more generic type when accessing the sysctl from C.

370
374
This revision now requires review to proceed.Apr 3 2025, 8:08 PM

Seems ok to me modulo the comments.

sys/dev/gve/gve_sysctl.c
329

IMO printing a message in this case is overkill and not typical for sysctl handlers. The sysctl handler will return the current number of queues currently configured, so code which modifies the queue count can see how many queues were registered before.

359

Same comment here about the print.

This revision is now accepted and ready to land.Apr 4 2025, 12:23 PM

Don't log if queue count doesn't change

This revision now requires review to proceed.Apr 4 2025, 8:22 PM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 4 2025, 11:27 PM
This revision was automatically updated to reflect the committed changes.