]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: dsa: seville: the packet buffer is 2 megabits, not megabytes
authorMaxim Kochetkov <fido_max@inbox.ru>
Mon, 19 Oct 2020 05:06:25 +0000 (08:06 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:11:59 +0000 (10:11 +0100)
[ Upstream commit a15a6afb3bf9388eb83a4b876d3453f305fba909 ]

The VSC9953 Seville switch has 2 megabits of buffer split into 4360
words of 60 bytes each. 2048 * 1024 is 2 megabytes instead of 2 megabits.
2 megabits is (2048 / 8) * 1024 = 256 * 1024.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Fixes: a63ed92d217f ("net: dsa: seville: fix buffer size of the queue system")
Link: https://lore.kernel.org/r/20201019050625.21533-1-fido_max@inbox.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/ocelot/seville_vsc9953.c

index 9e9fd19e1d00cb27563d40c47840ec068f67bb1e..e2cd49eec0370ec49b80558ba7db26b715c46597 100644 (file)
@@ -1010,7 +1010,7 @@ static const struct felix_info seville_info_vsc9953 = {
        .vcap_is2_keys          = vsc9953_vcap_is2_keys,
        .vcap_is2_actions       = vsc9953_vcap_is2_actions,
        .vcap                   = vsc9953_vcap_props,
-       .shared_queue_sz        = 2048 * 1024,
+       .shared_queue_sz        = 256 * 1024,
        .num_mact_rows          = 2048,
        .num_ports              = 10,
        .mdio_bus_alloc         = vsc9953_mdio_bus_alloc,