net: mvpp2: add BM protection underrun feature support
authorStefan Chulski <stefanc@marvell.com>
Thu, 11 Feb 2021 10:48:59 +0000 (12:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2021 22:50:24 +0000 (14:50 -0800)
commiteb30b269549a0cd27c3b9a67676f6a39c77fcfa0
treeca39e4be855771a13b54464b0a334adac5076a84
parent76055831cf84b8fc202f7e5c6b6639817832eef3
net: mvpp2: add BM protection underrun feature support

The PP2v23 hardware supports a feature allowing to double the
size of BPPI by decreasing number of pools from 16 to 8.
Increasing of BPPI size protect BM drop from BPPI underrun.
Underrun could occurred due to stress on DDR and as result slow buffer
transition from BPPE to BPPI.
New BPPI threshold recommended by spec is:
BPPI low threshold - 640 buffers
BPPI high threshold - 832 buffers
Supported only in PPv23.

Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Acked-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2.h
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c