kernel/2012-gve-Enable-reading-max-ring-size-in-DQO-QPL-mode.patch
Eduard Abdullin 60b15ef93d Debrand for AlmaLinux OS
Use AlmaLinux OS secure boot cert

Enable Btrfs support for all kernel variants

hpsa: bring back deprecated PCI ids #CFHack #CFHack2024

mptsas: bring back deprecated PCI ids #CFHack #CFHack2024

megaraid_sas: bring back deprecated PCI ids #CFHack #CFHack2024

qla2xxx: bring back deprecated PCI ids #CFHack #CFHack2024

qla4xxx: bring back deprecated PCI ids

be2iscsi: bring back deprecated PCI ids

kernel/rh_messages.h: enable all disabled pci devices by moving to unmaintained

gve: update QPL page registration logic to honor max_registered_pages (backport from upstream)

gve: enable reading max ring size from the device in DQO-QPL mode (backport from upstream)
2026-07-30 23:18:41 +00:00

54 lines
2.5 KiB
Diff

From a2f19184014f309165d2d4cfb41088b75c1121a4 Mon Sep 17 00:00:00 2001
From: Matt Olson <maolson@google.com>
Date: Wed, 25 Feb 2026 10:23:42 -0800
Subject: [PATCH AlmaLinux 10] gve: Enable reading max ring size from the device in DQO-QPL mode
The gVNIC device indicates a device option (MODIFY_RING) to the driver,
which presents a range of ring sizes from which the user is allowed to
select. But in DQO-QPL queue format, the driver ignores the "max" of
this range and instead allows the user to configure the ring size in the
range [min, default]. This was done because increasing the ring size
could result in the number of registered pages being higher than the max
allowed by the device.
In order to support large ring sizes, stop ignoring the "max" of the
range presented in the MODIFY_RING option.
Signed-off-by: Matt Olson <maolson@google.com>
Signed-off-by: Max Yuan <maxyuan@google.com>
Reviewed-by: Jordan Rhee <jordanrhee@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
Link: https://patch.msgid.link/20260225182342.1049816-3-joshwash@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ AlmaLinux: applied unmodified on top of the backported "gve: Update QPL page
registration logic". ]
Signed-off-by: Andrew Lukoshko <alukoshko@almalinux.org>
---
diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/ethernet/google/gve/gve_adminq.c
index 2c233009621bc..b5f105709e49b 100644
--- a/drivers/net/ethernet/google/gve/gve_adminq.c
+++ b/drivers/net/ethernet/google/gve/gve_adminq.c
@@ -989,12 +989,10 @@ static void gve_enable_supported_features(struct gve_priv *priv,
if (dev_op_modify_ring &&
(supported_features_mask & GVE_SUP_MODIFY_RING_MASK)) {
priv->modify_ring_size_enabled = true;
-
- /* max ring size for DQO QPL should not be overwritten because of device limit */
- if (priv->queue_format != GVE_DQO_QPL_FORMAT) {
- priv->max_rx_desc_cnt = be16_to_cpu(dev_op_modify_ring->max_rx_ring_size);
- priv->max_tx_desc_cnt = be16_to_cpu(dev_op_modify_ring->max_tx_ring_size);
- }
+ priv->max_rx_desc_cnt =
+ be16_to_cpu(dev_op_modify_ring->max_rx_ring_size);
+ priv->max_tx_desc_cnt =
+ be16_to_cpu(dev_op_modify_ring->max_tx_ring_size);
if (priv->default_min_ring_size) {
/* If device hasn't provided minimums, use default minimums */
priv->min_tx_desc_cnt = GVE_DEFAULT_MIN_TX_RING_SIZE;
--
cgit 1.3-korg