From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1A4E1EB4B6 for ; Fri, 2 Aug 2024 08:10:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.85.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722586252; cv=none; b=iJ7sYPw9ecVzJ32GvKnckJMzQnrRB5HuseJcNE+GDXdt4Y6GpmbvqltVAwAXzcBFa3HpK0IdqwQmmpq9+je4xL1cJMBNlH/GXtYPZNf/NHmtaX2KzEMcIFt4TnkCzX7nWn/nAhw9uFMN8qzGFP9XrdgFpXe1kbWMi9hXabP4Oho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722586252; c=relaxed/simple; bh=CuMgTyhRiXFGu/Wk31+CzmYjkWa9oQ3VXwtvzg+PBI0=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=ZoJxufkkfI8ebOvQ/cOqDbK+okfOBSx8AT8WO8ts0Kr+4qd4aREpy0t+u0asFG7HlUwJ/ajDSjZZozx1Iv2PjZ+FHVzvP94Nds5XnYFRg9L69ZGZx3RygNM3X157JerSaIxmnmFXnBcM7jLUwvAWNXDaLI/20nMhHLTp2/DAjUM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.85.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-80-s7rDkYwSMoizWbYGjzwnMg-1; Fri, 02 Aug 2024 09:10:42 +0100 X-MC-Unique: s7rDkYwSMoizWbYGjzwnMg-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 2 Aug 2024 09:10:02 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Fri, 2 Aug 2024 09:10:02 +0100 From: David Laight To: 'Simon Horman' , Herve Codina CC: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christophe Leroy , "Andy Shevchenko" , "netdev@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , Thomas Petazzoni , "stable@vger.kernel.org" Subject: RE: [PATCH net v1] net: wan: fsl_qmc_hdlc: Discard received CRC Thread-Topic: [PATCH net v1] net: wan: fsl_qmc_hdlc: Discard received CRC Thread-Index: AQHa4yXTTA/3x7b/50KM7uMtkj8Gw7ITnhqw Date: Fri, 2 Aug 2024 08:10:02 +0000 Message-ID: <7659191688194f099cba22cc367c4eda@AcuMS.aculab.com> References: <20240730063133.179598-1-herve.codina@bootlin.com> <20240731084443.GL1967603@kernel.org> In-Reply-To: <20240731084443.GL1967603@kernel.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Simon Horman > Sent: 31 July 2024 09:45 >=20 > On Tue, Jul 30, 2024 at 08:31:33AM +0200, Herve Codina wrote: > > Received frame from QMC contains the CRC. > > Upper layers don't need this CRC and tcpdump mentioned trailing junk > > data due to this CRC presence. > > > > As some other HDLC driver, simply discard this CRC. >=20 > It might be nice to specifically site an example. > But yes, I see this pattern in hdlc_rx_done(). Pretty much the only reason you'd want the received CRC is to do error recovery assuming a single short error burst. Not that I've ever seen a driver contain the required code. 'Back of envelope' calculation: 32bit crc, 2kbyte frame, so 18bits of crc per data bit, sqrt for 'birthday paradox' - I bet you can recover 8-bit error bursts. =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)