OSDN Git Service

octeontx2-af: Interface backpressure configuration
authorGeetha sowjanya <gakula@marvell.com>
Mon, 2 Mar 2020 07:19:22 +0000 (12:49 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2020 19:08:51 +0000 (11:08 -0800)
commit27150bc4286cf8f39bdcba1b797971d09642871b
tree073a74372470bd8d782c1f8dc4d6f79376d4c0be
parent48938b1e50270047566025bdc43700e71cc5e6c5
octeontx2-af: Interface backpressure configuration

Each of the interface receive channels can be backpressured by
resources upon exhaustion or reaching configured threshold levels.
Resources here are receive buffer queues (Auras) and pkt notification
descriptor queues (CQs). Resources and interface channels are mapped
using backpressure IDs (BPIDs).

HW supports upto 512 BPIDs, this patch divides these BPIDs statically
across CGX/LBK/SDP interfaces as follows.
BPIDs 0 - 191 are mapped to LMAC channels, 16 per LMAC.
BPIDs 192 - 255 are mapped to LBK channels.
BPIDs 256 - 511 are mapped to SDP channels.
Also did the needed basic configuration of BPIDs.

Added mbox handlers with which a PF device can request for a BPID which
it will use to configure Auras and CQs.

Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/mbox.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c