From patchwork Fri Jun 18 10:36:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 94417 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C927A0C46; Fri, 18 Jun 2021 12:40:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4003A40142; Fri, 18 Jun 2021 12:39:44 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 9ED2C410F5 for ; Fri, 18 Jun 2021 12:39:42 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15IAZPAQ003484 for ; Fri, 18 Jun 2021 03:39:42 -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-type; s=pfpt0220; bh=mnsL+ODcghOvFFNXCmB2vUM5/a7TLIgdU2b/8MfwyrI=; b=RLXg8jZuX7LjPFUBPpqerf1L0XhTl2fYP5QhlYUNELxe9v6g5R52HBMJEQne3otyO/mk 74DN7zeAi0Vl8UldrV4BQ6kkm94g/UTZiXs0cGSkQLxGeYYowtvQvtaAt7lqCNgSEK2D 5NU72vMM2OENWdHVcY1N/9ObjRDiNmID9B7za/lyMhC/vo5/OONJm7dXB25sI4lMoj+l XM6b85VFoLapZCYWSd8o9i/na7eXe4wEtU3VKvtR8j6GvA01DMjkwR2zoxxwoz6nJPyG lZEjF2mkuJw32ul9kk0QZLAQCpt/eWPejw/Qyf1jcRjREA52a1deYc5SOmyHa2N4KU6M 7Q== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 397udry7dg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 18 Jun 2021 03:39:42 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 18 Jun 2021 03:39:40 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 18 Jun 2021 03:39:40 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 439025B6967; Fri, 18 Jun 2021 03:38:53 -0700 (PDT) From: Nithin Dabilpuram To: CC: , , , , , , , Date: Fri, 18 Jun 2021 16:06:47 +0530 Message-ID: <20210618103741.26526-9-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20210618103741.26526-1-ndabilpuram@marvell.com> References: <20210306153404.10781-1-ndabilpuram@marvell.com> <20210618103741.26526-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: U1D_AeRswdDBRO9NUKLunxhA6qKIJB4j X-Proofpoint-GUID: U1D_AeRswdDBRO9NUKLunxhA6qKIJB4j X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-18_04:2021-06-18, 2021-06-18 signatures=0 Subject: [dpdk-dev] [PATCH v3 08/62] common/cnxk: fix flow create on CN98xx 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 Sender: "dev" From: Satheesh Paul CN96xx and CN98xx have 4096 and 16384 MCAM entries respectively. Aligning the code with the same numbers. Fixes: a07f7ced436d ("common/cnxk: add NPC init and fini") Signed-off-by: Satheesh Paul --- drivers/common/cnxk/roc_model.h | 6 ++++++ drivers/common/cnxk/roc_npc.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/common/cnxk/roc_model.h b/drivers/common/cnxk/roc_model.h index fb774ac..d6ef459 100644 --- a/drivers/common/cnxk/roc_model.h +++ b/drivers/common/cnxk/roc_model.h @@ -88,6 +88,12 @@ roc_model_is_cn10k(void) } static inline uint64_t +roc_model_is_cn98xx(void) +{ + return (roc_model->flag & ROC_MODEL_CN98xx_A0); +} + +static inline uint64_t roc_model_is_cn96_A0(void) { return roc_model->flag & ROC_MODEL_CN96xx_A0; diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c index bb55f3d..8a76823 100644 --- a/drivers/common/cnxk/roc_npc.c +++ b/drivers/common/cnxk/roc_npc.c @@ -118,7 +118,7 @@ npc_mcam_tot_entries(void) /* FIXME: change to reading in AF from NPC_AF_CONST1/2 * MCAM_BANK_DEPTH(_EXT) * MCAM_BANKS */ - if (roc_model_is_cn10k()) + if (roc_model_is_cn10k() || roc_model_is_cn98xx()) return 16 * 1024; /* MCAM_BANKS = 4, BANK_DEPTH_EXT = 4096 */ else return 4 * 1024; /* MCAM_BANKS = 4, BANK_DEPTH_EXT = 1024 */