From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B4853563D7 for ; Wed, 11 Feb 2026 09:34:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770802459; cv=none; b=tBszjKGOFpiWowZXHmGy900yXiQ25V+TG3ERk8OE+WYgU+jCUkxsyhkhICTJ+t2IHWzpz8o9XXHVZZ15Q33erehOVW6AQgELNhaw+rsnmLT4oN+/xaD8JyZrWIg+SOx2SDBb+gitDzRsTWkXyZ61x6MBdkxHXqbuMElm6SHTLSM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770802459; c=relaxed/simple; bh=5m5YewVGrTKoAlUjWX5+VQrFf3zi2ZxKtV9x7JwW7nk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UfSefjVHRoNpYexryn2EZASTFolsV4fuL40aN/JRj5rZHel9mkHM0AopO8WrtBbpxeZe7bPz2q4QHoK2moXayz6aTkjS1QZkO5sGVX5RML2Ah2gc6zQ5oCAjxRkTPw6TM5w1pN1LJW4W7pKTJbgYjWiP8m9n4XYBqooKzy0obtg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SynnIBCg; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=CwhCW/tr; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SynnIBCg"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="CwhCW/tr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770802457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=THRpbx6Sr4LFBbLZno7YozYPuKMz6mvA+7rtPu9uuMY=; b=SynnIBCgWyRFlg6NEBzLCxt3dctzJJjYo3L8fuuMI2HmGatFq0YyLg/+ew9f8QykXVFlWB poi5eM5aTp8btHU23BQqcGr6S+zrgrsTxRw+XBcCiuA+LPVSpDuobxPXRxAUakblnRsF6F TSa/9FGtY05ttP8SkqkxIFdarzoSLZ4= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-107-qv5bszB6OEynDD45TPmVEQ-1; Wed, 11 Feb 2026 04:34:16 -0500 X-MC-Unique: qv5bszB6OEynDD45TPmVEQ-1 X-Mimecast-MFC-AGG-ID: qv5bszB6OEynDD45TPmVEQ_1770802455 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-43771113b3bso1318085f8f.0 for ; Wed, 11 Feb 2026 01:34:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1770802455; x=1771407255; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=THRpbx6Sr4LFBbLZno7YozYPuKMz6mvA+7rtPu9uuMY=; b=CwhCW/trmUy6Vf90Q/703mpcntlb/I2RmZfmPgI9TVc3mRouXeRJxxJIQo8lPbyt6F nyHdjSwYF9XSxWq31A9QKu1JUN7/qufLwTGKpGNm4SihxqtWkcjIoGaOqLCZOOlswlX2 gRmBo3u+gdPU4hnN1dKovWh726ey026g9GeJBnyCm2qcRpYxboF6s+S632qTmHkMrs3D m+DBnuIcX5Wp+0JYQgMHgJIJiT54errGt3EQta7Y8wccI0igOxSTxS6/hcYzt1ryYOBI kQX3M0mZSqEDlZ3HyfSfs5KbKWMPs0NxVgciY/WJXyHXbOfOQwR/goTs7AApOrAZ/qQ3 UZjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770802455; x=1771407255; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=THRpbx6Sr4LFBbLZno7YozYPuKMz6mvA+7rtPu9uuMY=; b=dzHAAbR5/4QkMt2mH7ThNnkgkxoa6cfNrdyJm83ENaFGxoJkfIzQHMe4BHAzrFu8qI Ouc9A5rsZWQzvwei8fsb+ElK8fHPyKFm9hXfPbCodR73kG/kfmIUbz/Up9qO1TOvycBo WcFCtZNb30fc8R6UJorX3QIH1yN2TtBPvElqYmshC52Z4itAU66Ag6mhRskuNTFFcyJA /M4EtKXb/N9N0oI9CeXMH+g5pa4WEhvrz4aK2aMhO0G34wLC/4UsAE+tXDV8TQ925PZW h8+d4B8dh9GoWLEN3oQyzuKOmY+QfVL8oZ9mKFlTBfKqGzGIkeaenAZivZom2J0dYIbg T1cA== X-Forwarded-Encrypted: i=1; AJvYcCXEHu8FkU3CB6WIRtp2IyMyGPa7R0W+jn/1Uu/qY0MZ90GDhbQ6JxWiuvbLjPXOXqt33Yd/a5wZyHed5MQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yw/jF0EodgXU/VafDBZOQ/RsiwedWCDQsbtta4h4ID+mhozPu/v 9q44FhqqHabwdG4mCSXFOf+8Lr5IAwA27IX7w0y7TFAB4aYN++0xdSILTbIR1NyWWRYn7QvLPze EiUVhV+vR5q8rkvztNYl5TUDkXRM2Z2xfrE9iRTux5WRLVYWmCIClATbIKbf01dvTEQ== X-Gm-Gg: AZuq6aJV9FQ9TF7worFX2n0iUG9ooHlsshxffVDJdNluGgpQ70xaIo9OGSgmwBBq+g8 /5ecrZ5uOOj5gOECDm7Kq0xQzwe/Jupl1uaWux6+qR3iygc7W9vuKEH+M6di38/Bnw9PPWQoBUc pn62hPJ9wB06hzlIVoIm/+hI8836dFylbCRLVa8lVx/lAfAJundJAsibJSSSApeZrAV7BCwrUpt unCdrXb9QImzuxeT02BHJNvZXVnn+v57bcpUaERL+ahEiEVMqgKILgCIqZpiP9SxYsIqD19Qk42 dNQNtle6eASwyYzDDgsdve73prF5a6kyByx+O9GZbK5J3tSZPrjnYMmsPg8rjw9gZZqyGtxPyJa vsWnA77lmww43bfX4pLS1MD1xAQ== X-Received: by 2002:a05:6000:2012:b0:430:fb6d:1442 with SMTP id ffacd0b85a97d-43629386018mr30005978f8f.62.1770802455004; Wed, 11 Feb 2026 01:34:15 -0800 (PST) X-Received: by 2002:a05:6000:2012:b0:430:fb6d:1442 with SMTP id ffacd0b85a97d-43629386018mr30005931f8f.62.1770802454488; Wed, 11 Feb 2026 01:34:14 -0800 (PST) Received: from [192.168.88.32] ([212.105.155.220]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43783e544e2sm3795611f8f.32.2026.02.11.01.34.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Feb 2026 01:34:13 -0800 (PST) Message-ID: <53ae4a20-aadc-434a-b056-65b306e64278@redhat.com> Date: Wed, 11 Feb 2026 10:34:12 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 1/2] gve: Update QPL page registration logic To: Joshua Washington , netdev@vger.kernel.org Cc: Harshitha Ramamurthy , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Willem de Bruijn , Praveen Kaligineedi , Ziwei Xiao , John Fraker , Matt Olson , Bailey Forrest , Tim Hostetler , Jordan Rhee , linux-kernel@vger.kernel.org, Max Yuan References: <20260207011734.437205-1-joshwash@google.com> <20260207011734.437205-2-joshwash@google.com> Content-Language: en-US From: Paolo Abeni In-Reply-To: <20260207011734.437205-2-joshwash@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/7/26 2:17 AM, Joshua Washington wrote: > +void gve_update_num_qpl_pages(struct gve_priv *priv, > + struct gve_rx_alloc_rings_cfg *rx_alloc_cfg, > + struct gve_tx_alloc_rings_cfg *tx_alloc_cfg) > +{ > + u64 ideal_tx_pages, ideal_rx_pages; > + u16 tx_num_queues, rx_num_queues; > + u64 max_pages, tx_pages; > + > + if (priv->queue_format == GVE_GQI_QPL_FORMAT) { > + rx_alloc_cfg->pages_per_qpl = rx_alloc_cfg->ring_size; > + } else if (priv->queue_format == GVE_DQO_QPL_FORMAT) { > + /* > + * We want 2 pages per RX descriptor and half a page per TX > + * descriptor, which means the fraction ideal_tx_pages / > + * (ideal_tx_pages + ideal_rx_pages) of the pages we allocate > + * should be for TX. Shrink proportionally as necessary to avoid > + * allocating more than max_registered_pages total pages. > + */ > + tx_num_queues = tx_alloc_cfg->qcfg->num_queues; > + rx_num_queues = rx_alloc_cfg->qcfg_rx->num_queues; > + > + ideal_tx_pages = tx_alloc_cfg->ring_size * tx_num_queues / 2; > + ideal_rx_pages = rx_alloc_cfg->ring_size * rx_num_queues * 2; > + max_pages = min(priv->max_registered_pages, > + ideal_tx_pages + ideal_rx_pages); > + > + tx_pages = (max_pages * ideal_tx_pages) / > + (ideal_tx_pages + ideal_rx_pages); > + tx_alloc_cfg->pages_per_qpl = tx_pages / tx_num_queues; > + rx_alloc_cfg->pages_per_qpl = (max_pages - tx_pages) / > + rx_num_queues; Does not build on 32 bits systems: RROR: modpost: "__udivdi3" [drivers/net/ethernet/google/gve/gve.ko] undefined! make[3]: *** [../scripts/Makefile.modpost:147: Module.symvers] Error 1 make[2]: *** [/srv/nipa-poller/net-next/wt-1/Makefile:2005: modpost] Error 2 make[1]: *** [/srv/nipa-poller/net-next/wt-1/Makefile:248: __sub-make] Error 2 make: *** [Makefile:248: __sub-make] Error 2 AFAICS because above 'rx_num_queues' is implicitly promoted to u64, and the statement yield a 64 bits division. You need to use a div64* variant here (and possibly somewhere else, too). /P