Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758203AbcK3QNL (ORCPT ); Wed, 30 Nov 2016 11:13:11 -0500 Received: from mail.neratec.com ([46.140.151.2]:21149 "EHLO mail.neratec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754358AbcK3QND (ORCPT ); Wed, 30 Nov 2016 11:13:03 -0500 X-Greylist: delayed 472 seconds by postgrey-1.27 at vger.kernel.org; Wed, 30 Nov 2016 11:13:03 EST Subject: Re: [patch net / RFC] net: fec: increase frame size limitation to actually available buffer To: Nikita Yushchenko , "David S. Miller" , Fugang Duan , Troy Kisky , Andrew Lunn , Eric Nelson , Philippe Reynes , Johannes Berg , netdev@vger.kernel.org References: <1480444528-30054-1-git-send-email-nikita.yoush@cogentembedded.com> Cc: Chris Healy , Fabio Estevam , linux-kernel@vger.kernel.org From: Zefir Kurtisi Message-ID: <05a7c0a7-b680-af75-963b-5cddeda7f2c4@neratec.com> Date: Wed, 30 Nov 2016 17:05:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1480444528-30054-1-git-send-email-nikita.yoush@cogentembedded.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 28 On 11/29/2016 07:35 PM, Nikita Yushchenko wrote: > Fec driver uses Rx buffers of 2k, but programs hardware to limit > incoming frames to 1522 bytes. This raises issues when FEC device > is used with DSA (since DSA tag can make frame larger), and also > disallows manual sending and receiving larger frames. > > This patch removes the limitation, allowing Rx size up to entire buffer. > At the same time possible Tx size is increased as well, because hardware > uses the same register field to limit Rx and Tx. > > Signed-off-by: Nikita Yushchenko > --- I recently did similar changes to the freescale/gianfar to prevent fragmentation of (E)DSA frames [1]. With the fragmentation kicking in, I noticed a bug in the scatter-gather logic which caused the frame-size of fragmented frames to be reported wrong [2]. Not sure if the fec driver has SG capabilities and if this issue also applies, you might want to double-check. Cheers, Zefir [1] http://marc.info/?l=linux-netdev&m=147187438313519&w=2 [2] http://marc.info/?l=linux-netdev&m=147187430213484&w=2