From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26D16D374A0 for ; Thu, 17 Oct 2024 14:27:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MzA+LFCIHVhZoFaWKkljWunoOH1fcTXA5jI/1KGeo9U=; b=JvqSOOJaNA9T5v0OzCOroWjQD1 1S2Bd5dgHTYDMGDAKamG3BUV5zxuZ+FOGeABuVo9dT2aX1v/4+dQtQA2gxhbpeyBSvXnXSLuqE87P wuVyDXKJv1OuEC6f/6aHSKILqqL+Cig8IVUDg+qg6otDwIhjK/qCKg0jl0NVjnbtv66Uo+VvuMDsU s7XtK9O+BVba1JQx2NUJnRLArQTQN1hEZWJu9QVm2RDEIwTPz/CZDE7I14baScDFedarkipv3dBq6 s54J8p0rSGLsg6Bm37zkOzquGLVcOLOtMTl1J5cpvpNIku0PYFLSQGQ+xgcUm1RfoORw3bJTO2TB4 luDH5ABg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1RTB-0000000F6lO-3ZpD; Thu, 17 Oct 2024 14:27:17 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1RRb-0000000F6b0-22ja for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 14:25:40 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6DF575C41BD; Thu, 17 Oct 2024 14:25:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E1C0C4CEC3; Thu, 17 Oct 2024 14:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729175138; bh=xElwNTcwgTU6ZVWLcduWdFTZHns1fNNdsPlKx1iQ0LI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GqKSloMKuDCznntWlXfHu+M1zuNlOn6KbuOj8vSfhEKlY3hsYa+a/EdKeuBeVu0ml rSgVYp59PlSjwsuC+eW65FH+ybcmhDuiWnDnZEeDSZtVuDquM+deOYLfZ2pEk39+U2 DMqvMrcQtTwbdMrxPTNV8Q0sv8FkKNqTs+tuf+Jsp000KyZdfcKAmdLyXs3iKYLfAy k6+PQ+5kIlZPeKnKsVAXe9iap6JZ4fByx/cayBjwtw27GNxa3YBe/8nX7VCHMJdaCX Jws11WFyUwCtmPM6vFs+C63pCGbLLzLZOHo5rKoxgkT2SDCXrpuHANt0QrMdyMMS99 uQNARasiBpwYQ== Date: Thu, 17 Oct 2024 15:25:33 +0100 From: Simon Horman To: Abhishek Chauhan Cc: Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Andrew Halaney , Ong@qualcomm.com, Boon Leong , Mohammad Athari Bin Ismail , Wong Vee Khee , Tan Tee Min , Jon Hunter , kernel@quicinc.com Subject: Re: [PATCH net-next v2] net: stmmac: Programming sequence for VLAN packets with split header Message-ID: <20241017142533.GS1697@kernel.org> References: <20241016234313.3992214-1-quic_abchauha@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241016234313.3992214-1-quic_abchauha@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241017_072539_635480_73575854 X-CRM114-Status: GOOD ( 20.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 16, 2024 at 04:43:13PM -0700, Abhishek Chauhan wrote: > Currently reset state configuration of split header works fine for > non-tagged packets and we see no corruption in payload of any size > > We need additional programming sequence with reset configuration to > handle VLAN tagged packets to avoid corruption in payload for packets > of size greater than 256 bytes. > > Without this change ping application complains about corruption > in payload when the size of the VLAN packet exceeds 256 bytes. > > With this change tagged and non-tagged packets of any size works fine > and there is no corruption seen. > > Current configuration which has the issue for VLAN packet > ---------------------------------------------------------- > > Split happens at the position at Layer 3 header > |MAC-DA|MAC-SA|Vlan Tag|Ether type|IP header|IP data|Rest of the payload| > 2 bytes ^ > | > > With the fix we are making sure that the split happens now at > Layer 2 which is end of ethernet header and start of IP payload > > Ip traffic split > ----------------- > > Bits which take care of this are SPLM and SPLOFST > SPLM = Split mode is set to Layer 2 > SPLOFST = These bits indicate the value of offset from the beginning > of Length/Type field at which header split should take place when the > appropriate SPLM is selected. Reset value is 2bytes. > > Un-tagged data (without VLAN) > |MAC-DA|MAC-SA|Ether type|IP header|IP data|Rest of the payload| > 2bytes ^ > | > > Tagged data (with VLAN) > |MAC-DA|MAC-SA|VLAN Tag|Ether type|IP header|IP data|Rest of the payload| > 2bytes ^ > | > > Non-IP traffic split such AV packet > ------------------------------------ > > Bits which take care of this are > SAVE = Split AV Enable > SAVO = Split AV Offset, similar to SPLOFST but this is for AVTP > packets. > > |Preamble|MAC-DA|MAC-SA|VLAN tag|Ether type|IEEE 1722 payload|CRC| > 2bytes ^ > | > > Signed-off-by: Abhishek Chauhan > --- > Changes since v1 > - took care of comments from Simon on FIELD_PREP > - explained the details of l2 and l3 split as requested by Andrew > - Added folks from intel and Nvidia who disabled split header > need to check if they faced similar issues and if this fix > can help them too. > > Changes since v0 > - The reason for posting it on net-next is to enable this new feature. Reviewed-by: Simon Horman