From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 B196B175A6E for ; Thu, 7 May 2026 09:34:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778146460; cv=none; b=umjadcO4nrBWfpb8LfrvnSJk8beMtLQ1M8vaP7x1GqRpBe6do8gjxcs/GWdOnOFFVaIWjXYETmIcZ2rnQ3+DmkSF/3xml7i8Kr7O1OvZghundUJ5qI0JjgnjTauAKgjcHUjI4TsOp2YRB9xqxdikhMKFMiM1MpgFSX+RAtyQ7NA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778146460; c=relaxed/simple; bh=SiL0I7BTqDmOrEYB/RwFyieTxl0aty4XtD8WXRHHt7E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tWMVn8OiapLuvY0v/Owz1a/lgxn2fYfuUS+jOuZwZPvHIKKVPA9E7sv30sSpSe4rC0GiLofqTagIJDTb1Xw46E0JDGzSWitvrBrQNFrg9nmIq2RFSCeBq+/qbcJrxhkpYfQBTGnvvv3/lUjcvVZ4JXMmdMlp0WIraZ/Li0rwjVI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=readmodwrite.com; spf=none smtp.mailfrom=readmodwrite.com; dkim=pass (2048-bit key) header.d=readmodwrite-com.20251104.gappssmtp.com header.i=@readmodwrite-com.20251104.gappssmtp.com header.b=UJ4ENShi; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=readmodwrite.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=readmodwrite.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=readmodwrite-com.20251104.gappssmtp.com header.i=@readmodwrite-com.20251104.gappssmtp.com header.b="UJ4ENShi" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-43d77f6092eso406786f8f.2 for ; Thu, 07 May 2026 02:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=readmodwrite-com.20251104.gappssmtp.com; s=20251104; t=1778146457; x=1778751257; 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=0RDPZxyyoA+nLVJX1tOhu7GRz/OpeQnLIvnlbEm9kx4=; b=UJ4ENShiWepzea3FlvSbyVzkrxv06OS9rK195BomMZJaYNxNPMVdIPKql8eg8tyMYM kfb0+VCzq+YZqC1FbDpCc5nwHABPrK4p9Sjc4oiaxEn6ehyovW11UxYlU9hBZdiqrQAu JXNy2bbCM9b2Q89RDFEL+pz9Hp5r0zOU3HF+qHFgSH4o4Qy7S/cS8Nv1pwDkVdPqaR7q RVoLoJph4XG9HBvebMI19zuhTawA0WQ7YdMtnAzBsL2xLTyFfQflSRB/D7nG8SF+c8R9 XEvNCGk1qCFdv4aT3H+zGN90jsUZb9v2UfxKMBd5pOD1tt68SpAUmdDG88po5IsRpsbp susA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778146457; x=1778751257; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0RDPZxyyoA+nLVJX1tOhu7GRz/OpeQnLIvnlbEm9kx4=; b=QRggtvEKtWjGunkw+ZL4q3A2t/k/+gfzxfOeDqO80oe/sCVwVUa4KpGBhiNsqlR9id mYoxMOZmVHxEFN9fmgMRGHtP9dFMYOSraJnI/u8GUcWCqEikCDfs+46+rcEpudhj9orI ydwVsUBZwyYK4dpB5fT3UW1PULczFLxu4pPNRG+F8I3oy1mCDRDbNiHkjZ2A64MBVXHU 5dOyez/dOaMYDupO0WFoOp1bsw/3qhtzvPjdJti2rluMsEvsWOEbbB/oIojJCXx+vlVT 8+RrLLzP3+0oBi+oz8naEFIgV4GVzr+qXNsos/HQlAFaAWPNSivSuPiUIflox0Jpbe4g PJuA== X-Forwarded-Encrypted: i=1; AFNElJ/1MotnwRTlmSg8HMZtdB+QiJbrVk/+FIVaBqXUcY8xKq/ER62Wr/S2NFu4Xzp2ooQQNa3VMmb44nlWxKU=@vger.kernel.org X-Gm-Message-State: AOJu0YwrpZd65ufDK6kB/FFb8v6aaqWnValQJqpbrs5eEJDlRc5ZY8dg iRIh6zUB/XCN4kWZGUQWMuVQ5l0tkmVcivZK8lJsAWySlmkO1driue4NLTrWiHVg7VA= X-Gm-Gg: AeBDieuWDLiXA8tPeiQMKi/uy4mkm/BWIWwCSk5F+ePJayibPDEyQs9NCT4i7e+QMS0 ZidBIMuR6x/ZcwWnpkT3UnhTmgv0UHwleM7mitNtTZFzTUhQV4twyT89Gb3tYaluZiOLe/QMyck JFaoztDF1UuAJIiR7UUYasbivsiKRX3oK1UdBRqrKFE/b0YaCEhQGRwz5JGGTb0B6sUuzjTEWK5 U+jf1BeO3+jZzo15DBaRJRiwVH9Qf586DuBhvYyJ4xLj2bKrcDL6ip9JkeN1jA1guMx6L+bLFKO gPwmVk/bKacdu47SW6cKURyghnLySWRGcN3Ayx6aLPUsWoFziCFuUCRgPr2HZY9wushSFKculhp Ks1//a/1eMSZxffnu5v3pJZJpwHhZWYFOaKx1YiFa4ulzDR9iT8paQmEA5U+EM9cMJJeCfn2QVZ T1WucFEIlt/tBzfZ9GriPH X-Received: by 2002:a05:6000:2c0c:b0:43d:7e11:1b72 with SMTP id ffacd0b85a97d-4515a6c32dfmr11386364f8f.9.1778146456983; Thu, 07 May 2026 02:34:16 -0700 (PDT) Received: from localhost ([2a09:bac6:37a8:294b::41d:50]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4505238e7c0sm17157280f8f.3.2026.05.07.02.34.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2026 02:34:16 -0700 (PDT) Date: Thu, 7 May 2026 10:34:15 +0100 From: Matt Fleming To: Jacob Keller Cc: Tony Nguyen , Aleksandr Loktionov , kernel-team@cloudflare.com, Matt Fleming , stable@vger.kernel.org, Simon Horman , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Eric Joyner , Paul Greenwalt , Alice Michael , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Intel-wired-lan] [PATCH net v2] ice: Fix missing 1's complement negation in GCS raw checksum Message-ID: References: <20260501095717.1032151-1-matt@readmodwrite.com> <531aec13-c33f-4e77-ab48-de8861f9b6c6@intel.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <531aec13-c33f-4e77-ab48-de8861f9b6c6@intel.com> On Mon, May 04, 2026 at 05:10:23PM -0700, Jacob Keller wrote: > > Hi, > > Based on your patch description, I assume that you've tested this on > real hardware. > > I dug a little through some of our internal changes history and sawe > that it looks like the hardware has a register setting in its > GL_RDPU_CNTRL register which determines whether the checksum value > reported is inverted or not. In E830 hardware, it is supposed to be off > (i.e. the checksum value reported already matches the expected setting. > > Perhaps your device somehow got the GL_RDPU_CNTRL register set to the > wrong mode and that results in the swap being necessary. Hmm. > > I'll ask the team to see if they can confirm this behavior. Hi Jake, Thanks for digging into this. I read GL_RDPU_CNTRL on our affected E830 and the value is the same on both ports of the NIC: 0000:c1:00.0: GL_RDPU_CNTRL = 0x0020a275 0000:c1:00.1: GL_RDPU_CNTRL = 0x0020a275 Decoding bit 22 (E830_GL_RDPU_CNTRL_CHECKSUM_COMPLETE_INV) gives 0, i.e. the hardware is supposedly in "not inverted" mode, which matches the default you described. However, looking at the data on the wire I see: - netdev_rx_csum_fault fires ~65 000 times/sec on this host. - bpftrace at fexit:ice_process_skb_fields shows skb->csum = swab16(raw_csum) directly (no negation), e.g. raw_csum=0xfb4f -> skb->csum=0x4ffb. - At fentry:__skb_checksum_complete the upper 16 bits of skb->csum are 0xFFFF on every TCP/UDP packet -- the signature of nf_ip_checksum adding the pseudo-header to a value that was the un-negated raw_csum. - fold2(skb->csum_at_fentry + skb_checksum(skb,0,len,0)) ≈ 0xFFFF for every packet, which means the two values are ones-complement complements of each other, i.e. the driver stored S where the stack expects ~S. Negating the checksum makes the failures go away. Thanks, Matt