Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp924471rdb; Thu, 15 Feb 2024 22:43:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXXNVPOID/4AJXcXhxQ9XIpItmQsWsEay2bxfDsH0P/Rl8QwGh6jrki67yrx4K6COHVIOuVf2EOksmRdM9UkzCoKbyQHSar3jrc3Kf3/A== X-Google-Smtp-Source: AGHT+IF2wV9Fa/u8okqvvenFsFxucw3NBtx4OLKaqqBTJK0xx+pvnEOXBuXc36BVHDwibIN4D35r X-Received: by 2002:a17:90b:3891:b0:299:393f:3aae with SMTP id mu17-20020a17090b389100b00299393f3aaemr360267pjb.6.1708065781596; Thu, 15 Feb 2024 22:43:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708065781; cv=pass; d=google.com; s=arc-20160816; b=QjUCEeglSeC2Emn28JYJ564AO1WmLliuBTb03kPS8/rwvD6JPSg+5mk4cnRbS+iiv1 w7ysgZ2eBu8sXlQ3+lSIQlVUSXStlLFEd5wBFpPzUjeu9596zCMbEd34Ni7gt2Bl9Gon 0sOPyGIT4dc47GwxiBR1K9nsyIQhWLjmrJMm7fSlPy570XVEJC7qmJZPwWqJt6pWSBrV WJ465T9st/S3yj0KSUnVy/c/Su8uNOFfyMhaYHfZGgUI+Z+1cbd0R4PiODuk0ZANErfN Fz4j4hSWrONHDmEhmcoTwtilsONJ3VI65zgQ9K0eQWQb1EdQvzre3UU96X5Mla68koyJ lK2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=AuYrQEUxaWp83s4Mb61GXDbcKhTkhuCAX6zAykBaaIo=; fh=6FfgN9zwmHoHJKaQ/pJzmL/kvuqdGzWik98soM2r1RI=; b=fwptssoAy1b4NQXCaF4kkHPCWizGNZ/rcbqLkF85yYSCakzzxqoUpHbt9KrwhTdTpp RPcK06/QUrfOKPKys21MV2jcTpgeQVQuuoCidvtJZfFt4vVnGtOM7e7f1dUCXM3/KCbz u0gBPTeHywlB+4AUe7hcmfoEobFO3+vv6oMxQOn5Et/I42sSJg4ifSO+p0LelIvbgJiE BH3131GBYbaLpb2705R4LYSkurYsBMYdSz7BJdxZVUkqcjtcf69FEl9w7G8Wwlg9dxTV 5+ilnTyIKE3JOLttyvQEL+31oVXHYm8BeQg+vOn8rsBIxpXz1cauaX7x1SxLVQUPEcVv Jkbg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=FVYsROmv; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-68110-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68110-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t17-20020a17090aba9100b00298988142e2si4393421pjr.84.2024.02.15.22.43.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 22:43:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68110-linux.lists.archive=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=@gmx.de header.s=s31663417 header.b=FVYsROmv; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-68110-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68110-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de 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 4515628656B for ; Fri, 16 Feb 2024 06:43:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7236114292; Fri, 16 Feb 2024 06:42:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=deller@gmx.de header.b="FVYsROmv" Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFD2313FF9; Fri, 16 Feb 2024 06:42:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708065772; cv=none; b=itdwxkWPPkVUt508/vFYHpqROfp5+RKGwDmyHJdQEO+rGca6cz9W03Hg12g7MonnJY0HulOWijqlqkkGJwTyKYetHkhpCzPT+ry+WWXdVsOnS12XGKKMBRw7Y5EolRI06eklt+nNJKFJRQ3A7vz7OZf4GCD4Ygk0bsQWpZOVdyQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708065772; c=relaxed/simple; bh=+ppAndhy56yHpAB08Sissrk+DRqOIFueYsJJQrGan+4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jqnwHRjCMag7OJFb7kM11nNV7F71TW4gEMHzGkNFxr+E8519cHrfVn7tVRrIHUwo9IzqKJwijWu5Ed6clgrVLgVat0mH7KUjMmLOFxtzSVvZqsuWSvEUvRF5RsKl2KTFonXEIFzg43zmjt1Bc+XylJCNI+t71FA+IW2DI8V0nVY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=deller@gmx.de header.b=FVYsROmv; arc=none smtp.client-ip=212.227.17.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1708065749; x=1708670549; i=deller@gmx.de; bh=+ppAndhy56yHpAB08Sissrk+DRqOIFueYsJJQrGan+4=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=FVYsROmv0Mk2RKVnNhrqNIgzV2nLCammBvybq31nRfh5RyHD5EFTeRLXxVt4dppy qzqDbtEU24HQYDvMg+cruG7gV1TTVa7yGpLRpjTYRQWXPBtBzRQA2VQCyKByxdXFV EOeLYU6h3X3bd1TPSvLOK6G0UF5KOL2EWp51afvucZ88PMG6NIyu36qu1vvlRFRuT 2kzjVM5N5A6bAI8ULqPS3B0StYqgIU+CnCAlaqLQOVC70DqhUaqLFlMMV1Ua9kXE3 p20+Q17p4Ka1kingh9uOFBv1GfJC2YvVZkZmtSmBulV4lfJz48y7SBN2E1fGl2MKT mD73uR95UNPduej2Cg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.20.55] ([94.134.148.214]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N1Obb-1qq5mA1fUB-012ozJ; Fri, 16 Feb 2024 07:42:29 +0100 Message-ID: <7b207808-10e7-44b0-9a9f-253e2349011d@gmx.de> Date: Fri, 16 Feb 2024 08:31:22 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 2/2] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests Content-Language: en-US To: Guenter Roeck Cc: Charlie Jenkins , David Laight , Palmer Dabbelt , Andrew Morton , Parisc List , Al Viro , linux-kernel@vger.kernel.org References: <20240214-fix_sparse_errors_checksum_tests-v8-0-36b60e673593@rivosinc.com> <20240214-fix_sparse_errors_checksum_tests-v8-2-36b60e673593@rivosinc.com> <2ec91b11-23c7-4beb-8cef-c68367c8f029@roeck-us.net> <25f108d1-827f-4a18-bee4-4105fbd45974@gmx.de> From: Helge Deller Autocrypt: addr=deller@gmx.de; keydata= xsFNBF3Ia3MBEAD3nmWzMgQByYAWnb9cNqspnkb2GLVKzhoH2QD4eRpyDLA/3smlClbeKkWT HLnjgkbPFDmcmCz5V0Wv1mKYRClAHPCIBIJgyICqqUZo2qGmKstUx3pFAiztlXBANpRECgwJ r+8w6mkccOM9GhoPU0vMaD/UVJcJQzvrxVHO8EHS36aUkjKd6cOpdVbCt3qx8cEhCmaFEO6u CL+k5AZQoABbFQEBocZE1/lSYzaHkcHrjn4cQjc3CffXnUVYwlo8EYOtAHgMDC39s9a7S90L 69l6G73lYBD/Br5lnDPlG6dKfGFZZpQ1h8/x+Qz366Ojfq9MuuRJg7ZQpe6foiOtqwKym/zV dVvSdOOc5sHSpfwu5+BVAAyBd6hw4NddlAQUjHSRs3zJ9OfrEx2d3mIfXZ7+pMhZ7qX0Axlq Lq+B5cfLpzkPAgKn11tfXFxP+hcPHIts0bnDz4EEp+HraW+oRCH2m57Y9zhcJTOJaLw4YpTY GRUlF076vZ2Hz/xMEvIJddRGId7UXZgH9a32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28+VyEDNcGL3tarnkw8ngEhAbnvMJ2RTx8vGh7PssKaGzAUmNNZiG MB4mPKqvDZ02j1wp7vthQcOEg08z1+XHXb8ZZKST7yTVa5P89JymGE8CBGdQaAXnqYK3/yWf FwRDcGV6nxanxZGKEkSHHOm8jHwvQWvPP73pvuPBEPtKGLzbgd7OOcGZWtq2hNC6cRtsRdDx 4TAGMCz4j238m+2mdbdhRh3iBnWT5yPFfnv/2IjFAk+sdix1Mrr+LIDF++kiekeq0yUpDdc4 ExBy2xf6dd+tuFFBp3/VDN4U0UfG4QJ2fg19zE5Z8dS4jGIbLg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:qpXBod9bXxS2T8jn9XN6dbwuj5M+rRQo/Ok/2qBy1QSdbTwhlsZ Uz8ROPCQIByE4gloE6TKAtrU4bPf9A9hsMUe2j0vKSZMLjOqiz2PxlTVJiF/f+xTh5IHstx lTpWlA2tSf6m/btenXKImyHSnMIWMJqYRgh1buKqD8pZt4rufNm4CWoKvKjPnW+R5hXF1Ds MZSoOZ/GPduU0XtVDkOqw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:SqHXkZsnsPA=;2CY5VvjB4RPL+Gwuy7KiKeraDUy 8Uvs8XioprXTdnmhU9QqOXYhQFj5cnZKd2z10yZ+f0IK3001/0hRMZeLOSEnP0DbipJ4eJZZc jQI0tEt/3VzcvYkF0lH8s+9FPwEVIVsiRZJniX4Stn4wAiYYuhjWvQftskJr0rSODe0az4swi GwANnm4F9gilCUyM+VmZv0tyt3X8ap4aUWBf++ApJYYYSo3557Fph1ezr/tvxYa+t7laeTcIg Rt5kOtRYunjTkKPjle69Aa5uPXBblq53WYizxmRRnAPJwzLndu+x0J1ZyVmDsg2iu6eg9yj3x Qhj+tV2rbOe7y/qCDksV4Z7tjcYvRNpLEV4Lkh8KsdLC4kaRfudYcrsbbjm0BDgFrs0IvOLLM Ya/qaYQQB7ZVq95E1O4XFFu7G++2PtbFG0Ja1U2aCBub2qk0nPJ8V+8mLhniECHTugTFu2d2W 6xPnubS/xUBqfHF09zqTOOuXYgoLSxZPtjxlUnZKhqfMvMO/OqoxJDfC97pzWyG/ZWXADv898 XTOCZwWJ2kZee7pQRVBfiF4jZT+eY32NRMsZtDgHWtrd76CSmwoj4z2WCthcWxjgxVFy2DZdZ Qnc9KkC7V657Vsev2LiZixXoS3kYExkqC9uGfkkZ8SH5MYZOGfRJupRWttGdmPtwXCI/KJ2Tr /gp4uJJAcdXHdfMRaZO/Vr8wyEihNK2kY06oeBzuARyfioz1Uzv0CPb4DQrz9SZRU0qquehiP WFMTojctz/ABwo1kOfIiOJvbBoOkVEIwo49rEulcuPDaY7tu3XBdQWtydwkBHQI6tyu7g2tSL aNyfyVJfJY59StyXAPUbN1UeNLIGNZuM0gIp68Cpf7VWg= On 2/16/24 06:25, Guenter Roeck wrote: > On Fri, Feb 16, 2024 at 06:54:55AM +0100, Helge Deller wrote: >> >> Can you please give a pointer to this test code? >> I'm happy to try it on real hardware. >> > See below. Testcase runs OK on physical machine: #### carry64 aligned, expect 1 -> 1 #### carry64 unaligned 4, expect 1 -> 1 #### carry64 unaligned 2, expect 1 -> 1 #### carry32 aligned, expect 1 -> 1 #### carry64 unaligned, expect 1 -> 1 #### carry64 aligned, expect 0 -> 0 #### carry64 unaligned 4, expect 0 -> 0 #### carry64 unaligned 2, expect 0 -> 0 #### carry32 aligned, expect 0 -> 0 #### carry32 unaligned, expect 0 -> 0 ok 6 test_bad_carry Helge > --- > From 0478f35f02224994e1d81e614b66219ab7539f7f Mon Sep 17 00:00:00 2001 > From: Guenter Roeck > Date: Wed, 14 Feb 2024 11:25:18 -0800 > Subject: [PATCH] carry tests > > Signed-off-by: Guenter Roeck > --- > lib/checksum_kunit.c | 76 ++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 76 insertions(+) > > diff --git a/lib/checksum_kunit.c b/lib/checksum_kunit.c > index 72c313ba4c78..8f7925396e53 100644 > --- a/lib/checksum_kunit.c > +++ b/lib/checksum_kunit.c > @@ -546,12 +546,88 @@ static void test_csum_ipv6_magic(struct kunit *tes= t) > #endif /* !CONFIG_NET */ > } > > +#ifdef CONFIG_64BIT > + > +static __inline__ int get_carry64(void *addr) > +{ > + int carry =3D 0; > + unsigned long sum =3D 0xffffffff; > + unsigned long tmp; > + > + __asm__ __volatile__ ( > +" add %0, %0, %0\n" /* clear carry */ > +" ldd 0(%2), %3\n" /* load from memory */ > +" add %1, %3, %1\n" /* optionally generate carry */ > +" ldd 0(%2), %3\n" /* load from memory again */ > +" add,dc %0, %0, %0\n" /* return carry */ > + : "=3Dr" (carry), "=3Dr" (sum), "=3Dr" (addr), "=3Dr" (tmp) > + : "0" (carry), "1" (sum), "2" (addr) > + : "memory"); > + > + return carry; > +} > + > +static __inline__ int get_carry32(void *addr) > +{ > + int carry =3D 0; > + unsigned int sum =3D 0xffffffff; > + unsigned int tmp; > + > + __asm__ __volatile__ ( > +" add %0, %0, %0\n" /* clear carry */ > +" ldw 0(%2), %3\n" /* load from memory */ > +" add %1, %3, %1\n" /* optionally generate carry */ > +" ldw 0(%2), %3\n" /* load from memory again */ > +" addc %0, %0, %0\n" /* return carry */ > + : "=3Dr" (carry), "=3Dr" (sum), "=3Dr" (addr), "=3Dr" (tmp) > + : "0" (carry), "1" (sum), "2" (addr) > + : "memory"); > + > + return carry; > +} > + > +static void test_bad_carry(struct kunit *test) > +{ > + int carry; > + > + memset(tmp_buf, 0xff, sizeof(tmp_buf)); > + carry =3D get_carry64(&tmp_buf[0]); > + pr_info("#### carry64 aligned, expect 1 -> %d\n", carry); > + carry =3D get_carry64(&tmp_buf[4]); > + pr_info("#### carry64 unaligned 4, expect 1 -> %d\n", carry); > + > + carry =3D get_carry64(&tmp_buf[2]); > + pr_info("#### carry64 unaligned 2, expect 1 -> %d\n", carry); > + > + carry =3D get_carry32(&tmp_buf[0]); > + pr_info("#### carry32 aligned, expect 1 -> %d\n", carry); > + carry =3D get_carry32(&tmp_buf[2]); > + pr_info("#### carry64 unaligned, expect 1 -> %d\n", carry); > + > + memset(tmp_buf, 0, sizeof(tmp_buf)); > + carry =3D get_carry64(&tmp_buf[0]); > + pr_info("#### carry64 aligned, expect 0 -> %d\n", carry); > + carry =3D get_carry64(&tmp_buf[4]); > + pr_info("#### carry64 unaligned 4, expect 0 -> %d\n", carry); > + carry =3D get_carry64(&tmp_buf[2]); > + pr_info("#### carry64 unaligned 2, expect 0 -> %d\n", carry); > + > + carry =3D get_carry32(&tmp_buf[0]); > + pr_info("#### carry32 aligned, expect 0 -> %d\n", carry); > + carry =3D get_carry32(&tmp_buf[2]); > + pr_info("#### carry32 unaligned, expect 0 -> %d\n", carry); > +} > +#else > +static void test_bad_carry(struct kunit *test) {} > +#endif /* CONFIG_64BIT */ > + > static struct kunit_case __refdata checksum_test_cases[] =3D { > KUNIT_CASE(test_csum_fixed_random_inputs), > KUNIT_CASE(test_csum_all_carry_inputs), > KUNIT_CASE(test_csum_no_carry_inputs), > KUNIT_CASE(test_ip_fast_csum), > KUNIT_CASE(test_csum_ipv6_magic), > + KUNIT_CASE(test_bad_carry), > {} > }; >