This will enable second pass RQ and drop interrupt by default in mask configuration to avoid buffer leak possibilities during dev stop and interrupts to indicate drops if any.
Signed-off-by: Rahul Bhansali <rbhans...@marvell.com> --- drivers/common/cnxk/roc_features.h | 6 ++++++ drivers/common/cnxk/roc_nix_inl.c | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/common/cnxk/roc_features.h b/drivers/common/cnxk/roc_features.h index 3b512be132..6abb35c296 100644 --- a/drivers/common/cnxk/roc_features.h +++ b/drivers/common/cnxk/roc_features.h @@ -90,4 +90,10 @@ roc_feature_nix_has_rx_inject(void) return (roc_model_is_cn10ka_b0() || roc_model_is_cn10kb()); } +static inline bool +roc_feature_nix_has_second_pass_drop(void) +{ + return 0; +} + #endif diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c index 74a688abbd..a984ac56d9 100644 --- a/drivers/common/cnxk/roc_nix_inl.c +++ b/drivers/common/cnxk/roc_nix_inl.c @@ -734,6 +734,13 @@ nix_inl_rq_mask_cfg(struct roc_nix *roc_nix, bool enable) msk_req->rq_set.xqe_drop_ena = 0; msk_req->rq_set.spb_ena = 1; + if (!roc_feature_nix_has_second_pass_drop()) { + msk_req->rq_set.ena = 1; + msk_req->rq_set.rq_int_ena = 1; + msk_req->rq_mask.ena = 0; + msk_req->rq_mask.rq_int_ena = 0; + } + msk_req->rq_mask.len_ol3_dis = 0; msk_req->rq_mask.len_ol4_dis = 0; msk_req->rq_mask.len_il3_dis = 0; @@ -1467,7 +1474,7 @@ roc_nix_inl_rq_ena_dis(struct roc_nix *roc_nix, bool enable) if (!idev) return -EFAULT; - if (roc_feature_nix_has_inl_rq_mask()) { + if (roc_feature_nix_has_inl_rq_mask() && enable) { rc = nix_inl_rq_mask_cfg(roc_nix, enable); if (rc) { plt_err("Failed to get rq mask rc=%d", rc); -- 2.25.1