Page MenuHomeFreeBSD

gve: Add feature to change TX/RX ring size
ClosedPublic

Authored by veethebee_google.com on Thu, Mar 20, 8:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 17, 12:02 PM
Unknown Object (File)
Mon, Apr 14, 2:15 PM
Unknown Object (File)
Wed, Apr 9, 8:18 PM
Unknown Object (File)
Tue, Apr 8, 4:07 AM
Unknown Object (File)
Mon, Apr 7, 9:22 PM
Unknown Object (File)
Mon, Apr 7, 7:07 AM
Unknown Object (File)
Mon, Apr 7, 1:19 AM
Unknown Object (File)
Sat, Apr 5, 12:16 AM
Subscribers

Details

Summary

This change introduces new sysctl handlers that allow the user to change RX/TX ring sizes. As before, the default ring sizes will come from the device (usually 1024). We also get the max/min limits from the device. In the case min values are not provided we have statically defined constants for the min values. Additionally, if the modify ring option is not enabled on the device, changing ring sizes via sysctl will not be possible. When changing ring sizes, 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 63319
Build 60203: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Tue, Apr 1, 12:07 AM
share/man/man4/gve.4
258

As in D49427, I think it'd be better to just describe the two sysctls with the same text.

sys/dev/gve/gve_main.c
299

Is this gve_down() call needed, given that we already bought the interface down?

sys/dev/gve/gve_sysctl.c
408

Presumably we should acquire the lock before accessing priv->tx_desc_cnt? It seems mostly harmless not to, though.

455

Same comment as in D49427 about using CTLTYPE_UINT instead.

456

Sysctl descriptions should avoid periods.

460
This revision now requires review to proceed.Thu, Apr 3, 8:08 PM
This revision is now accepted and ready to land.Fri, Apr 4, 12:24 PM
This revision now requires review to proceed.Fri, Apr 4, 8:25 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.