From: Palmer Dabbelt <palmer@rivosinc.com>
To: charlie@rivosinc.com
Cc: Palmer Dabbelt <palmer@rivosinc.com>,
davem@davemloft.net, goldstein.w.n@gmail.com,
dave.hansen@linux.intel.com, christophe.leroy@csgroup.eu,
nathan@kernel.org, ndesaulniers@google.com, lrh2000@pku.edu.cn,
Arnd Bergmann <arnd@arndb.de>,
masahiroy@kernel.org, linux-kernel@vger.kernel.org,
kernel test robot <lkp@intel.com>
Subject: [PATCH] lib: checksum: Fix build with CONFIG_NET=n
Date: Fri, 19 Jan 2024 06:56:01 -0800 [thread overview]
Message-ID: <20240119145600.3093-2-palmer@rivosinc.com> (raw)
From: Palmer Dabbelt <palmer@rivosinc.com>
The generic ipv6 checksums are only defined with CONFIG_NET=y, so gate
the test as well.
Fixes: 6f4c45cbcb00 ("kunit: Add tests for csum_ipv6_magic and ip_fast_csum")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401192143.jLdjbIy3-lkp@intel.com/
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
That Fixes tag is against a PR I just sent up to Linus [1], sorry for
missing this but it came in right when I was sending out the PR.
1: https://lore.kernel.org/linux-riscv/mhng-690cf774-fd28-4d25-be9f-69e19fb84d5c@palmer-ri-x1c9/T/#u
---
lib/checksum_kunit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/checksum_kunit.c b/lib/checksum_kunit.c
index af3e5ca4e170..225bb7701460 100644
--- a/lib/checksum_kunit.c
+++ b/lib/checksum_kunit.c
@@ -593,6 +593,7 @@ static void test_ip_fast_csum(struct kunit *test)
static void test_csum_ipv6_magic(struct kunit *test)
{
+#if defined(CONFIG_NET)
const struct in6_addr *saddr;
const struct in6_addr *daddr;
unsigned int len;
@@ -616,6 +617,7 @@ static void test_csum_ipv6_magic(struct kunit *test)
CHECK_EQ(expected_csum_ipv6_magic[i],
csum_ipv6_magic(saddr, daddr, len, proto, csum));
}
+#endif /* !CONFIG_NET */
}
static struct kunit_case __refdata checksum_test_cases[] = {
--
2.43.0
next reply other threads:[~2024-01-19 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 14:56 Palmer Dabbelt [this message]
2024-01-19 15:26 ` Charlie Jenkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240119145600.3093-2-palmer@rivosinc.com \
--to=palmer@rivosinc.com \
--cc=arnd@arndb.de \
--cc=charlie@rivosinc.com \
--cc=christophe.leroy@csgroup.eu \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=goldstein.w.n@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lrh2000@pku.edu.cn \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®