Message ID | 20240119145600.3093-2-palmer@rivosinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-31297-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1065807dyb; Fri, 19 Jan 2024 07:03:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVAWm2JAfj9YitSlYpxSzVA1X2JEw0MTYYHgDCoSJf5p5Rx52aQdcNXmFaj7vG6V3mtFS3 X-Received: by 2002:a17:90b:2b4e:b0:28e:7059:efc8 with SMTP id rr14-20020a17090b2b4e00b0028e7059efc8mr2101133pjb.92.1705676639395; Fri, 19 Jan 2024 07:03:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705676639; cv=pass; d=google.com; s=arc-20160816; b=W3sNFgZvcuCaHJXoQzjCfXThpN6dH/ELbDby+h/7si3wf6y1xYblzEDqJmeF4TfzII yHTGlnzKBdlvgcIt6/asgsx/3iNv49/gwwVYNaytN9xq3c8XjnALXR6IevLnZT5xznsf IJ7AOi4aRKH4Krzi5mMR0S+6vxEtTlmy8H3jllJAGj2ApKTrOegSDqJ6+m5+Oield8fG 5ERGAQoVPrvqHH/WSPMcFsbwXe4wbrin5+6By6teR48WgsVcxQ9CbfVx9iV/NJnAVmcR h0M2SEMYYVCVUFI64dGDZ93ckYppkrRTACNHMz0dUapqONP1j1YS6lWYwLnT1woKkeTJ Ev7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:cc:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject :dkim-signature; bh=0OkN04rYJbcV5yI+1DylExB1sHf2862fFRZ4+hBrCQg=; fh=QRdHyUqYPLDNMf3mt9fi0OwEkMNFLuSNq+qrDZfZ4tk=; b=xvOhnpr7camxYSCNx13uqROftTiM5bm3HHJPBYuKlf/qe2Fd0Fkxj2s+A5dCSSj0Tq b1XUhywzRmnGwP2+Von2ST0VZlJXlofTzqgq4e5yh0FbT8JC7mEeqX58KkPw3sBEgqz1 KrbIlWBE3u5QqpnC3Y/PvzaOaKMbdCBjFjogl/6EeBCXqxLH4vzXOrh+PM8QYv4QcNAb wIpQenBwUotzqXbxtRlIz9VMjeepdJchXhkfXYjlwMPwB7CXZrfDu+gx7KwiVfQHTAER 7WdDozsSuW7euE0GtsLLuxpSQBbtI9N58ekN3ks7YDQwdiFXPxorSeOUj1Aj5zk3TYmu 75pw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=N937FwuA; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-31297-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31297-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k14-20020a170902c40e00b001d5efe34075si3562496plk.188.2024.01.19.07.03.59 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 07:03:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31297-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=N937FwuA; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-31297-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31297-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 266962823E6 for <ouuuleilei@gmail.com>; Fri, 19 Jan 2024 15:03:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 932A55473F; Fri, 19 Jan 2024 15:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="N937FwuA" Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B9BB1373 for <linux-kernel@vger.kernel.org>; Fri, 19 Jan 2024 15:03:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705676622; cv=none; b=KpM8RmHceG0h1bSEw6xXrrtUHWjcvuD/mkQWELO1G1T0EqszGUnqmfbMcBM2T9wXB659o10C4yhQFbxZzcYZLm6ZNEZHB8ZvYFfCP/wDoWYk/6uJUqhOsn+PSNl698TGfHf3AAkDJsDW3ExJ+XOKictPoloJh33UVCcECJVYTS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705676622; c=relaxed/simple; bh=WThewpXt/M7/HyWVe33yqIVrMcMdh8fZCrQsnJP/J0U=; h=Subject:Date:Message-ID:MIME-Version:Cc:From:To; b=UHK6O4ApAz6aah07O0hdT/lI3PUK76T/P2mbMfz2PHBnJfeK0cuHAfdYFDkIi1Y4bbcU1vN9kdyhzN41v6hLVILNUA4Fy1l1Yi2KKQ6pAeNuPUqNUgc5ITUyieB7pW4FAXaRVq9nwuj7hPZ1IQqGHBAsMytk8ndV93oswJIuGAw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=N937FwuA; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6d99980b2e0so895698b3a.2 for <linux-kernel@vger.kernel.org>; Fri, 19 Jan 2024 07:03:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1705676620; x=1706281420; darn=vger.kernel.org; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=0OkN04rYJbcV5yI+1DylExB1sHf2862fFRZ4+hBrCQg=; b=N937FwuAxKkX8EYhAlqq1ZBzryT6ydlbtB/20uNW4jbEKbcZjexmuJoTfHJZuvydw+ nxWQNKF/zx9Z/Mn84r17jM1A0U9/G9+CfyhhauJCUMu5kxPijFaUo4FJ6cIDrXxaTCRX 2VGiF2DliuahFMUVRTZzRZNizt20FD3T1xLqiabYjT/cykgsWjfXBfrfXj2k48GX78lR VtxcXP4V5ef90BjULFASiZcQMgzJeJdKJvm+GQlInTUI93FkUFlPCDHghwqAcVuNE5fW LL+3qi0cl0tuSqe2IBi5ZiaquC9bNdFUZHFvlOUf71hbQlczpYmabgmWi30noYVjYS6X oxNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705676620; x=1706281420; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0OkN04rYJbcV5yI+1DylExB1sHf2862fFRZ4+hBrCQg=; b=KM5omW8sx0AtsYqPFP1vnxB4MPHpvQjLtFM3lhgnNrQ3NxvH351M7HzuNnRZJ4pBc6 ta823t5hxnY8T2isYDAjbpTG3SOG1bPoaG1ipx6foNkvt/u/HyRw3cFj6wwcFw2lMB11 1QC8kQ53DZZjCpbEfpXCMkQARpWJ2XbwCdgLMuURo7F8PjVOJn7aV6BX32qBPj4BmB2v 9QfRbJe0zRY18XCHbsjn2ATKa2WQmbPYsdx4NLq30q4kNyE0BQidcSADj8npprfJbD8m NvBbcW2I6dr6fWXz0qeCiApTn4kcU9T0nXjMpX+4mtfz2jmr6YduEguYynSo8ZdcsJ0E 6U5g== X-Gm-Message-State: AOJu0YyhHLbA6lMGJft9Ow5mRGXe6HA5fGYyygkMXaEnJY+x1ZvgWByl dLPG4rwnf6vGwvJvtypd+rJVdsGh9kl4kPaML4X9M6RbuQeRgAOb8MSmEEXmWqE= X-Received: by 2002:a05:6a20:2d0f:b0:19a:3a07:1f2d with SMTP id g15-20020a056a202d0f00b0019a3a071f2dmr3458624pzl.44.1705676620338; Fri, 19 Jan 2024 07:03:40 -0800 (PST) Received: from localhost ([192.184.165.199]) by smtp.gmail.com with ESMTPSA id d7-20020aa78147000000b006dbc6a5daa5sm750913pfn.154.2024.01.19.07.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 07:03:39 -0800 (PST) Subject: [PATCH] lib: checksum: Fix build with CONFIG_NET=n Date: Fri, 19 Jan 2024 06:56:01 -0800 Message-ID: <20240119145600.3093-2-palmer@rivosinc.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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> From: Palmer Dabbelt <palmer@rivosinc.com> To: charlie@rivosinc.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788531587789542046 X-GMAIL-MSGID: 1788531587789542046 |
Series |
lib: checksum: Fix build with CONFIG_NET=n
|
|
Commit Message
Palmer Dabbelt
Jan. 19, 2024, 2:56 p.m. UTC
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(+)
Comments
On Fri, Jan 19, 2024 at 06:56:01AM -0800, Palmer Dabbelt wrote: > From: Palmer Dabbelt <palmer@rivosinc.com> > > The generic ipv6 checksums are only defined with CONFIG_NET=y, so gate > the test as well. Reviewed-By: Charlie Jenkins <charlie@rivosinc.com> > > 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 >
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[] = {