From nobody Fri Dec 19 15:48:13 2025 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 028B43559EE for ; Thu, 6 Nov 2025 19:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762457301; cv=none; b=JZ2nX+FNg9/XispT8WTi2YCB1EAABaTfYnAgIQ0ktcESp1XR3dnteXOLF2H/jmXuhlivsVSXr8HQ1dTBxWpuFdSoa+psI8RYRyBizQQTLWE2nq2FTemyY8SQb8DCAHJdhEpoTYvXlSu+NTnyV/Abgyc+fHGXZaNbOHFW5ABQedU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762457301; c=relaxed/simple; bh=1Y+YpubDp1qb7oc7hg3w1PWoz9inIa15b2wdhzuZk9M=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Y3KC/RsDcKePmVZ4kPhwoBro87ocd568iSsoSCz5H37xNdS09LPcOhiu/gKgzWOKy4oSnte2MEIVt4DWjIAXQxiJoqD7+Y0qucnCPZJbQEhDfd5JOnHtBk+3BIdfGvnr3Fh31IDL1aa8Vqb45T7Qk/cKNAB5Yofw/35LnI95+Jk= 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=r1gZxOib; arc=none smtp.client-ip=209.85.216.73 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="r1gZxOib" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-340bb1bf12aso12336a91.1 for ; Thu, 06 Nov 2025 11:28:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762457299; x=1763062099; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=V3U2BLp1AgEXNIvYOhrj08jJ81pfESpJT+bWqtR6/KU=; b=r1gZxOibS8MW3Iw6vmRpRh1GkWyj97wcxCi3EdHBnefAwMvhaahGQ1HvzN2VFfi2bT LrseiW5LMELcRDQX7gf8rwAKhpPzs30pW85AJiCEGU4a2GHseWJP66l/HAeXSYdu5YYu ra2zEZXpyptrzoKZCq/Sdp56e5waWJtZ+KthMiYTXihhLjTKF+nW2/C5vfy8P2G82njP qXKFlyMrqlk+lrFqzI4+K1JNQ5O8PZhWbZbwp1nD+mEauAcU15K1tz7KYHBzAN3hu4T/ d8vfXKfjvhUupXPDnQ8hNpLUZ+5DIazI++spbDbKMwUp1XXKwG0Dga8r3nqHVMlDqxsD LUEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762457299; x=1763062099; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=V3U2BLp1AgEXNIvYOhrj08jJ81pfESpJT+bWqtR6/KU=; b=kuNOCn8A2M88poZry/rR8jA0m44OYcG/5kQJ94RW0nNS/I9EszSURbOLzDVEbGI5t7 Q9t9eYlTYDtC7AkBS5PkHqLP8x6oX9bMtQR/t+W8M5MWxx5nrpkR92OLLX7gbqKQamn0 8C2yA6a99hV6+UozrGq0aH5fWQChsQ/RVmUFZiBJWb7Fc472I8/QCHkHqHWFiORQZgHX H3gr4Ck+w2+ueEbLHrV5voaYPDF+E0nk+zS/UzUJ2t7UkBe035yQsA9xQPEhOZ0IfVVu 6oSddqDWtCA6FM7+lUb4//5/LhgtBWxyIp8cHU4QlmlEaWIIeHPpaLCURB9nRo5nYpo+ ySDA== X-Forwarded-Encrypted: i=1; AJvYcCWujRmqFci7G+wK5c6DHqKwDC/yeG3W4NicrihJ2MKKyznKQvD5YybW+lD+kdUzkZrCMw8KiYXQltrdppI=@vger.kernel.org X-Gm-Message-State: AOJu0YyDH92qNvH5W3Ft/Niylu7ljOpcoxP9/toxLiR6LPK/yBqYIV5T zxBMIczatmVv+wCH7SDYYYtKHSNJhvuhOLnEc6ICgRB1AOSBbJM48MDUX0P2N1uQmTZEooYrbc1 9hrE4ruNc+NUIUA== X-Google-Smtp-Source: AGHT+IEsIfGYhZdZ2tqtBbcVUZ7ueSUHICQoVDbIm+m6yTPLyYNJ4OIu36HZ71hM7vJ6QPPO9Ilb5TFmeTcycw== X-Received: from pjbrm14.prod.google.com ([2002:a17:90b:3ece:b0:341:2141:d814]) (user=joshwash job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3809:b0:32d:dc3e:5575 with SMTP id 98e67ed59e1d1-3434c4e0e7emr325363a91.5.1762457299298; Thu, 06 Nov 2025 11:28:19 -0800 (PST) Date: Thu, 6 Nov 2025 11:27:46 -0800 In-Reply-To: <20251106192746.243525-1-joshwash@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251106192746.243525-1-joshwash@google.com> X-Mailer: git-send-email 2.51.2.1041.gc1ab5b90ca-goog Message-ID: <20251106192746.243525-5-joshwash@google.com> Subject: [PATCH net-next v3 4/4] gve: Default to max_rx_buffer_size for DQO if device supported From: joshwash@google.com To: netdev@vger.kernel.org Cc: Joshua Washington , Harshitha Ramamurthy , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , Willem de Bruijn , Praveen Kaligineedi , Ziwei Xiao , John Fraker , "Dr. David Alan Gilbert" , Ankit Garg , linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Jordan Rhee Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Ankit Garg Change the driver's default behavior to prefer the largest available RX buffer length supported by the device for DQO format, rather than always using the hardcoded 2K default. Previously, the driver would initialize with `GVE_DEFAULT_RX_BUFFER_SIZE` (2K), even if the device advertised support for a larger length (e.g., 4K). Performance observations: - With LRO disabled, we observed >10% improvement in RX single stream throughput when MTU >=3D2048. - With LRO enabled, we observed >10% improvement in RX single stream throughput when MTU >=3D1460. - No regressions were observed. Signed-off-by: Ankit Garg Reviewed-by: Harshitha Ramamurthy Reviewed-by: Jordan Rhee Reviewed-by: Willem de Bruijn Signed-off-by: Joshua Washington --- drivers/net/ethernet/google/gve/gve_adminq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/eth= ernet/google/gve/gve_adminq.c index 4f33d09..b72cc0f 100644 --- a/drivers/net/ethernet/google/gve/gve_adminq.c +++ b/drivers/net/ethernet/google/gve/gve_adminq.c @@ -987,6 +987,10 @@ static void gve_enable_supported_features(struct gve_p= riv *priv, dev_info(&priv->pdev->dev, "BUFFER SIZES device option enabled with max_rx_buffer_size of %u, hea= der_buf_size of %u.\n", priv->max_rx_buffer_size, priv->header_buf_size); + if (gve_is_dqo(priv) && + priv->max_rx_buffer_size > GVE_DEFAULT_RX_BUFFER_SIZE) + priv->rx_cfg.packet_buffer_size =3D + priv->max_rx_buffer_size; } =20 /* Read and store ring size ranges given by device */ --=20 2.51.2.997.g839fc31de9-goog