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>
Wed, 10 Jan 2024 16:16:53 +0000 (17:16 +0100)
commitf725e894b12380ecbe72c38efd10f7ce26cd2c87
treede2e182bc28599a64dffa09cadde6c17d7d36f5f
parent511e4a5796243b7c5ccc108966532b050f8f1e2c
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