Page MenuHomeFreeBSD

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

Authored by veethebee_google.com on Thu, Mar 20, 8:36 PM.
Tags
None
Referenced Files
F114274303: D49427.diff
Thu, Apr 10, 5:55 AM
F114251012: D49427.diff
Wed, Apr 9, 8:32 PM
Unknown Object (File)
Sat, Apr 5, 12:11 AM
Unknown Object (File)
Wed, Mar 26, 7:19 PM
Unknown Object (File)
Mon, Mar 24, 9:57 PM
Unknown Object (File)
Mon, Mar 24, 9:57 PM
Unknown Object (File)
Mon, Mar 24, 9:57 PM
Unknown Object (File)
Mon, Mar 24, 9:57 PM
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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

Set priv rx/tx fields to NULL after free

This revision is now accepted and ready to land.Tue, Apr 1, 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.Thu, Apr 3, 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.Fri, Apr 4, 12:23 PM

Don't log if queue count doesn't change

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