From nobody Mon Jun 24 07:27:57 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 4W701B2RJvz5NX08; Mon, 24 Jun 2024 07:27:58 +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 4W701B0b2Mz4TZp; Mon, 24 Jun 2024 07:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719214078; 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=mGP1ya+4ozqfcZ6Sv6f9YXdz78e/7VzD1aTd4vww6rw=; b=igocibPnruO/f7uzS764eWdHPI4xjJuiZ23nmUgHUnzq4s10OLRHpcOdUyQFtoyABbtsZ4 ln4MzBSNgjL/tTVCfS+4MHFXtydAcGfP+AlIFh5nOo8B3iibmc8DSj+EIQ+NmUvNAg7B2T jaVjvPlvKVPjEyE61IRW6/oqP4EwM4AbM5qu0tkyHlR6kasNh43qCad1EXhY602Y20MHWB cSjKxhfF696x3IkSTm01UNl0MOq7LaIBQzABLPYbtmtzZc0CCDCxsM2eX9ZB2ZdKtSKHTd bnMD58BiNsswbNZ8JUhy96PXqsXWAjq/HlVKiD1rgfLnAumINVih2aKAUPaSlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719214078; a=rsa-sha256; cv=none; b=eoj5TR0mQdFtGf82c09D2w4UTIfaH0xrU60Z7buuuSEJF0G5S+JMGrejyC2SG565ttgCzh xlNM9rvBQOhtOx2PCnTXpL4vXUuWtH6koYNJ39JPcBM1KlEYkHUnwO9GaMBZtiLzZmHoDp D6ULIHuPRaGbB4p0uLRSdwRGeGuQ8rBL6dYbvOPfSbozzKazYFZAeFuI8P+Dwn1jeRoETJ M6HNsa7h9Yz3KCDD1jT2n2f5ufzcJNJcuMIVcFxm/2Zw4IH+KnEMTIuVasdQmdUvwQy0Ue IMWxX8wIwtlZjrzc/BpaPOwlNGD++GLZg0hC+ziWqaPGaEUhB/FFAk+9GMY7Cg== 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=1719214078; 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=mGP1ya+4ozqfcZ6Sv6f9YXdz78e/7VzD1aTd4vww6rw=; b=Gd8PiqRuJh26OwCKbM/mthT1BAxCoCvZfIJnyagvfw4Ks5hVD3teJZ9ssT++4qDivsokci 7VOqFrC/yMrpEPn34TwBQa2yNmAgrwH6hkNcP05ZJmgu2w/KHRAU4YT9LbD8jbCXVZdL5L C458baitq4asLt9sT74d/zPbe8KrcK8H7bLSk4KJLXeiyfIikcnxGNY6ecTf0fNUbgs9FX wrgBhoMIgiWSHTDFikaRoHznwVgZ9hp/INckxOwSSqNWcgX29DkVjGxpkVfpybs65EyPCM v+iSrwYePbNuSdZMEqxDYiICl48rgE1Hi4s7I7ICDkkjWuo95nDQWH4jH2JZFw== 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 4W701B08Gtz18F2; Mon, 24 Jun 2024 07:27:58 +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 45O7RvRq044529; Mon, 24 Jun 2024 07:27:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45O7RvjR044526; Mon, 24 Jun 2024 07:27:57 GMT (envelope-from git) Date: Mon, 24 Jun 2024 07:27:57 GMT Message-Id: <202406240727.45O7RvjR044526@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: dc048255b37e - main - mlx5: use roundup_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: dc048255b37e1e36090bb42e5297f97dbcd31c5c Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=dc048255b37e1e36090bb42e5297f97dbcd31c5c commit dc048255b37e1e36090bb42e5297f97dbcd31c5c Author: Doug Moore AuthorDate: 2024-06-24 07:22:52 +0000 Commit: Doug Moore CommitDate: 2024-06-24 07:22:52 +0000 mlx5: use roundup_pow_of_two Use roundup_pow_of_two in place of an expression. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536 --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 4d9d1048448b..602a94345e50 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2331,7 +2331,7 @@ mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs) * Stride size is 16 * (n + 1), as the first segment is * control. */ - n = (1 << fls(howmany(r, MLX5E_MAX_RX_BYTES))) - 1; + n = roundup_pow_of_two(1 + howmany(r, MLX5E_MAX_RX_BYTES)) - 1; if (n > MLX5E_MAX_BUSDMA_RX_SEGS) return (-ENOMEM);