OSDN Git Service

octeontx2-af: cn10k: DWRR MTU configuration
authorSunil Goutham <sgoutham@marvell.com>
Fri, 30 Jul 2021 11:49:13 +0000 (17:19 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Aug 2021 09:47:12 +0000 (10:47 +0100)
commit76660df2b4a264519afef1936b5d848f62781ae5
treeb7491c9d744e4cc172e55e713cd42b1b463b1f0c
parentcfba3fb68960b4e1fb63b4e3d95970b4a4be8577
octeontx2-af: cn10k: DWRR MTU configuration

On OcteonTx2 DWRR quantum is directly configured into each of
the transmit scheduler queues. And PF/VF drivers were free to
config any value upto 2^24.

On CN10K, HW is modified, the quantum configuration at scheduler
queues is in terms of weight. And SW needs to setup a base DWRR MTU
at NIX_AF_DWRR_RPM_MTU / NIX_AF_DWRR_SDP_MTU. HW will do
'DWRR MTU * weight' to get the quantum. For LBK traffic, value
programmed into NIX_AF_DWRR_RPM_MTU register is considered as
DWRR MTU.

This patch programs a default DWRR MTU of 8192 into HW and also
provides a way to change this via devlink params.

Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/common.h
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h