Messages in this thread | | | Date | Tue, 7 Dec 2021 20:54:48 -0800 | From | Jakub Kicinski <> | Subject | Re: [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?
> +} > +
| |