From nobody Mon Aug 14 01:55:51 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 4RPHYN0LBzz4TmS5; Mon, 14 Aug 2023 01:55:52 +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 4RPHYM6QXzz4nRX; Mon, 14 Aug 2023 01:55:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691978151; 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=D7gfLOju1g4djnICi6fA/jXTh6uBGDijK5E95Tolq48=; b=os7ZZwhojy40IRCM3MyI0URJWs1qOb5JWt5NhLNKZSGH/d1zJMwC2kUwBMi/1arbYnCs8q XetgSM845TiAPI5d/habSBgazoqKRFUptp7ruxEkYPxlMd2d8xx8TfBifgAagh+/xG5Jsv ibEfvIb+MU3Kb5rhsE2wzrkknT41UgMkKgEFytOKCQMZkx88Nqqqipsx/h5apIYC2MnV1P tEmJ2KAnrT2XCCb35QQga/wDNvPnTAjZizpTv5koxUvaGt2C8tuQp4w36bZ/zBrdCPqR1A b9lQIIeJarCHFIt+hAno2zbdSNws4U7DPD0l06MVqtgTf7v2htg0OERKvcAY+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691978151; 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=D7gfLOju1g4djnICi6fA/jXTh6uBGDijK5E95Tolq48=; b=G65h8hBWBRpr8d0QeCtrvH4RQGknrmkXguXKIvX6VD/QoJ0eD0Gu/2dyFC4Tv6xPYaiIv1 NsQLgUf7x6qlEVa4Shw+/FO0/1gNFQbx3fOWJTqsc+uUVOFI4JxC9UxvKGUW/5aZeYkNhK c1sKpXHOsQ6aEBj5f5SpH/zuvOFTMTSUkX4Yq0rmjOdxtWbiMko4i9mhtK7zck/ZWjPpcK k2APleUhROjQSpSfTpjqMYSrIQ7K5bQaEoim0jNc7DPMGCZZ1KAhtQi9nZvdNf13wEN9Z5 82eYRSK7AEchI6NaEBviR5n5vuCufYMT/jo5WHsPw9VKFR2dsAVl7/eRgI5pUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691978151; a=rsa-sha256; cv=none; b=rItL88wTC6Z+JNQG8Lrd4xqEcW+AeX0w/zXQMIkWWdhGgS/JET5zsf9B9MNa+Nzd8jbhf8 P4SwVP0BWEFE/tZvFCkbEsEmIayGrDcgJeT0e33FaQYNS4+ulbyKiuAu8x026+4xpd1GAm xKCsz8hr8yeiLLLtJ6fPA8vYxY5CYZ92H2Zcnl6Yd2MuNHFblIcwKBnRUXo47BtX4kXqZo 3DlFSt5QGkbE3oRkyKkbtmWVlRbVVH3Iw7UHuYyVo8btXYP7A+QjnrOJfG+4zQRHxbOgpK SrxbbnoISAHsJkZ9/1dOGkOecWEyJArzTdLnpnDyMN6qn44PQFGFQ6MtpmCj7A== 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 4RPHYM5NMCz1PHg; Mon, 14 Aug 2023 01:55:51 +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 37E1tpuI062948; Mon, 14 Aug 2023 01:55:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37E1tpQF062945; Mon, 14 Aug 2023 01:55:51 GMT (envelope-from git) Date: Mon, 14 Aug 2023 01:55:51 GMT Message-Id: <202308140155.37E1tpQF062945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: bef7d49101cd - main - 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/main X-Git-Reftype: branch X-Git-Commit: bef7d49101cdf28830a648f63ff00998fbe54715 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=bef7d49101cdf28830a648f63ff00998fbe54715 commit bef7d49101cdf28830a648f63ff00998fbe54715 Author: Kevin Bowling AuthorDate: 2023-08-14 01:47:09 +0000 Commit: Kevin Bowling CommitDate: 2023-08-14 01:55:39 +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 MFC after: 1 week --- 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 9c13b1b2663d..923879acae4b 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -4641,7 +4641,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]); } /* @@ -4677,7 +4677,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 5e211e6283e3..48210e448c68 100644 --- a/sys/dev/ixgbe/ixgbe_osdep.h +++ b/sys/dev/ixgbe/ixgbe_osdep.h @@ -135,7 +135,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