Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp88038rdb; Wed, 21 Feb 2024 18:38:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXnRCDPfKi9MVq9xMYWNCkTXsF8gQfJ7z9OxbDg+XPs5mhT/PKtW43SxdNn5dMq3jTT1GmASlqChfSZraRK2Uf6y/R5wJDg+DmYPD5mlg== X-Google-Smtp-Source: AGHT+IFJRBHXEIf56wqyr1BC9D33hjZdKc/kRr/UKhdMSyx8oAPm9cOU0bGsHemnVQUUXYRq7g1k X-Received: by 2002:a05:6a21:3511:b0:19e:bc68:3c67 with SMTP id zc17-20020a056a21351100b0019ebc683c67mr22638560pzb.33.1708569494206; Wed, 21 Feb 2024 18:38:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708569494; cv=pass; d=google.com; s=arc-20160816; b=oSCxxg1Q4b7snNC8dKy3R/FaRy9Za/Mzkd2fzoQx/naWi+4pjaPeCqjP0N7YqHbA6x w9oNKKmyre23rba7jeugJ/k7sEMjLn+4XmjovCW8SHEbpi+u75tR2Akwo9tLgb+BcEO8 cojIf1SN2k61Xitt6ZirOLOIU19dlBtzcpsHDa/ezZ1WJhi+MKR1VECZERmT39buVAfD B1X1w1X5WwaRsFFdOrbTF/2qbN1JF5QH4DNQhQO8abBjngvcQhtmxZCkMO8Svo1D4TYu LX3GiqzYNEKME9V2T/kczF/yHFzH/ue7j1bhT75HtN/d3ODkrxcaeungAcw0FLbTd1XP WDQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=ZGrNzxe3gyC6VQWPSLHOaYx0WPaI3IQ/8Jr8tyLxsyE=; fh=QMNR4pAGGzk9qTS2KUlm1tMXgHlruS0wyeJohLlujnQ=; b=DLJ9PinzO4TrqTmAlsqWYxV0XtJ7z7U8GGgXDzAc9Fg6VdWH0IqzLk+V3YWcC5QmqM Gx3HACvVOkNeTE//p+TybfmLIywSXEoXT2i0Qe9fmoBokgT+3tkRr/bynY7BDe/aVeiq EiKpdcu7ZznthuRwt2X4PycVPgqJh1cFU4BrEOH6LjsFr4Kl08rcjR4VUl+HQ+Fa6cht /WVfWWFlVKBCiAVPFIlIESS5Ve9eUdJ/eU53D3B5RAEx1C0NbJu/uMbwcRCmXRHaFmXW ibJfdmhqFpsozGGmDRf1vsHjxyQ/tTysI/f5RDf/i7sWrDdi5gs+g/rS3atKPbPS8gnq DKEw==; 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=bDqLaH4M; 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-75803-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75803-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ld20-20020a056a004f9400b006dbe4d086cbsi3433808pfb.45.2024.02.21.18.38.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 18:38:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75803-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=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=bDqLaH4M; 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-75803-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75803-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 2D8F4283D2D for ; Thu, 22 Feb 2024 02:38:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3C3E182A1; Thu, 22 Feb 2024 02:37:39 +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="bDqLaH4M" Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (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 72C0D17562 for ; Thu, 22 Feb 2024 02:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708569458; cv=none; b=aebnoRNHm/MKwtQqcXrkVrd6+lOAHC5ThRHwtue40bGBSczII0dfsxG/ixNHhIannzQ60+iphClFBL3vOr8fSss/cEjpJjTAZ74Hcsg/v8GvLFXxo6Oh40XFqfCM2S6z7NEA+xAiLdc+j2ryZUVTNRgvuK1FJPcNAcuMPZlElwQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708569458; c=relaxed/simple; bh=loWpjUeaU5B9E/ejxOfrGk83272NpESpvlB1T6y7RcU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JKVudTO9EvgZ6k+wGknB8rw8thv8jBMP+RJTEW3woFk1i9Xnabzn302yuzove6qdbnqcSS6cO8cavzdBfBQCjCIEDeofqU0ATl5TlyDWDgGqwJ7hTLptkzNGzMhgqwwT7+9Yh+A5OSzqidwNKpHbsnfbD3au6/UkWPHF73YuKYc= 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=bDqLaH4M; arc=none smtp.client-ip=209.85.167.182 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-oi1-f182.google.com with SMTP id 5614622812f47-3c1404d05bfso5399589b6e.3 for ; Wed, 21 Feb 2024 18:37:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1708569456; x=1709174256; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ZGrNzxe3gyC6VQWPSLHOaYx0WPaI3IQ/8Jr8tyLxsyE=; b=bDqLaH4Mz6HBVCQH8/bzqJM/xjCxIxcGrIh8PIEU0TYPLwt6nH79zDhos0DOTlmk/R sewKpdEG84CTfUkO4fqkKo+KLgPemD7mqj176D+7eicT/3SoHLmguQVgQkvNX5ol1zoE 1W7S3IroWirVSWaPWLLTcdWP2uQMrDsflRj7BxPghmFDaR2YAXMEKZSs0qejzkCxbjGA SPlxggHVkvmjfUHi8n+B1W5tu/YIAmEF7fyYfycUAhwAiGUCgm2UfQa7df201Dg9OBTJ /MxdofkD0gNu3TRQycgc42xIeApQf4q278El0L7milqb7PMFVtXnJXTxROIBSCctm+Os siJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708569456; x=1709174256; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZGrNzxe3gyC6VQWPSLHOaYx0WPaI3IQ/8Jr8tyLxsyE=; b=LDbsMdPocSxwD6xvsAQuVvXWZzxYeVS5Zdvvc2g242RDPiH5dChfvNv+UhYNOmgJCI a/e+8INKfTnwuGKqZpgMescGpv+0rp1pe4couY/dbNQyhPX/k9kMFGnSEDdTzfAZnq69 /sOta1CwMwxTmzFfgvoWT83NnKOeSaSU2M4qCmjFqTfwf/yiJzqZaNSm26+xOFCTaJNE CfdzPIZNhybqLCaGVPyZ2ejG+yHnW/HbXwYAT3IrAbzAwTekbV7DS/Ig48BAsQGKR6E4 sE64geUVJl5JsalxdhgRMHTnDQcB/c1SL48raq9/ZC2kHzJwquwT3BBUNvTgvH+Zn//Z iy5w== X-Forwarded-Encrypted: i=1; AJvYcCVML9mFzUwqT1CeRe4WsC+8JnJgsYkdL+cZCLRS11PDJ2VTPaWJq8lqxkmp/bqwGslu2ioDvvdoixqpGkYEJf7Zp7/Sl0SbWHdK+Zoe X-Gm-Message-State: AOJu0Yz3+/O+4k/o+/ZopE1hezttOa87pCDWBdC7VpJVHe952cXSWppr DV1o8cqdFQ4inxFoyBWfKTOJTpGpvtSaG79VSq8QvB7bcUy9E1LrJt+bTbcrGEKeAwMSEs3k2+5 S X-Received: by 2002:a05:6359:45a9:b0:17b:335c:fa07 with SMTP id no41-20020a05635945a900b0017b335cfa07mr13781339rwb.32.1708569455998; Wed, 21 Feb 2024 18:37:35 -0800 (PST) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id kt21-20020a056a004bb500b006e465e1573esm6469705pfb.74.2024.02.21.18.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 18:37:35 -0800 (PST) From: Charlie Jenkins Date: Wed, 21 Feb 2024 18:37:13 -0800 Subject: [PATCH 3/4] parisc: checksum: Remove folding from csum_partial 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240221-parisc_use_generic_checksum-v1-3-ad34d895fd1b@rivosinc.com> References: <20240221-parisc_use_generic_checksum-v1-0-ad34d895fd1b@rivosinc.com> In-Reply-To: <20240221-parisc_use_generic_checksum-v1-0-ad34d895fd1b@rivosinc.com> To: "James E.J. Bottomley" , Helge Deller , Arnd Bergmann , Andrew Morton , Guenter Roeck Cc: linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Charlie Jenkins X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708569451; l=1119; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=loWpjUeaU5B9E/ejxOfrGk83272NpESpvlB1T6y7RcU=; b=xtNabUDylbAE6Wad/8orZRl3dAazwQY8qAbie+Ef8VKsiWBGicqZfawURBgIzMindz5keC/GQ JFElQKZrZefDR+vZaVkejbXrGuxRi9Xb6hk2IyfNMsmFd1KK3OjfEjC X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= The parisc implementation of csum_partial previously folded the result into 16 bits instead of returning all 32 bits and letting consumers like ip_compute_csum do the folding. Since ip_compute_csum no longer depends on this requirement, remove the folding so that the parisc implementation operates the same as other architectures. Signed-off-by: Charlie Jenkins --- arch/parisc/lib/checksum.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/parisc/lib/checksum.c b/arch/parisc/lib/checksum.c index 05f5ca4b2f96..eaa660491e24 100644 --- a/arch/parisc/lib/checksum.c +++ b/arch/parisc/lib/checksum.c @@ -95,14 +95,11 @@ unsigned int do_csum(const unsigned char *buff, int len) /* * computes a partial checksum, e.g. for TCP/UDP fragments */ -/* - * why bother folding? - */ __wsum csum_partial(const void *buff, int len, __wsum sum) { unsigned int result = do_csum(buff, len); addc(result, sum); - return (__force __wsum)from32to16(result); + return (__force __wsum)result; } EXPORT_SYMBOL(csum_partial); -- 2.34.1