Thread (4 messages) 4 messages, 2 authors, 2021-12-13

Re: [PATCH net v2] net: lantiq_xrx200: increase buffer reservation

flat view

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-12-08 04:55:00
Also in: lkml

On Mon,  6 Dec 2021 23:39:09 +0100 Aleksander Jan Bajkowski wrote:
quoted hunk ↗ jump to hunk
+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_.
quoted hunk ↗ jump to hunk
+}
+
+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?
+}
+
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help