lkml.org 
[lkml]   [2021]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net v2] net: lantiq_xrx200: increase buffer reservation
On Mon,  6 Dec 2021 23:39:09 +0100 Aleksander Jan Bajkowski wrote:
> +static int xrx200_max_frame_len(int mtu)
> +{
> + return VLAN_ETH_HLEN + mtu + ETH_FCS_LEN;

You sure the problem is not that this doesn't include ETH_HLEN?
MTU is the length of the L2 _payload_.

> +}
> +
> +static int xrx200_buffer_size(int mtu)
> +{
> + return round_up(xrx200_max_frame_len(mtu) - 1, 4 * XRX200_DMA_BURST_LEN);

Why the - 1 ? 🤔

For a frame size 101 => max_frame_len 109 you'll presumably want
the buffer to be 116, not 108?

> +}
> +

\
 
 \ /
  Last update: 2021-12-08 05:55    [W:0.095 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site