From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF4C32C15BE for ; Wed, 25 Feb 2026 18:23:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772043825; cv=none; b=FlCYTJbAQoe56lN9bwvE8x40rGHjXeJHqBSHOYnDW6jWL8NRdmYeYPGR8Sep/cddJUabdTRkhp5uL+pBrJoIPl/zWRc8dlVmc+30HqYgpJDs2hQjPZNLgz4f0+Z8aBQ87sCRJZ0Pmny5nw2zLHn8oOsfCVKBxvhIwjXoVfG7wmc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772043825; c=relaxed/simple; bh=zbbAb4hbGZG9ZX0c/X+ExzY3EiH2KjgoJF/y/bXgQT0=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=SOaTR1/Em0Vfyn/fD90ktSQoxeHdah+V0G9/Azq1tpQjwtEWm1Ua7KvwoFSEqiZMuWYkbb0+8DPr6koq/5aFMiiDz0BL+rkLa1BWhfm0FRUXGgA80KIUwhrw/mZbWm9hlKRdWrcIQLBgh7bB3kbQa8lKO1H5ZhBuc4NynJ/PoBE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--joshwash.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=cEjz7bZA; arc=none smtp.client-ip=209.85.210.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--joshwash.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="cEjz7bZA" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-824b42b8a81so97268b3a.3 for ; Wed, 25 Feb 2026 10:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772043824; x=1772648624; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=ktu6SeGgYKKiMVsHnqdxWPPUmtvwSDIR8ap7D3L+YXA=; b=cEjz7bZAOWntpjzS0pUYyB0h2bPxwkqpCT2XRYXjwZf+UdDQeo81EpJ7PvcKJ97HGG 4GD4Uym2jO2n+7BfUXOTlPuaCyk3SX5hcsT5rk87ZVBGkMZjo27hbYU33u73FM0PDi6d G8owm7+Gs5jpnu6D/Z5qo/a+igOnBNQBYUckCmjrP1P8UYlO1pLaeJgPz6v537ctMuff MWqb1TS0j76rRKnpwqMeJk5YiOGf/X+ZJYfrjG7BIyEmrcZePwNJcltVsoNzq9t3Xn5a 4Tit/Xh0jN2XboUHmqOra8GZMM+p4SkeAHzoWHPn6Vy49JE1zDCraie5b4fmdDiD2lUg ilJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772043824; x=1772648624; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ktu6SeGgYKKiMVsHnqdxWPPUmtvwSDIR8ap7D3L+YXA=; b=tLh7K6NFykwshu0JVZ5nL/EpLRduH4e8GRMg+gedJVPAxDx64vZFCcsh5OsdIDpawy gU2E0K0ggz7HSlKbBoinYOXxQLfy8iiUR2zc4hF76ypy5+QAomM7GEMdS2f3nCEFPQ0n nTgt+QadcKaoMNBY2iUlp/MfxuEr61aUjh8EKrb5UKLZ/57eSV0KhAE0k1x2JIsHqfye 4hNXRW5WugMH4iCIF/kKVCGY6e6VqBgKfAMGCpYv+kgElgVHjNax64BYyXzM7Xo0XjZT TWX8EfwvwEUYOTJO/srPegFkG6t1EUVhZoJAf2WvXnNDsTCpTy7wOPxRv8cN7suliQ54 eslQ== X-Forwarded-Encrypted: i=1; AJvYcCUHOV09XEErQkdrsMWQeTLSE3TK9XGrfgE6EXJ45oSGeZe07msMz2cCwVFpqzAMOJc308G/6hbmk+4hknI=@vger.kernel.org X-Gm-Message-State: AOJu0YxYRz0118rXEjcbV6rp5YRJqEaNFWhRfdVbS3m09zZM3QVfc3DN 7H3lclcRDjM0i4jxZssDMChmoh5GNWxgS0ydYQ9n1pVf1RKnUbkwkAl6E9EuAt+IdvwGxK1BC6s shPqCL41yWCQ1IA== X-Received: from pfnr15.prod.google.com ([2002:aa7:844f:0:b0:81e:87c3:f7a6]) (user=joshwash job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:2e85:b0:7b9:420:cc0f with SMTP id d2e1a72fcca58-826da8ee344mr14377279b3a.14.1772043823762; Wed, 25 Feb 2026 10:23:43 -0800 (PST) Date: Wed, 25 Feb 2026 10:23:40 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.53.0.414.gf7e9f6c205-goog Message-ID: <20260225182342.1049816-1-joshwash@google.com> Subject: [PATCH net-next v2 0/2] gve: Support larger ring sizes in DQO-QPL mode From: Joshua Washington To: netdev@vger.kernel.org Cc: Joshua Washington , Harshitha Ramamurthy , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , Jordan Rhee , John Fraker , Ziwei Xiao , Matt Olson , Praveen Kaligineedi , Bailey Forrest , Tim Hostetler , linux-kernel@vger.kernel.org, Max Yuan Content-Type: text/plain; charset="UTF-8" From: Max Yuan This patch series updates the gve driver to improve Queue Page List (QPL) management and enable support for larger ring sizes when using the DQO-QPL queue format. Previously, the driver used hardcoded multipliers to determine the number of pages to register for QPLs (e.g., 2x ring size for RX). This rigid approach made it difficult to support larger ring sizes without potentially exceeding the "max_registered_pages" limit reported by the device. The first patch introduces a unified and flexible logic for calculating QPL page requirements. It balances TX and RX page allocations based on the configured ring sizes and scales the total count down proportionally if it would otherwise exceed the device's global registration limit. The second patch leverages this new flexibility to stop ignoring the maximum ring size supported by the device in DQO-QPL mode. Users can now configure ring sizes up to the device-reported maximum, as the driver will automatically adjust the QPL size to stay within allowed memory bounds. Changes in v2: - Fixed 32-bit compilation issue by using div64_u64 and div_u64 instead of division operator. (Paolo Abeni) Matt Olson (2): gve: Update QPL page registration logic gve: Enable reading max ring size from the device in DQO-QPL mode drivers/net/ethernet/google/gve/gve.h | 18 ++++++-------- drivers/net/ethernet/google/gve/gve_adminq.c | 18 ++++---------- drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c | 2 +- drivers/net/ethernet/google/gve/gve_main.c | 41 ++++++++++++++++++++++++++++++++ drivers/net/ethernet/google/gve/gve_rx.c | 5 +--- drivers/net/ethernet/google/gve/gve_rx_dqo.c | 6 ++--- drivers/net/ethernet/google/gve/gve_tx.c | 5 +--- drivers/net/ethernet/google/gve/gve_tx_dqo.c | 4 +--- 8 files changed, 58 insertions(+), 41 deletions(-) -- 2.53.0.273.g2a3d683680-goog