Page MenuHomeFreeBSD

gve: Allocate qpl per ring at ring allocation time
ClosedPublic

Authored by veethebee_google.com on Mar 20 2025, 8:36 PM.
Tags
None
Referenced Files
F125829882: D49426.id152476.diff
Tue, Aug 12, 10:55 AM
Unknown Object (File)
Sat, Aug 9, 6:44 AM
Unknown Object (File)
Fri, Aug 8, 8:49 AM
Unknown Object (File)
Mon, Jul 28, 11:30 AM
Unknown Object (File)
Wed, Jul 23, 3:05 AM
Unknown Object (File)
Tue, Jul 22, 10:40 AM
Unknown Object (File)
Jul 7 2025, 5:22 PM
Unknown Object (File)
Jul 7 2025, 2:56 PM
Subscribers

Details

Summary

Every tx and rx ring has its own queue-page-list (QPL) that serves as
the bounce buffer. Previously we were allocating QPLs for all queues
before the queues themselves were allocated and later associating a QPL
with a queue. This is avoidable complexity: it is much more natural for
each queue to allocate and free its own QPL.

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

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Apr 1 2025, 12:06 AM
sys/dev/gve/gve.h
631–633
sys/dev/gve/gve_qpl.c
97

malloc(M_WAITOK) never fails, so null-checking isn't required here.

99

Given that id is only used in this assignment, why not add the offset in the caller instead of passing this is_rx flag? That seems cleaner to me.

171–175

Kernel code should use C-style comments only. There is a script, tools/build/checkstyle9.pl, based on the one for Linux, which should report issues like this.

172

Why not declare i_tx in the loop header?

This revision now requires review to proceed.Apr 3 2025, 8:07 PM
sys/dev/gve/gve_tx_dqo.c
219

Don't you need to check for an allocation failure here?

Add check to see if gve_alloc_qpl failed

Could you please mail me git-formatted patches? I'll apply them to the src tree.

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