Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1993327rdb; Sun, 4 Feb 2024 09:51:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGC90sOzOYR3mVPKiboTHrQsZGUT3Wq6tgHZ40bjEyiEPvyXJ8Or48vrMNV4RAAglO/YoHw X-Received: by 2002:a05:6402:348b:b0:560:64a0:f45c with SMTP id v11-20020a056402348b00b0056064a0f45cmr895533edc.3.1707069095393; Sun, 04 Feb 2024 09:51:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707069095; cv=pass; d=google.com; s=arc-20160816; b=pm2yyIY04vN/oBO6XFt4IuGDlER3TuPYRfghqT5Wbo13GfvMci31N4EbIEklU+6nx+ yr4/m8DHp1gi8rxeIwDxwanRi+9r9vmgXUcU0Rv2hit6PqkmL+YknQS1mk447ARFPmHl HVwOqoyif4FNPazZLjGuBSStq0Q0Qqm7COU9eNUziI6bdNRpAVZyyXOFa8pdBt1/TvGf VuUs8MnUOTXpBg13LUyP+12u3MRWAwNzSjELnz5Wxx2hvgeDom5e5GyXtfWl5jjE0a1x /AiDCCA8jUgite1nGcwBV04YWiHz0ffW88sqaq8uKm2lRohxDt1YdttQAFFI+VBhdyjO JZ+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=uILQb7xlvwcvMVBvKlI5TezeCPj8ieCfIVJIBkgd3HI=; fh=sc9Q+3G9MRCQju1GcFDitDWgHNIkhhi6u7rSJbhLphs=; b=jWE9fBoAakZUo8Z8MSXxSui39188xUQgS0HoFJkCcygvrdxbv48yH6ph9en+L5fG9k dw0HraYS7DlP6hWdR+UaHCdaWeoO3j+rm/9HOakwqPmaoPalBznV6h3VTl7ib4spVoS7 Auqs9SJK2+T1gFAVzalGoK92/bpum3eREi9e19gksLy3DCKwanyVF3pFLG1WfL8i4TUu U3+KQBA/ughZjeYpQjCqxbsrTlFvgniI9d77aEPYTbRo7fXSQBuoDWE/kgwlOs4YvsNX fnHfVza+sRZVkyWtTJiNZJ1flDMjzN2UDiJrF0qOgOwlrwmE9FhWYA9erySHeVQ5IYjx UPDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d3k+XeLC; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51832-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51832-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCU72UKgEmyP+MQJCcxl2JZtSRPSDWV0feC5ujt6TKFc3WlkvC3qhDN833F/GVW3TM+lNXNp1w62f6yJ1ruKw2YHSFJ6GSyPYNlqlvHTuA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c20-20020a056402121400b0055a38adfcd5si2939111edw.547.2024.02.04.09.51.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 09:51:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51832-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d3k+XeLC; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51832-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51832-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4D1051F231DB for ; Sun, 4 Feb 2024 17:42:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF7B4249E8; Sun, 4 Feb 2024 17:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="d3k+XeLC" Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 5B28522089 for ; Sun, 4 Feb 2024 17:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707068520; cv=none; b=t4LPgKjONg+3fpjGhxun62l5sUbu/jT3kSUl25xmVHoQ4OP5iMCTwF/1aLsurBDp6vlGYHpu+3/+ZYA6O2bcQMGxNqQS0sHKf5dF8cMd/XWX50ffdVQosL8QY/z+TY6Eqowh+By2qHk95k1Me5bN9bX2LRok6Q3nvOHY2IxDmmw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707068520; c=relaxed/simple; bh=O0aTQZD2F43voU1Yir7u1fDNS+HgXMZ/oThz3Vf0+xM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bxTcixmDVXDVTwW1hX+APv8aUSf+EAO3SiPo2va+gBSC3yADp/0A5eFhu6rC0LK/Ej99dVPn0XYH/zdUFlcvKvElCvUoS25RJvLiuBcjIWu17cI25IsS4fPnU8BEieFQfT4iBNQw+WIJCPPnKH1TiH97vLJ1fJFtH55tXDnejZo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=d3k+XeLC; arc=none smtp.client-ip=209.85.215.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-5dbd519bde6so3017513a12.1 for ; Sun, 04 Feb 2024 09:41:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707068519; x=1707673319; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=uILQb7xlvwcvMVBvKlI5TezeCPj8ieCfIVJIBkgd3HI=; b=d3k+XeLCcgC8rZjjxLY7+0x/lJYisQfGSxtdQzHXXEcHi5SPb/r35lazk0csDVILJr DSvk3MKWo+6ZdVH1kevnlf1cifkN0caYr2q6+ckWDT/uXou0pqWp+4P4bMJS7KaECDMO HwXVOScdI9lGev+rW8lVH1GMBf8NiUozRzy7GENRY0UN3bBN5BxGDBHLEajQ9JE34xRG 50+cF2NqmeJY66OjQ9ob616lrMlyNNVCNVrMuAJv/rv3VYispyamUn2WKWPI+S5IgR1V 2BEc1jd3yRyq+mMDInUtpEDOOFk3Y3kSk7TcqZYbBAXEj7gEXLnLm2P7LZRNZv6Mgq5G kTbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707068519; x=1707673319; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uILQb7xlvwcvMVBvKlI5TezeCPj8ieCfIVJIBkgd3HI=; b=OjZqVsWSpUbF1vZPVoRoAyOi0XdTDKDbL3AVNuRRwWFGVBrYaXQf0X6BJ9pfK+ZW8y r6srERbIVdxbHuC1a1+8xjYw68sMm7MXDnuycR4+RcIE19RF1sjDpj9mZrf8YnWmV4bp zzc3kPBjFDhcs2izrki1HBD7rYQOUfEM7Rbvmwgtao5/fcHRQE+wNhKe42Fsr8g/POAn 7Mxo/h2UD9IPa5g8LvsaiU6PLURcTLCiAU25jsSj6xng/B9bR4BTbqO32zgZE4ls+pc1 Si35de5JYG0u01Ei/nvuaZAwgwPpMN8t1zWAi6fq30yWqwJqbKaMCm1Oppu7K8F8GkYR O72g== X-Gm-Message-State: AOJu0YzWIyMYtNHGuhnyytLzFcvkhbJrOQ7HXr827PIDTf0Xz+whkBm2 ddjGkqUzgXX1xfVnqxo6Fp8G+frFQpSTlvd+HVb6U8RuNcIQk/nuWRAdsaJR X-Received: by 2002:a05:6a21:9185:b0:19e:5514:42c2 with SMTP id tp5-20020a056a21918500b0019e551442c2mr5773461pzb.52.1707068518522; Sun, 04 Feb 2024 09:41:58 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWsKMJAURb+pbu7GgafcIY/I1o/l/1+osqehbQ/7LbPMFolgwKNCNffA6yGa5iQm4Uj0MAv/CrEVOTevyFi63/leU9qs2krr3B04vvnvsVlYOJfQDzD3JsDo6NkSanWp7BwKm3WIJkX52P7LXKr6A/eVr0yWtvz+NRu7IY= Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id o2-20020a170902d4c200b001d8f3ba10b4sm2524661plg.236.2024.02.04.09.41.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 09:41:57 -0800 (PST) Sender: Guenter Roeck Date: Sun, 4 Feb 2024 09:41:56 -0800 From: Guenter Roeck To: Charlie Jenkins Cc: David Laight , Palmer Dabbelt , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/2] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests Message-ID: References: <20240130-fix_sparse_errors_checksum_tests-v5-0-4d8a0a337e5e@rivosinc.com> <20240130-fix_sparse_errors_checksum_tests-v5-2-4d8a0a337e5e@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240130-fix_sparse_errors_checksum_tests-v5-2-4d8a0a337e5e@rivosinc.com> Hi, On Tue, Jan 30, 2024 at 11:10:04AM -0800, Charlie Jenkins wrote: > The test cases for ip_fast_csum and csum_ipv6_magic were using arbitrary > alignment of data to iterate through random inputs. ip_fast_csum should > have the data aligned along (14 + NET_IP_ALIGN) bytes and > csum_ipv6_magic should have data aligned along 32-bit boundaries. > > While this is being changed, fix up the awkward offset code in > test_csum_ipv6_magic and use a struct instead. > > Signed-off-by: Charlie Jenkins > Tested-by: Guenter Roeck > Fixes: 6f4c45cbcb00 ("kunit: Add tests for csum_ipv6_magic and ip_fast_csum") So this works on little endian systems. Unfortunately, I still get [ 18.447037] # test_ip_fast_csum: ASSERTION FAILED at lib/checksum_kunit.c:463 [ 18.447037] Expected ( u64)csum_result == ( u64)expected, but [ 18.447037] ( u64)csum_result == 33754 (0x83da) [ 18.447037] ( u64)expected == 55939 (0xda83) [ 18.455565] not ok 4 test_ip_fast_csum [ 18.463570] # test_csum_ipv6_magic: ASSERTION FAILED at lib/checksum_kunit.c:487 [ 18.463570] Expected ( u64)csum_result == ( u64)expected, but [ 18.463570] ( u64)csum_result == 12221 (0x2fbd) [ 18.463570] ( u64)expected == 37721 (0x9359) [ 18.470679] not ok 5 test_csum_ipv6_magic when running the test on big endian systems such as hppa/parisc or sparc. Guenter