]> www.infradead.org Git - users/jedix/linux-maple.git/commit
eth: fbnic: support ring size configuration
authorJakub Kicinski <kuba@kernel.org>
Thu, 6 Mar 2025 14:51:50 +0000 (06:51 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 8 Mar 2025 03:37:37 +0000 (19:37 -0800)
commit6cbf18a05c06090d867ef417a2a30b214d42d171
tree6058611352fdb986bd44655bf4269435b046d0de
parentbfb522f347df2d1fefc43f7b42e361321bc010d9
eth: fbnic: support ring size configuration

Support ethtool -g / -G. Leverage the code added for -l / -L
to alloc / stop / start / free.

Check parameters against HW min/max but also our own min/max.
Min HW queue is 16 entries, we can't deal with TWQs that small
because of the queue waking logic. Add similar contraint on RCQ
for symmetry.

We need 3 sizes on Rx, as the NIC does header-data split two separate
buffer pools:
  (1) head page ring    - how many empty pages we post for headers
  (2) payload page ring - how many empty pages we post for payloads
  (3) completion ring   - where NIC produces the Rx descriptors

Acked-by: Joe Damato <jdamato@fastly.com>
Link: https://patch.msgid.link/20250306145150.1757263-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
drivers/net/ethernet/meta/fbnic/fbnic_txrx.h