octeontx2-af: Set NIX link credits based on max LMAC
authorSunil Goutham <sgoutham@marvell.com>
Thu, 14 Jul 2022 05:35:55 +0000 (11:05 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Jul 2022 11:02:45 +0000 (12:02 +0100)
commit459f326e995ce6f02f3dc79ca5bc4e2abe33d156
treec3ac93feb94608df4f277ae4ae3489bcc5107fd8
parentda92e03c7fbf4dc6e1a4a030433c8c30946e6aa0
octeontx2-af: Set NIX link credits based on max LMAC

When number of LMACs active on a CGX/RPM are 3, then
current NIX link credit config based on per lmac fifo
length which inturn  is calculated as
'lmac_fifo_len = total_fifo_len / 3', is incorrect. In HW
one of the LMAC gets half of the FIFO and rest gets 1/4th.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Geetha Sowjanya <gakula@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/cgx.c
drivers/net/ethernet/marvell/octeontx2/af/lmac_common.h
drivers/net/ethernet/marvell/octeontx2/af/rpm.c
drivers/net/ethernet/marvell/octeontx2/af/rpm.h
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c