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 8263CA0518; Fri, 24 Jul 2020 07:36:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 273C21C1B2; Fri, 24 Jul 2020 07:33:59 +0200 (CEST) Received: from mail-vk1-f225.google.com (mail-vk1-f225.google.com [209.85.221.225]) by dpdk.org (Postfix) with ESMTP id C22AD1C1A6 for ; Fri, 24 Jul 2020 07:33:53 +0200 (CEST) Received: by mail-vk1-f225.google.com with SMTP id r7so1941987vkf.0 for ; Thu, 23 Jul 2020 22:33:53 -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:content-transfer-encoding; bh=NXvDAUopuCyIlo0VPbGozfrnTVN/lr0QuADhLa7GCTo=; b=ZZXaXzyX/iKpTzZka/jt4mzjzC4ZERTRIdDd4NhlYjyDPtBA/1uQ7TgiIa6GHNqsMU Z3jyMnLKpAct9juIoorFDA4xa1OyKN7pxgxw0SJfDnFooi1tTojfqE4kz7bffUS5P3PF IUlJU5JSFSRj/gwbXNpXDrXLzvtYvPvF3KZpk= 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:content-transfer-encoding; bh=NXvDAUopuCyIlo0VPbGozfrnTVN/lr0QuADhLa7GCTo=; b=cHZ6hxjv40lwciGFpqQaTwaBl/SZuPOr8dVUdi0AovGy2g0/12mH96rdPzocn1I0ua t46pJJLM7Ejwx69ohCwD2o9oGMo8dtsrNu0Y72wBnIEs4bFa/+jnbPt7hXeoRktuSfuv b/WXNrVoaAOaXHk6tPOIm8CjxUYFQYVvbVwFFD91sCjj129v8IDRhR8469gC5FTJOUIH prwARh0UU+QYCB932ggp2l+yGYqTIHcWBfO36ixt1sBQlnC45p7iLXtgnTn6/xhT5jpw Zu5XugOSSTBtGzy52ccxEltWEje0iN7Wo49gVlqhkAPQGclra4j/Dyz0p5vEVjIlYJOW j9hA== X-Gm-Message-State: AOAM532uZLvHa78LMVrl991QtDV8QKw05BLqM2Ax3q3ycFKTamemZg+K 30g4LzTcxaxoR1N9mT+AKc7VpZ/QslJjO3jJuXpyg4XZY1XGYRHL2loYSJpJZoeIN4byoWbdb7z nzHeHKzDS0JNMYwGXF6DIJ+JsNJ9oKg93I8hblbqVUXRh/8tn0bYjGNRBws2QP3RZJYRXgzVIC2 2IQg== X-Google-Smtp-Source: ABdhPJyME0dzTSHUX1JQxwo+lSJUpNqy+leONumgQqzAU8roUEXPG1pQLfRnhRSCoF5WOqEhIIYIK9w1Hze5 X-Received: by 2002:ac5:c4d4:: with SMTP id a20mr6611119vkl.38.1595568833148; Thu, 23 Jul 2020 22:33:53 -0700 (PDT) Received: from localhost.localdomain ([192.19.223.252]) by smtp-relay.gmail.com with ESMTPS id h17sm592840vsk.0.2020.07.23.22.33.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jul 2020 22:33:53 -0700 (PDT) X-Relaying-Domain: broadcom.com From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Mike Baucom , Venkat Duvvuru Date: Thu, 23 Jul 2020 22:32:31 -0700 Message-Id: <20200724053235.71069-19-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20200724053235.71069-1-ajit.khaparde@broadcom.com> References: <20200723115639.22357-1-somnath.kotur@broadcom.com> <20200724053235.71069-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 18/22] net/bnxt: add templates for search before alloc 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: Mike Baucom Search before alloc allows reuse of constrained resources such as tcam, encap, and source modifications. The new templates will search the entry and alloc only if necessary. Signed-off-by: Mike Baucom Reviewed-by: Venkat Duvvuru Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 6 +++--- drivers/net/bnxt/tf_ulp/ulp_template_db_class.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_act.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_act.c index 58b581cf6..14ce16ebd 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_act.c @@ -1052,7 +1052,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = { .cond_opcode = BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET, .cond_operand = BNXT_ULP_CF_IDX_ACT_ENCAP_IPV4_FLAG, .direction = TF_DIR_TX, - .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO, + .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP, .result_start_idx = 96, .result_bit_size = 0, .result_num_fields = 0, @@ -1069,7 +1069,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = { .cond_opcode = BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET, .cond_operand = BNXT_ULP_CF_IDX_ACT_ENCAP_IPV6_FLAG, .direction = TF_DIR_TX, - .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO, + .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP, .result_start_idx = 99, .result_bit_size = 0, .result_num_fields = 0, @@ -1084,7 +1084,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = { .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL, .direction = TF_DIR_TX, - .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO, + .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP, .result_start_idx = 102, .result_bit_size = 0, .result_num_fields = 0, diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c index 41d1d8772..94160a902 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c @@ -3782,7 +3782,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = { .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH, .direction = TF_DIR_RX, .priority = BNXT_ULP_PRIORITY_LEVEL_0, - .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO, + .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP, .key_start_idx = 108, .blob_key_bit_size = 167, .key_bit_size = 167, @@ -4210,7 +4210,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = { .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH, .direction = TF_DIR_RX, .priority = BNXT_ULP_PRIORITY_LEVEL_0, - .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO, + .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP, .key_start_idx = 457, .blob_key_bit_size = 167, .key_bit_size = 167, @@ -4282,7 +4282,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = { .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH, .direction = TF_DIR_RX, .priority = BNXT_ULP_PRIORITY_LEVEL_0, - .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO, + .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP, .key_start_idx = 526, .blob_key_bit_size = 167, .key_bit_size = 167, @@ -4354,7 +4354,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = { .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH, .direction = TF_DIR_RX, .priority = BNXT_ULP_PRIORITY_LEVEL_0, - .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO, + .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP, .key_start_idx = 595, .blob_key_bit_size = 167, .key_bit_size = 167, @@ -4426,7 +4426,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = { .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH, .direction = TF_DIR_RX, .priority = BNXT_ULP_PRIORITY_LEVEL_0, - .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO, + .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP, .key_start_idx = 664, .blob_key_bit_size = 167, .key_bit_size = 167, @@ -4570,7 +4570,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = { .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH, .direction = TF_DIR_RX, .priority = BNXT_ULP_PRIORITY_LEVEL_0, - .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO, + .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP, .key_start_idx = 802, .blob_key_bit_size = 167, .key_bit_size = 167, @@ -4998,7 +4998,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = { .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH, .direction = TF_DIR_TX, .priority = BNXT_ULP_PRIORITY_LEVEL_0, - .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO, + .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_UPDATE, .key_start_idx = 1151, .blob_key_bit_size = 167, .key_bit_size = 167, -- 2.21.1 (Apple Git-122.3)