[PATCH net-next v2 3/5] TEST ONLY: lan743x: limit rx ring buffer size to 500 bytes

From: Sven Van Asbroeck
Date: Thu Feb 11 2021 - 12:19:27 EST


From: Sven Van Asbroeck <thesven73@xxxxxxxxx>

Signed-off-by: Sven Van Asbroeck <thesven73@xxxxxxxxx>
---

To: Bryan Whitehead <bryan.whitehead@xxxxxxxxxxxxx>
To: UNGLinuxDriver@xxxxxxxxxxxxx
To: "David S. Miller" <davem@xxxxxxxxxxxxx>
To: Jakub Kicinski <kuba@xxxxxxxxxx>
Cc: Andrew Lunn <andrew@xxxxxxx>
Cc: Alexey Denisov <rtgbnm@xxxxxxxxx>
Cc: Sergej Bauer <sbauer@xxxxxxxxxxx>
Cc: Tim Harvey <tharvey@xxxxxxxxxxxxx>
Cc: Anders Rønningen <anders@xxxxxxxxxxxxxxxxx>
Cc: Hillf Danton <hdanton@xxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Willem de Bruijn <willemdebruijn.kernel@xxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx

drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 36cc67c72851..90d49231494d 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -1973,7 +1973,7 @@ static int lan743x_rx_init_ring_element(struct lan743x_rx *rx, int index)
struct sk_buff *skb;
dma_addr_t dma_ptr;

- buffer_length = netdev->mtu + ETH_HLEN + 4 + RX_HEAD_PADDING;
+ buffer_length = 500 + ETH_HLEN + 4 + RX_HEAD_PADDING;

descriptor = &rx->ring_cpu_ptr[index];
buffer_info = &rx->buffer_info[index];
--
2.17.1