[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM5PR0401MB25618716FACFE3DA3A21D5F696160@AM5PR0401MB2561.eurprd04.prod.outlook.com>
Date: Fri, 19 Aug 2016 21:24:30 +0000
From: Claudiu Manoil <claudiu.manoil@....com>
To: Andrew Lunn <andrew@...n.ch>
CC: Zefir Kurtisi <zefir.kurtisi@...atec.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"claudiu.manoil@...escale.com" <claudiu.manoil@...escale.com>
Subject: Re: [PATCH] gianfar: prevent fragmentation in DSA environments
Hi Andrew,
From: Andrew Lunn <andrew@...n.ch>
Sent: Friday, August 19, 2016 7:39 PM
To: Claudiu Manoil
Cc: Zefir Kurtisi; netdev@...r.kernel.org; claudiu.manoil@...escale.com
Subject: Re: [PATCH] gianfar: prevent fragmentation in DSA environments
> >> -#define GFAR_RXB_SIZE 1536
> >> +/* prevent fragmenation by HW in DSA environments */
> >> +#define GFAR_RXB_SIZE (1536 + RXBUF_ALIGNMENT)
> >
> >Hi Zefir
> >
> >Using RXBUF_ALIGNMENT suggests this has something to do with
> >alignment, not extra headers.
> >
> >How about
> >
> >/* Prevent fragmenation by HW when using extra headers like DSA */
> >#define GFAR_RXB_SIZE (1536 + 8)
> >
>
> MRBL (Maximum receive buffer length) must be multiple of 64.
> Please consult de hardware documentation at least before prosing
> changes to the driver.
Hi Claudiu
Thanks for pointing this out. This makes RXBUF_ALIGNMENT even worse
for understabability, since you say multiples of 64 is important, not
alignment.
How about
/* Prevent fragmentation by HW when using extra headers like DSA,
while respecting the multiple of 64 requirement. */
#define GFAR_RXB_SIZE roundup(1536 + 8, 64)
[Claudiu]
Nice improvement.
But what's so special about 8? I thought only 4 bytes were missing :)
At least 1536 is the default size of the MRBLR register, as specified
in the h/w ref manual. Is there some recommended standard size
to accommodate most (if not all) headers, to refer to?
Powered by blists - more mailing lists