[v3,08/28] common/cnxk: disable CQ drop when inline inbound is enabled

Message ID 20211001134022.22700-9-ndabilpuram@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series net/cnxk: support for inline ipsec |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nithin Dabilpuram Oct. 1, 2021, 1:40 p.m. UTC
  Disable CQ drop when inline inbound is enabled. CQ drop
is not supported for second pass IPsec decrypted packets.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/roc_nix_queue.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
  

Patch

diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index 41e8f2c..41a1422 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -492,15 +492,20 @@  roc_nix_cq_init(struct roc_nix *roc_nix, struct roc_nix_cq *cq)
 		cq->drop_thresh = min_rx_drop;
 	} else {
 		cq->drop_thresh = NIX_CQ_THRESH_LEVEL;
-		cq_ctx->drop = cq->drop_thresh;
-		cq_ctx->drop_ena = 1;
+		/* Drop processing or red drop cannot be enabled due to
+		 * due to packets coming for second pass from CPT.
+		 */
+		if (!roc_nix_inl_inb_is_enabled(roc_nix)) {
+			cq_ctx->drop = cq->drop_thresh;
+			cq_ctx->drop_ena = 1;
+		}
 	}
 
 	/* TX pause frames enable flow ctrl on RX side */
 	if (nix->tx_pause) {
 		/* Single BPID is allocated for all rx channels for now */
 		cq_ctx->bpid = nix->bpid[0];
-		cq_ctx->bp = cq_ctx->drop;
+		cq_ctx->bp = cq->drop_thresh;
 		cq_ctx->bp_ena = 1;
 	}