From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1ABEC42B8C; Wed, 24 May 2023 12:07:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E774942D74; Wed, 24 May 2023 12:05:34 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id C7F0E42FC0 for ; Wed, 24 May 2023 12:05:33 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34O4qD7O025070 for ; Wed, 24 May 2023 03:05:33 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=Tm0cRwuvTu4luIMZK/UI9VM+8EHSzQvGOQfLGbFVyDk=; b=SqDeOUBTk3AU2Bqj+/rPiPEf2RCdQXelAU9rs5Ha55PCbvWJ45fNu8LHL05p2+KUqFf7 BDRJIj0nrWee0Oq71xjEw68DOHIouNAg7p1oBAZEN+0Y+a0al15D8r6QNqxpdJDFZ2gM 9vOUmTqIGYudRbNSgiVuNUNNmT5xMVf39YoJGTnDL05y/Z7uNeK8dbAqaQol6urg2rCZ 7VaNSa1RWbEnxl7MR/eTruvcwzk6iFtQ2FkpTWu2v2KK4nRo6QdsS97M8Sgu1+Rf0xQd cvF9QR5yvwMscUZDe3phSVKoCUXLoUzLoNTat+EalssXBKWtqCNTAvmNRRecseAda4Aa NQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qsbxes2ww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 24 May 2023 03:05:32 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 24 May 2023 03:05:31 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 24 May 2023 03:05:31 -0700 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id E3AA93F70A8; Wed, 24 May 2023 03:05:28 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Kumar Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Subject: [PATCH v2 26/32] common/cnxk: skip CGX promisc mode with NPC exact match Date: Wed, 24 May 2023 15:34:01 +0530 Message-ID: <20230524100407.3796139-26-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230524100407.3796139-1-ndabilpuram@marvell.com> References: <20230411091144.1087887-1-ndabilpuram@marvell.com> <20230524100407.3796139-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: dr97O8ay6_H-KIUnPHkmVjK6T5ITejfB X-Proofpoint-GUID: dr97O8ay6_H-KIUnPHkmVjK6T5ITejfB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-24_05,2023-05-23_02,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When NPC exact match is enabled, we cannot use CGX promisc mode as CGX filtering is permanently disabled. Hence skip calling it to avoid mbox errors. Signed-off-by: Nithin Dabilpuram Signed-off-by: Kiran Kumar K --- drivers/common/cnxk/roc_nix_mac.c | 8 ++++++++ drivers/common/cnxk/roc_nix_priv.h | 1 + drivers/common/cnxk/roc_npc.c | 1 + drivers/common/cnxk/roc_npc_mcam.c | 1 + drivers/common/cnxk/roc_npc_priv.h | 1 + 5 files changed, 12 insertions(+) diff --git a/drivers/common/cnxk/roc_nix_mac.c b/drivers/common/cnxk/roc_nix_mac.c index ac30fb52d1..754d75ac73 100644 --- a/drivers/common/cnxk/roc_nix_mac.c +++ b/drivers/common/cnxk/roc_nix_mac.c @@ -201,6 +201,14 @@ roc_nix_mac_promisc_mode_enable(struct roc_nix *roc_nix, int enable) goto exit; } + /* Skip CGX promisc toggling if NPC exact match is enabled as + * CGX filtering is disabled permanently. + */ + if (nix->exact_match_ena) { + rc = 0; + goto exit; + } + if (enable) mbox_alloc_msg_cgx_promisc_enable(mbox); else diff --git a/drivers/common/cnxk/roc_nix_priv.h b/drivers/common/cnxk/roc_nix_priv.h index 6872630dc8..ea4211dfed 100644 --- a/drivers/common/cnxk/roc_nix_priv.h +++ b/drivers/common/cnxk/roc_nix_priv.h @@ -130,6 +130,7 @@ struct nix { struct nix_qint *cints_mem; uint8_t configured_qints; uint8_t configured_cints; + uint8_t exact_match_ena; struct roc_nix_rq **rqs; struct roc_nix_sq **sqs; uint16_t vwqe_interval; diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c index d556b4c3a5..1d74ea5a1e 100644 --- a/drivers/common/cnxk/roc_npc.c +++ b/drivers/common/cnxk/roc_npc.c @@ -272,6 +272,7 @@ roc_npc_init(struct roc_npc *roc_npc) roc_npc->rx_parse_nibble = npc->keyx_supp_nmask[NPC_MCAM_RX]; npc->mcam_entries = npc_mcam_tot_entries() >> npc->keyw[NPC_MCAM_RX]; + nix->exact_match_ena = npc->exact_match_ena; /* Free, free_rev, live and live_rev entries */ bmap_sz = plt_bitmap_get_memory_footprint(npc->mcam_entries); diff --git a/drivers/common/cnxk/roc_npc_mcam.c b/drivers/common/cnxk/roc_npc_mcam.c index 72892be300..46f0b9c33d 100644 --- a/drivers/common/cnxk/roc_npc_mcam.c +++ b/drivers/common/cnxk/roc_npc_mcam.c @@ -542,6 +542,7 @@ npc_mcam_fetch_kex_cfg(struct npc *npc) mbox_memcpy((char *)npc->profile_name, kex_rsp->mkex_pfl_name, MKEX_NAME_LEN); + npc->exact_match_ena = (kex_rsp->rx_keyx_cfg >> 40) & 0xF; npc_mcam_process_mkex_cfg(npc, kex_rsp); done: diff --git a/drivers/common/cnxk/roc_npc_priv.h b/drivers/common/cnxk/roc_npc_priv.h index 714dcb09c9..82c2d0aa06 100644 --- a/drivers/common/cnxk/roc_npc_priv.h +++ b/drivers/common/cnxk/roc_npc_priv.h @@ -403,6 +403,7 @@ struct npc { struct npc_prio_flow_list_head *prio_flow_list; struct plt_bitmap *rss_grp_entries; struct npc_flow_list ipsec_list; + uint8_t exact_match_ena; }; #define NPC_HASH_FIELD_LEN 16 -- 2.25.1