This patch sets the watermark level for SDP output queues to send backpressure to NIX, when available Rx buffers fall below watermark.
Signed-off-by: Sathesh Edara <sed...@marvell.com> --- drivers/net/octeon_ep/cnxk_ep_vf.c | 7 ++++++- drivers/net/octeon_ep/otx_ep_common.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/octeon_ep/cnxk_ep_vf.c b/drivers/net/octeon_ep/cnxk_ep_vf.c index cadb4ecbf9..92c2d2ca5c 100644 --- a/drivers/net/octeon_ep/cnxk_ep_vf.c +++ b/drivers/net/octeon_ep/cnxk_ep_vf.c @@ -245,7 +245,12 @@ cnxk_ep_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no) } otx_ep_dbg("SDP_R[%d]_sent: %x", oq_no, rte_read32(droq->pkts_sent_reg)); - return 0; + + /* Set Watermark for backpressure */ + oct_ep_write64(OTX_EP_OQ_WMARK_MIN, + otx_ep->hw_addr + CNXK_EP_R_OUT_WMARK(oq_no)); + + return 0; } static int diff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h index 0bf5454a39..81d6857c52 100644 --- a/drivers/net/octeon_ep/otx_ep_common.h +++ b/drivers/net/octeon_ep/otx_ep_common.h @@ -23,6 +23,7 @@ #define OTX_EP_MAX_OQ_DESCRIPTORS (8192) #define OTX_EP_OQ_BUF_SIZE (2048) #define OTX_EP_MIN_RX_BUF_SIZE (64) +#define OTX_EP_OQ_WMARK_MIN (256) #define OTX_EP_OQ_INFOPTR_MODE (0) #define OTX_EP_OQ_REFIL_THRESHOLD (16) -- 2.31.1