From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DB389A04DD; Tue, 20 Oct 2020 23:57:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 854FEACB8; Tue, 20 Oct 2020 23:56:00 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id CE3F4AC9C for ; Tue, 20 Oct 2020 23:55:49 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id n9so158811pgt.8 for ; Tue, 20 Oct 2020 14:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=tS/w1gPYCIdIPKMrvWYleFb2IhwN1OGCSiiJplunMcY=; b=e0z6wvU1uLIcb2Lq+n2ZNy1BjtFKp4s3O61cadGIcSdecuSAoeIPwSjxSTOW7Yy5fF BQ9N3COu8mu76Xx5+0TF2e/1WckA+nz1MoqnFMby4K6Js5dS/guxXPR1A9idpehmXzTD IASj+65wN4UMAqO6sXoBMAypBXi0i6A98EquY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=tS/w1gPYCIdIPKMrvWYleFb2IhwN1OGCSiiJplunMcY=; b=eM3mJ928SexhKaGD6KtAjfBHgQZmjQpZk7glhRoECnhlrAWtzEqyS53gQbpQ2p7pGn grfkBCclDJiL19VVS5h10iPAsN3eb1tvgvZkqlBT1zXX8PCBIQm0Nkl+AORilZ1L8QTB BtdDNBPMlTrymcsNUMrTsFo8op+yHuwsPZpdnjgefh9lj96HmT2kgviZUEcQ519mwGMl w2UK7KoH14mo7cQg4jhkxgUcBRiG32VxoIV+TPpIXpxxAiuUDi36OoPAsKQhCGY1Ftpd Ccnii6XZtslz0B8JfplRblv209QqbHLWqkESKxCRi8Oeozi3f1hek3peXgzc/J8N3Djr 9NOQ== X-Gm-Message-State: AOAM53369eGCGeHA1is44BxYsSG4e+MkdXj2nk/vAjZezBI2CNI7F7If bHOz9oL0gRIsh5tuWn/v2C3R6/sM3OUP4+oyBpoWZ/53ycypNAn7+thdiBPg5T+iLoB6s5sZjtH H61Ugs0vOwXCBZ7XtMJvTwmeK3UlMSHFFfA6BUsWTQ7GTS5dJjDKzU2u+nf/B0SP5fw== X-Google-Smtp-Source: ABdhPJzikF3ZOUT7/RB5kd8rsTnur58RtKMs1zZ5BmB6j8zmAQyYk6uUAzSU/35qpj6oTagDZq/jPQ== X-Received: by 2002:a65:4489:: with SMTP id l9mr281558pgq.393.1603230947646; Tue, 20 Oct 2020 14:55:47 -0700 (PDT) Received: from localhost.localdomain ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id e6sm24113pfn.190.2020.10.20.14.55.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2020 14:55:47 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: Peter Spreadborough , Farah Smith , Randy Schacher Date: Tue, 20 Oct 2020 14:55:31 -0700 Message-Id: <20201020215538.59242-5-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20201020215538.59242-1-ajit.khaparde@broadcom.com> References: <1602916089-18576-1-git-send-email-venkatkumar.duvvuru@broadcom.com> <20201020215538.59242-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] [PATCH v2 04/11] net/bnxt: update ULP resource counts X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Peter Spreadborough - Update the SR ULP requested resource counts to reflect those available after AFM resources are accounted for. - Add build option to select either 2 or 4 slot EM entries. The default is 4 slot entries. Signed-off-by: Peter Spreadborough Signed-off-by: Farah Smith Reviewed-by: Randy Schacher Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_core/tf_session.h | 16 +++++------ drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 40 +++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/net/bnxt/tf_core/tf_session.h b/drivers/net/bnxt/tf_core/tf_session.h index aa7a27877..6a5c89403 100644 --- a/drivers/net/bnxt/tf_core/tf_session.h +++ b/drivers/net/bnxt/tf_core/tf_session.h @@ -33,16 +33,16 @@ #define TF_SESSION_ID_INVALID 0xFFFFFFFF /** Invalid Session ID define */ /** - * Number of EM entries. Static for now will be removed - * when parameter added at a later date. At this stage we - * are using fixed size entries so that each stack entry - * represents 4 RT (f/n)blocks. So we take the total block - * allocation for truflow and divide that by 4. + * At this stage we are using fixed size entries so that each + * stack entry represents either 2 or 4 RT (f/n)blocks. So we + * take the total block allocation for truflow and divide that + * by either 2 or 4. */ -#define TF_SESSION_TOTAL_FN_BLOCKS (1024 * 8) /* 8K blocks */ +#ifdef TF_EM_ENTRY_IPV4_ONLY +#define TF_SESSION_EM_ENTRY_SIZE 2 /* 2 blocks per entry */ +#else #define TF_SESSION_EM_ENTRY_SIZE 4 /* 4 blocks per entry */ -#define TF_SESSION_EM_POOL_SIZE \ - (TF_SESSION_TOTAL_FN_BLOCKS / TF_SESSION_EM_ENTRY_SIZE) +#endif /** * Session diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c index b22929a63..d753b5af9 100644 --- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c +++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c @@ -153,11 +153,11 @@ bnxt_ulp_tf_session_resources_get(struct bnxt *bp, case BNXT_ULP_DEVICE_ID_STINGRAY: /** RX **/ /* Identifiers */ - res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH] = 100; + res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH] = 315; res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_L2_CTXT_LOW] = 6; - res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_WC_PROF] = 10; - res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_PROF_FUNC] = 10; - res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_EM_PROF] = 10; + res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_WC_PROF] = 192; + res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_PROF_FUNC] = 64; + res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_EM_PROF] = 192; /* Table Types */ res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_FULL_ACT_RECORD] = 8192; @@ -170,28 +170,28 @@ bnxt_ulp_tf_session_resources_get(struct bnxt *bp, /* TCAMs */ res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] = - 100; + 315; res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW] = 6; - res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM] = 100; - res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_WC_TCAM] = 0; + res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM] = 960; + res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_WC_TCAM] = 112; /* EM */ - res->em_cnt[TF_DIR_RX].cnt[TF_EM_TBL_TYPE_EM_RECORD] = 13168; + res->em_cnt[TF_DIR_RX].cnt[TF_EM_TBL_TYPE_EM_RECORD] = 13200; /* EEM */ res->em_cnt[TF_DIR_RX].cnt[TF_EM_TBL_TYPE_TBL_SCOPE] = 1; /* SP */ - res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_SP_SMAC] = 255; + res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_SP_SMAC] = 256; /** TX **/ /* Identifiers */ - res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH] = 100; - res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_L2_CTXT_LOW] = 100; - res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_WC_PROF] = 10; - res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_PROF_FUNC] = 10; - res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_EM_PROF] = 10; + res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH] = 292; + res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_L2_CTXT_LOW] = 127; + res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_WC_PROF] = 192; + res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_PROF_FUNC] = 64; + res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_EM_PROF] = 192; /* Table Types */ res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_FULL_ACT_RECORD] = 8192; @@ -199,17 +199,17 @@ bnxt_ulp_tf_session_resources_get(struct bnxt *bp, res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4] = 1023; /* ENCAP */ - res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_64B] = 511; + res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_64B] = 367; res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_16B] = 223; res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_8B] = 255; /* TCAMs */ res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] = - 100; + 292; res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW] = - 100; - res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM] = 100; - res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_WC_TCAM] = 0; + 127; + res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM] = 960; + res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_WC_TCAM] = 928; /* EM */ res->em_cnt[TF_DIR_TX].cnt[TF_EM_TBL_TYPE_EM_RECORD] = 15232; @@ -219,7 +219,7 @@ bnxt_ulp_tf_session_resources_get(struct bnxt *bp, /* SP */ res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV4] = 488; - res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV6] = 511; + res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV6] = 512; break; default: return -EINVAL; -- 2.21.1 (Apple Git-122.3)