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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jan 2024 10:33:17 +0000 (10:33 +0000)
commita0d9528f6daf7fe8de217fa80a94d2989d2a57a7
tree21f859837989ca601b11007541efa5a083d9f753
parentcbc74fc025f905fca5154254b9d9acc0b09a8cf4
octeontx2-af: Always configure NIX TX link credits based on max frame size

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>
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c