Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp1281896rbe; Fri, 1 Mar 2024 09:17:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXeHBbnaI7Cydpi2ewXKuF/DBs7Lv/rmQPKgq9/7+gtnm96h5oCzqOSTLlmf1jq0C0YI7t6vY7ZKSTgkYhRghTrGO2zKl7XJcAXVjhaGQ== X-Google-Smtp-Source: AGHT+IHXNHbbaRPGX1XX31rogvEVA0wQXgiikVYp4DGziwq6j5PKOSMmXtvP93AXrHMrHJaRlyaf X-Received: by 2002:a05:6a00:2d8b:b0:6e4:d3b1:76c9 with SMTP id fb11-20020a056a002d8b00b006e4d3b176c9mr2555351pfb.31.1709313468145; Fri, 01 Mar 2024 09:17:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709313468; cv=pass; d=google.com; s=arc-20160816; b=Ky7ofJZCNC974zkdg56sVZ064d1nxEWn7dxPsZo5dCK8Tr1pprJFZD+ZmhZiSXooT0 K52Z4lnOsDd2Ps1ie44fx1/5W+kY4rRHer/uXf7+MKW7tVFJ2acjviU0yWl4y2i/FK7S RVAyX0Yz2umh25TK1mAPGj2xrrUM2f24bvlDUTDD1maXPjNRGQg7WnW+72rQGC1S2aY2 uAov/eXu6WdtiJzGUN5FRv7xbnXGXszkghzTTRQxRFQGZqlportHz08B8Yyox+gyECde qguLro0V+R/7xqpLwlOeSCqD+RT44lsXEunWOwmENAyzw5eC3dJV6v4wm5ARlaqiQPZ5 91gg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TgGayE0Ss0x7kMyOECw4c7ZlvB5+ggeY6MfRBHZyRj0=; fh=qUpsNnyfDKykIVBq6wnMZBAo4v+VRmTK70uWgtR5SOc=; b=0WcrV6krtWBB3fm+UytCt7nayrHPq2HY9MdXumouuDgQtxdrxP9ufQNqjdzlVmtgQT +18OqJ5eO2/1VjH2MouNZEN3X85uvaeOOY5odcIps2f8VnqdKmv0aCf3Jn159N2V31qe CoDMZIGh58aP3YYTt9hD/lI/LMojPPRhnpJoJmp/RKYJjP42vkXA1kBFfBvO/2JoQSbX f4YZkUdgp4wG34BSp2/aren93p0FmD8NBPb8+togCl49G/gaqZdwwGUrwml4hIk0IPBL 3R18z24vhgoP6SkLy8BV0VNudKJbS2+y24y5keed5hHbcRyf+Xkxm6OZd6Ht8iayczaJ JMgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=06rxUA6F; 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-88808-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88808-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lo12-20020a056a003d0c00b006e4d336b814si4076541pfb.255.2024.03.01.09.17.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:17:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88808-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=06rxUA6F; 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-88808-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88808-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B085028F9A4 for ; Fri, 1 Mar 2024 17:10:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9721524B2F; Fri, 1 Mar 2024 17:09:21 +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="06rxUA6F" Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (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 10D1F28375 for ; Fri, 1 Mar 2024 17:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709312960; cv=none; b=Se3FAWlCz6r88S4+M508yBNwRwIEyvjrfnMD0ArKd/DAu1Lae08NJXMU9o1m2WE4RIfsV3CskbCpOomfLjos1rSX31Qk3umOm+iNPUGmC1R+Zcnmc4AwzCBO603P8xnEo/sE0ep7fKrE2rfNPG8lDgkZ4B0Y9oDBpSYeTQhv2Vo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709312960; c=relaxed/simple; bh=1cS6+LLKKJwc2QewyzocSdAasYEcaBT9FfZr/7scFes=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fJ1smwexX1+ThmnwQnx7Sm74lrY7q1RzJ4TkyR477fKiEW7MAqG2lxoQ2jPavGyuPJGTPHLiBj+ZGb207OmCTNKfD9CKfk9bLL2vgZNVLsrS9RFTWGY+RXcF1goYAKkplFxKRTQE3J14cXtNertRUmY5UBqnzZ9u/eSKGBa5b48= 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=06rxUA6F; arc=none smtp.client-ip=209.85.166.41 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-io1-f41.google.com with SMTP id ca18e2360f4ac-7c80a1186bdso102214239f.3 for ; Fri, 01 Mar 2024 09:09:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1709312958; x=1709917758; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=TgGayE0Ss0x7kMyOECw4c7ZlvB5+ggeY6MfRBHZyRj0=; b=06rxUA6FVMrODxLKRPO790b3zQpCzQvuLqG1lAfKuCFeFONmjF/fbA8FH8n320aFXR Cf3y8h05UfZ3nqk5X6a5SBJNC4aUomiHe2bU/cQGXsqQEvSELn5nzZ3xqMhnaDJvQCgO 2QMmrZ0Kb2ADoTESIa2tqaFXwp+DaRWwaFEESfWij9cJFiwrjL3DqNd0sm+AbRzVhuA1 EwHsZo6HtJMV0ulzf7AdKIW76i2tMZmfbArQnFNH1QlGDxPi24Nh6TvNmeHnG5Hfg4g0 u4pEVFsL3fuex3cZGVYCxIoteoIbT+KmIzmgk3DL1vRRkqQ7uVFBcbExO9a0lJeb38yA LiHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709312958; x=1709917758; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TgGayE0Ss0x7kMyOECw4c7ZlvB5+ggeY6MfRBHZyRj0=; b=J1eQS278N/5FdPGOz6nlXpjzr+yT0UxwDfhUFpae1EO8uwYQ0kKuLGrK/v4QLJkFWS wjnEWysC89HkVL6FK0xASNfPbQ/06NLfT7ondQxlV8Veuu0esWuB4FAxun4yw0YpMuZD 2sJEF5oVuDaEWsgaHvJbk5Ou3hrTITprdEJqugUjDNuVBIYkJkp8dGmZERy8gUy7z92i MFyDx8Y2Up8gWLtudZVohSGVu/GFtA/tK/+i7uwryKvza5lF+FyTZGINF1VveTz8Dxqb jhRtRhlZbrSg4qxAsxgcI15Ud1EcxMAmj1Fyh0mIWGsf47o+uzliVagW4mKBex+HIg5Q VLrg== X-Forwarded-Encrypted: i=1; AJvYcCU9bPRXVLKgVEjzuZWieFhrAQM0NYAVirR0zy8KnONCFH1pCQihsi7hoplVq5JBoc5haQnzAHsmskLx3QQbItEkpNyt7qVfrvVse77R X-Gm-Message-State: AOJu0Yw6Fmxbz/DuUHhuZaMik3U9YVTLahLANLW2XsRkoKUGHU+DQeLT xvnZdlrtpDidBrksWtXxki5kohTX5IkuY1fRoH6SJZ6T3s7C5vkehviemVddqdI= X-Received: by 2002:a5d:9c16:0:b0:7c7:97c2:f04f with SMTP id 22-20020a5d9c16000000b007c797c2f04fmr2306910ioe.8.1709312958140; Fri, 01 Mar 2024 09:09:18 -0800 (PST) Received: from ghost ([2601:647:5700:6860:2a1e:5647:311:1139]) by smtp.gmail.com with ESMTPSA id 132-20020a63008a000000b005dc9439c56bsm3121416pga.13.2024.03.01.09.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:09:17 -0800 (PST) Date: Fri, 1 Mar 2024 09:09:15 -0800 From: Charlie Jenkins To: Christophe Leroy Cc: Guenter Roeck , David Laight , Palmer Dabbelt , Andrew Morton , Helge Deller , "James E.J. Bottomley" , Parisc List , Arnd Bergmann , Geert Uytterhoeven , Russell King , "linux-kernel@vger.kernel.org" , Palmer Dabbelt , Linux ARM , "netdev@vger.kernel.org" Subject: Re: [PATCH v11] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests Message-ID: References: <20240229-fix_sparse_errors_checksum_tests-v11-1-f608d9ec7574@rivosinc.com> <41a5d1e8-6f30-4907-ba63-8a7526e71e04@csgroup.eu> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <41a5d1e8-6f30-4907-ba63-8a7526e71e04@csgroup.eu> On Fri, Mar 01, 2024 at 07:17:38AM +0000, Christophe Leroy wrote: > +CC netdev ARM Russell > > Le 29/02/2024 ? 23:46, Charlie Jenkins a ?crit?: > > The test cases for ip_fast_csum and csum_ipv6_magic were not properly > > aligning the IP header, which were causing failures on architectures > > that do not support misaligned accesses like some ARM platforms. To > > solve this, align the data along (14 + NET_IP_ALIGN) bytes which is the > > standard alignment of an IP header and must be supported by the > > architecture. > > In your description, please provide more details on platforms that have > a problem, what the problem is exactly (Failed calculation, slowliness, > kernel Oops, panic, ....) on each platform. > > And please copy maintainers and lists of platforms your are specifically > addressing with this change. And as this is network related, netdev list > should have been copied as well. > > I still think that your patch is not the good approach, it looks like > you are ignoring all the discussion. Below is a quote of what Geert said > and I fully agree with that: > > IMHO the tests should validate the expected functionality. If a test > fails, either functionality is missing or behaves wrong, or the test > is wrong. > > What is the point of writing tests for a core functionality like network > checksumming that do not match the expected functionality? > > > So we all agree that there is something to fix, because today's test > does odd-address accesses which is unexpected for those functions, but > 2-byte alignments should be supported hence tested by the test. Limiting > the test to a 16-bytes alignment deeply reduces the usefullness of the test. > Maybe I am lost in the conversations. This isn't limited to 16-bytes alignment? It aligns along 14 + NET_IP_ALIGN. That is 16 on some platforms and 14 on platforms where unaligned accesses are desired. These functions are expected to be called with this offset. Testing with any other alignment is not the expected behavior. These tests are testing the expected functionality. - Charlie > Christophe