From nobody Fri Aug 25 07:17:53 2023 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 4RXB9t02vqz4qyHZ; Fri, 25 Aug 2023 07:17: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 4RXB9s6ZG0z3WbK; Fri, 25 Aug 2023 07:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692947873; 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=CKHqi5wPZ5hA+w0PCyUUoFuz+hAn5hCwEFelGDl60Qc=; b=RU6eelppfx0YlRUNFUoG7ecXgwQWrALF2F1mgXpKkfuMw2s6rzdXKkEiCsxfhaXWnx6KhZ COqqXN7rrzLUaePvfXg4oSw5ViaJ17fTRS8cIKzZpr5F/RlW7I2Mfj0zVb+6Dm4GOu2XE4 hiu8LG/5rauSJtKMhxrAhQK0tbaIybT5PjyTOHN39gJfAxfX2hxt+WEFA7/e+CxW6vgxSe aYq1fM+EEHskrEgaqi/uAcdXZ5YCusRKKPz1QK9fwmL+pLQRJmR/60DqTvqS74sna+DcGC HPoDBjweHg4Q0PRTVwMK30XNE6piwk17YjdYn9GuYmK2vVKF/xl4RqPK/2pwFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692947873; 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=CKHqi5wPZ5hA+w0PCyUUoFuz+hAn5hCwEFelGDl60Qc=; b=XwJfzmaw2wM8pgCyEOo0ZAbWHByYpabJGf/zR3ELJt65RQ+yM1NR8I7KBagtWZ9kWzFx0d aXBVhLLFE1Xp8htBEQ6oswdICWdCvJrs5mO7zForh2WKnrhHyfqcVtGHWsKlQ9vZobWjE8 qiVZvualC52nlUfO5Ph1ZVQ8XpGaJZ+7r0wRsJLo5ix5xZIzenvSgKcXwaX9fzaG9Geepl rjIEja7Rr2P7QFtvRZtSjnZIhkalJ/MlCCR/ehAs3JcxqYptLCdwUlfJp/8mkIcjrp5cUj I6N4c//ToXFVKWybO1wQG4sFQ7HaYM02DfmXETHILnRg8MgqC5M1iswhhSSIXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692947873; a=rsa-sha256; cv=none; b=Zi8LgzL+K8kOVltCun3L0IqLLYfFTsP0HViahmS7QBlhlZrvITzybnhg06DFPtD6223diV Js/dzmtOx5/FBMANY8iampryG+QHqlTcwew2+2e4rlcfsepKVZa0HSLUfZTe23f9C2Tsfx gtpZMfjYWEKfCgFw8ADMajubaezkUG1b+kXwhyVady9WP8KFFI6+Jzmk0z7svok8kaOkMM 3kYjoE1w2PtaGoqoxEt3eQ7NlnFXUAslCZsmtYeLs1Z+ueNFst4X80YtQfrbTcbwSjo/th WmNvRd4QtJJOB9VPNjJxRaEkdZpmzIy5B60MieW6qumourPRKQ2Gc/W4/9e7Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RXB9s5MYHzyvY; Fri, 25 Aug 2023 07:17:53 +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 37P7Hram074542; Fri, 25 Aug 2023 07:17:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37P7Hrjh074539; Fri, 25 Aug 2023 07:17:53 GMT (envelope-from git) Date: Fri, 25 Aug 2023 07:17:53 GMT Message-Id: <202308250717.37P7Hrjh074539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 42d73e9ec146 - stable/13 - ixgbe: define IXGBE_LE32_TO_CPUS 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 42d73e9ec1464a4ebc26d32201def571550e9ba9 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=42d73e9ec1464a4ebc26d32201def571550e9ba9 commit 42d73e9ec1464a4ebc26d32201def571550e9ba9 Author: Kevin Bowling AuthorDate: 2023-08-14 01:47:09 +0000 Commit: Kevin Bowling CommitDate: 2023-08-25 07:17:23 +0000 ixgbe: define IXGBE_LE32_TO_CPUS Richard Lowe notes in PR 170267 IXGBE_LE32_TO_CPUS was previously directly defined as le32dec() which is a pure function but the shared code is expecting an in place conversion. In SVN r282289 its assignment was removed altogether. There was some deliberation in the PR on what to define this as, we just need to do the update in place which is easy enough. The uintptr_t casts in the shared code were from a DPDK sync and are unwanted with our new ixgbe_osdep.h implementation. PR: 170267 Reported by: Richard Lowe (cherry picked from commit bef7d49101cdf28830a648f63ff00998fbe54715) --- sys/dev/ixgbe/ixgbe_common.c | 4 ++-- sys/dev/ixgbe/ixgbe_osdep.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 91c12eadd1e3..6c1396ad964f 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -4640,7 +4640,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer, /* first pull in the header so we know the buffer length */ for (bi = 0; bi < dword_len; bi++) { buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi); - IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]); + IXGBE_LE32_TO_CPUS(&buffer[bi]); } /* @@ -4676,7 +4676,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer, /* Pull in the rest of the buffer (bi is where we left off) */ for (; bi <= dword_len; bi++) { buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi); - IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]); + IXGBE_LE32_TO_CPUS(&buffer[bi]); } rel_out: diff --git a/sys/dev/ixgbe/ixgbe_osdep.h b/sys/dev/ixgbe/ixgbe_osdep.h index 92942cbab103..7aabfea66484 100644 --- a/sys/dev/ixgbe/ixgbe_osdep.h +++ b/sys/dev/ixgbe/ixgbe_osdep.h @@ -134,7 +134,7 @@ enum { #define IXGBE_CPU_TO_LE16 htole16 #define IXGBE_CPU_TO_LE32 htole32 #define IXGBE_LE32_TO_CPU le32toh -#define IXGBE_LE32_TO_CPUS(x) +#define IXGBE_LE32_TO_CPUS(x) *(x) = le32dec(x) #define IXGBE_CPU_TO_BE16 htobe16 #define IXGBE_CPU_TO_BE32 htobe32 #define IXGBE_BE32_TO_CPU be32toh