]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
octeontx2-af: Always configure NIX TX link credits based on max frame size
authorNaveen Mamindlapalli <naveenm@marvell.com>
Tue, 2 Jan 2024 09:56:43 +0000 (15:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jan 2024 17:51:20 +0000 (18:51 +0100)
commit20fce91b4fa0135ec4168b3c025dd23622dd7b3b
treee9ac77b78b6ee5c3ecb59d1893ae2fa89a65e53c
parent6bbbcff3c798c361cce4f9ba21d13748a0794f01
octeontx2-af: Always configure NIX TX link credits based on max frame size

[ Upstream commit a0d9528f6daf7fe8de217fa80a94d2989d2a57a7 ]

Currently the NIX TX link credits are initialized based on the max frame
size that can be transmitted on a link but when the MTU is changed, the
NIX TX link credits are reprogrammed by the SW based on the new MTU value.
Since SMQ max packet length is programmed to max frame size by default,
there is a chance that NIX TX may stall while sending a max frame sized
packet on the link with insufficient credits to send the packet all at
once. This patch avoids stall issue by not changing the link credits
dynamically when the MTU is changed.

Fixes: 1c74b89171c3 ("octeontx2-af: Wait for TX link idle for credits change")
Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c