Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2919216pxu; Sun, 29 Nov 2020 09:01:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvZHwNrQbMGFjNXued1L13zg2hUuBAK68IljoICn03eIQYJnqZJ2HvL7ChP7PmSknmPdGY X-Received: by 2002:a17:906:1f44:: with SMTP id d4mr9314227ejk.368.1606669261706; Sun, 29 Nov 2020 09:01:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606669261; cv=none; d=google.com; s=arc-20160816; b=vQok1mlcetETN+FifBolJReAlTJJKB2eiojmHcQ5q9PVJw4hU8jOAjESs12Yt5tp8g PIPa7tX8PekUe7Mm5i9pNUXeB+bAYQBGJK1Y84pNCKPjfHb0GUE3nDOgA9/+elyjyU1k Y2QoBNqNCl9nlI9IBNUl6d1zrnYxyRbPKvH/shOZZoKNlqReRGSknRFU0lh11w+YIBQ/ Ix26fcyv3jTZe/GIb2iTRG6/kabarrfA1SwoDAqmm+QNlB30QoOV5mMF1ammIzwpaXny gAMsTK1uS4E7Y1P3vfIh0I3rpb3Kp4w3W73uh3nO34M6w+GknZ+V+aTBYVYJCayxoYWI xRQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=19tT/fBYkuLZ8ZiQCC7dskGsa+jL1fCF2E9xyNKsYKw=; b=Muh113h5NvUNzTwYoxJ7/R8RD9t08k3ZuYJ0MfjboZ/kF6pbXV0VrdzxWX4YgwAPtV 0QWsulrP4GnntMElRZ4eUQ/T6K7kgGPWTVZWSpoodO6+eo9xM1UmLcL4W6GFTtQd6ACL BvHJxYrpraoy8PKiGjyCQ5DGvmJXLcqjSbuGxcoIW/lGgMZP4RwwiPY5IJQ3VWTGUCXz j8WiPEQzbRXbUxundDn7LTfmZlnXUwEwqWNlT/v8441Xp1qV19NSPCmJcGTjbDRoOKBz 0ZbBZRDJzRHNx3wJv1X5tSfzn+FF2MZwMFcxHJFQOIaslLn+s4eGcpFcn7tjmuLJD152 HVbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si9052697edr.472.2020.11.29.09.00.39; Sun, 29 Nov 2020 09:01:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728023AbgK2Q5N (ORCPT + 99 others); Sun, 29 Nov 2020 11:57:13 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:55458 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726470AbgK2Q5N (ORCPT ); Sun, 29 Nov 2020 11:57:13 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kjPzv-009NGP-PM; Sun, 29 Nov 2020 17:56:27 +0100 Date: Sun, 29 Nov 2020 17:56:27 +0100 From: Andrew Lunn To: Jean Pihet Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ryan Barnett , Conrad Ratschan , Hugo Cornelis , Arnout Vandecappelle Subject: Re: [PATCH 1/2] net: dsa: ksz: pad frame to 64 bytes for transmission Message-ID: <20201129165627.GA2234159@lunn.ch> References: <20201129102400.157786-1-jean.pihet@newoldbits.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201129102400.157786-1-jean.pihet@newoldbits.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 29, 2020 at 11:23:59AM +0100, Jean Pihet wrote: > Some ethernet controllers (e.g. TI CPSW) pad the frames to a minimum > of 64 bytes before the FCS is appended. This causes an issue with the > KSZ tail tag which could not be the last byte before the FCS. > Solve this by padding the frame to 64 bytes minus the tail tag size, > before the tail tag is added and the frame is passed for transmission. Hi Jean what tree is this based on? Have you seen commit 88fda8eefd9a7a7175bf4dad1d02cc0840581111 Author: Christian Eggers Date: Sun Nov 1 21:16:10 2020 +0200 net: dsa: tag_ksz: don't allocate additional memory for padding/tagging The caller (dsa_slave_xmit) guarantees that the frame length is at least ETH_ZLEN and that enough memory for tail tagging is available.