Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2394988imu; Thu, 29 Nov 2018 04:25:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/VLj1zB5ruA2M47BvmtWlysDHlRbcd1JBjMGyAz7EnYVdQhnDKeDC6MTh5ADi/vmB7aqput X-Received: by 2002:a62:a99:: with SMTP id 25mr1165282pfk.121.1543494337299; Thu, 29 Nov 2018 04:25:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543494337; cv=none; d=google.com; s=arc-20160816; b=mnwjqW5wkSrog4d6MP0XcS3hsL93BDyRjMVz3RA8nvAB0GBqeJSIsF69M56evYRCR7 C/lq26bOiziZUynZMtQ4N/GRcaBoduhgR8ZQ/mWJ5lAhqct1FrPCFkbjmV+FXOmrfMbp jzTgkY7D5ikdhArHro11hH9Q7zU86nlovS7B4E9WgSNYzk4mNwSghJiKwdtQwnW4aRsO t4mHxYroBF587TxggVYCBYxFEAczZgkCQiOLilbk1p24Y/GolRCbUohwZPK97lw5hM1w qIYPrT+qlLUVKCEme8vWiNOYeBu6VFK2lGlFhnyS+ffGKYcGgwLicC2wmgfLq6LioL8V ZLlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=ThXt5GqHFcK7FUJ6UzwAl1keiuMDCVSNFipV3dz3VBA=; b=RbavtlPj83Nhr5QAFSZc4qsw6Fc5+9SUdRGGi7y76b4Gs/1CxVtR02wy4fujP31P41 h33+FI2Ua3iyvaYetBlaCpi/xyrB5UjR5XBwzWq3++39Pk0ZbGyRG0nyUVwYz3OeMWZ6 m55nAWTNENL7EmPd7lCrT3Ci+L7ahBMIRQvvW3i4uQsNTrG8o/viO07N2m/qbwN/OmcD QuxtXzLe3E3qchOT1mDNOiTtKOdo03ZzCLVCvuiWtflbA1xDygmdYXdQHw13xecMrrnL LR37QxzBoHTB22QiZx69MknzUmX7jYq5nArsNweODToipq1qWi48Yn3M8bM/yesEO5ty vG5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bh5si1862302plb.42.2018.11.29.04.25.21; Thu, 29 Nov 2018 04:25:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728181AbeK2X3r convert rfc822-to-8bit (ORCPT + 99 others); Thu, 29 Nov 2018 18:29:47 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:44386 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbeK2X3r (ORCPT ); Thu, 29 Nov 2018 18:29:47 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-198-1Dk7LxSPOC2yNA2kHpdvhw-1; Thu, 29 Nov 2018 12:24:32 +0000 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b::d117) by AcuMS.aculab.com (fd9f:af1c:a25b::d117) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 29 Nov 2018 12:24:41 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Thu, 29 Nov 2018 12:24:41 +0000 From: David Laight To: 'Grygorii Strashko' , "David S. Miller" , "netdev@vger.kernel.org" CC: Sekhar Nori , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" Subject: RE: [PATCH] net: ethernet: ti: cpsw: allow to configure min tx packet size Thread-Topic: [PATCH] net: ethernet: ti: cpsw: allow to configure min tx packet size Thread-Index: AQHUhRiwPY4w06ZY2U+34hVb39ZHZqVmrw+A Date: Thu, 29 Nov 2018 12:24:41 +0000 Message-ID: <59c91a27bb5b473fa5e1139016d3d825@AcuMS.aculab.com> References: <20181125234315.28313-1-grygorii.strashko@ti.com> In-Reply-To: <20181125234315.28313-1-grygorii.strashko@ti.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: 1Dk7LxSPOC2yNA2kHpdvhw-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Grygorii Strashko > Sent: 25 November 2018 23:43 > > For proper VLAN packets forwarding CPSW driver uses min tx packet size of > 64bytes (VLAN_ETH_ZLEN, excluding ETH_FCS) which was corrected by > commit 9421c9015047 ("net: ethernet: ti: cpsw: fix min eth packet size"). > > Unfortunately, this breaks some industrial automation protocols, as > reported by TI customers [1], which can work only with min TX packet size > from 60 byte (ecluding FCS). VLAN packets have the same minimal size as normal packets. So they should (probably must) only be padded to 64 bytes (including the CRC). Any hardware that strips a VLAN header would then need to add an extra 4 bytes of padding. You can't assume that padding that makes an ethernet frame be longer than 64 bytes (inc CRC) will be ignored by the receiving system. So whatever make you think that 68 bytes was required is itself broken. While most IP implementations will ignore extra padding this isn't true of all protocols or implementations. Unfortunately the fact that it is silently ignored causes the bugs to be hidden. We've recently discovered that some configurations of a VM system cause all ethernet packets be padded to even length. And yes, it broke things.... One of the very early ethernet chipsets could only transmit even length packets - but I suspect they are all now in silicon heaven. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)