From nobody Mon Jun 24 07:27:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W70166mnBz5NX00; Mon, 24 Jun 2024 07:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W70164nxtz4TNk; Mon, 24 Jun 2024 07:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFsOHBqEp9q5Py/kJfmaPBhjdbLPi2lLFxSs0/P/FBU=; b=C1DQ4zT8oXs1l4KrJAJ2r4w+Z2PbiBbYopWGGs4Kzc5fx62zKReNriQWBL6LxH9iHwCARt jILkKZfTZwDXd+hirU3pYncu4D8WkQKXf85M3az3cPsxi3MS5B14qS1f65ce/j/MF5mUXS /qGkdr3+zrDOC75xeaY07wdIF403C2co5ZqRu1lU9Pe8Tv7hXhOkdTUGbsY7InVDapW1f5 5rK8dJyHJKFzSmzEVxdHyxJF2cjtaRHJBmaeQkbqGVkimqcVKgNrLHODDEmuO+4iZUuYlk QNb4M4J7PiyoIYB9nIHsATyw2eThEi0htN5QcpeD4rFZgDo2QwrR5N7xL/+Q1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214074; a=rsa-sha256; cv=none; b=Iw95oUpD9WEiTGAvngCb25dyXLYkYuZWSNBz5W4MmYEFseRvvkim4b+Z0N6/kg83Ir2a0v cWv16JK+BPaGtKl9GrN+5uNlsl9aKvzNaQaX/BRFpivIME22LRVhLIoli1fgecCeUwTdOr TEhPj0NUZDVV5jClfO7DpWQ334fI16lAeXDFvbYPV2IsT53/SxRgt3DQfkQnSt54Qk+I5v gCog+ohCo9+CJ8fVzS0ZJ4AuBoCFquj2hYZuKu+huQznCtjc9PrhdCXV2+Ykqs688lx1Ym oIBIsoKuYohTJujYLs4Iha+vrWDdGLnyBUtOe4sEfCaLJ2vYODszgrk7hyHpHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFsOHBqEp9q5Py/kJfmaPBhjdbLPi2lLFxSs0/P/FBU=; b=qT55BBCntVnAxPP7cOin0rcDPsRuwFyg9nBjVlkO1/vquibsWXiKnZQMW0oGBU7AToVfka I5L84WAel5CrHuydDulKFkXAl7ldwzVKJHU5mNpqqUwgkhJl5R3t6kRqb+iG6QMHQXlJ7i MSifi2ORp/iQn4HFetum6faS2EQ16BkUJpHZGgvCNgA+tuA6nQUeW/i6ygtA/uhpRGY/RO zlHoZd7nQ/dV8CJ1RjwSRaNUuND0gRwzM78bZNqQww23M/OaWKmVboKFq4MzTIaC0cnh9k TvIZ4DsUV5GtV1EhqrLG8qwsRLk2I3Ys3I+isp4ODWbUge2B2pcjuObl9HRtig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W70164NHkz18Rj; Mon, 24 Jun 2024 07:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45O7Rsrx044415; Mon, 24 Jun 2024 07:27:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7Rsq6044412; Mon, 24 Jun 2024 07:27:54 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:27:54 GMT Message-Id: <202406240727.45O7Rsq6044412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 7bb73f731538 - main - cxgb: use rounddown_pow_of_two List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bb73f7315380f7315505176d3855884c11ae490 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=7bb73f7315380f7315505176d3855884c11ae490 commit 7bb73f7315380f7315505176d3855884c11ae490 Author: Doug Moore AuthorDate: 2024-06-24 07:17:02 +0000 Commit: Doug Moore CommitDate: 2024-06-24 07:17:02 +0000 cxgb: use rounddown_pow_of_two In two places, use the rounddown_pow_of_two macro in place of expressions. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/dev/cxgb/cxgb_sge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index 0c5be9dd6614..a2b3918032bb 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -553,7 +553,7 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) nqsets *= adap->params.nports; fl_q_size = min(nmbclusters/(3*nqsets), FL_Q_SIZE); - fl_q_size = 1 << ilog2(fl_q_size); + fl_q_size = rounddown_pow_of_two(fl_q_size); use_16k = cxgb_use_16k_clusters != -1 ? cxgb_use_16k_clusters : is_offload(adap); @@ -565,7 +565,7 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) jumbo_q_size = min(nmbjumbo9/(3*nqsets), JUMBO_Q_SIZE); jumbo_buf_size = MJUM9BYTES; } - jumbo_q_size = 1 << ilog2(jumbo_q_size); + jumbo_q_size = rounddown_pow_of_two(jumbo_q_size); if (fl_q_size < (FL_Q_SIZE / 4) || jumbo_q_size < (JUMBO_Q_SIZE / 2)) device_printf(adap->dev,