From patchwork Fri Oct 9 11:11:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Somnath Kotur X-Patchwork-Id: 80142 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F0FD9A04BC; Fri, 9 Oct 2020 13:23:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 74E621D545; Fri, 9 Oct 2020 13:19:12 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (saphodev.broadcom.com [192.19.232.172]) by dpdk.org (Postfix) with ESMTP id 3C7721D535 for ; Fri, 9 Oct 2020 13:19:09 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by relay.smtp-ext.broadcom.com (Postfix) with ESMTPS id 5E13F8281; Fri, 9 Oct 2020 04:19:06 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 5E13F8281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1602242347; bh=A2GZv5aISV74yNq6AgowVaWHyGIXDMLj/n0bVBOFdu0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wa0WBvwLWAoa1TwbfHT21rv/uydQxS2QSBmjeHkQQCgCvSo7Jq0t+YRqwDDN5UJ+3 ITi6uJafnEcSxixl7u6UbcfB8GgJlqdRLGL/Jq4YPpvq1l4PCT4emukg0L6ho7mHrC NfsGJfW3Vu4IOH+fnM4Ac/kLDlr4hpQUFg7K4LjU= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Mike Baucom , Ajit Kumar Khaparde , Kishore Padmanabha Date: Fri, 9 Oct 2020 16:41:28 +0530 Message-Id: <20201009111130.10422-12-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.28.0.450.g3a238e5 In-Reply-To: <20201009111130.10422-1-somnath.kotur@broadcom.com> References: <20201009111130.10422-1-somnath.kotur@broadcom.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 11/13] net/bnxt: remove flow db table type from templates 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 FDB type is now driven by the caller, not the template. Signed-off-by: Mike Baucom Reviewed-by: Ajit Kumar Khaparde Reviewed-by: Kishore Padmanabha --- .../net/bnxt/tf_ulp/ulp_template_db_stingray_act.c | 18 ++---- .../bnxt/tf_ulp/ulp_template_db_stingray_class.c | 69 ++++++++-------------- .../net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 18 ++---- .../bnxt/tf_ulp/ulp_template_db_wh_plus_class.c | 69 ++++++++-------------- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 1 - 5 files changed, 58 insertions(+), 117 deletions(-) diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c index 68e4d8e..2237ffb 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c @@ -12,38 +12,32 @@ struct bnxt_ulp_mapper_tbl_list_info ulp_stingray_act_tmpl_list[] = { [1] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 0, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 0 }, [2] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 3, - .start_tbl_idx = 6, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 6 }, [3] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 3, - .start_tbl_idx = 9, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 9 }, [4] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 12, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 12 }, [5] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 18, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 18 }, [6] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 24, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 24 } }; diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c index 1fa364e..62b940d 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c @@ -12,140 +12,117 @@ struct bnxt_ulp_mapper_tbl_list_info ulp_stingray_class_tmpl_list[] = { [1] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 0, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT + .start_tbl_idx = 0 }, [2] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 7, - .start_tbl_idx = 6, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT + .start_tbl_idx = 6 }, [3] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 7, - .start_tbl_idx = 13, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT + .start_tbl_idx = 13 }, [4] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 7, - .start_tbl_idx = 20, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT + .start_tbl_idx = 20 }, [5] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 1, - .start_tbl_idx = 27, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT + .start_tbl_idx = 27 }, [6] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 28, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 28 }, [7] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 33, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 33 }, [8] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 38, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 38 }, [9] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 44, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 44 }, [10] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 50, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 50 }, [11] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 56, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 56 }, [12] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 62, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 62 }, [13] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 67, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 67 }, [14] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 72, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 72 }, [15] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 77, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 77 }, [16] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 82, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 82 }, [17] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 87, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 87 }, [18] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 92, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 92 }, [19] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 98, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 98 }, [20] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 104, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 104 }, [21] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 6, - .start_tbl_idx = 110, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 110 }, [22] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 116, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 116 }, [23] = { .device_name = BNXT_ULP_DEVICE_ID_STINGRAY, .num_tbls = 5, - .start_tbl_idx = 121, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 121 } }; diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c index 381278e..39e8ec4 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c @@ -12,38 +12,32 @@ struct bnxt_ulp_mapper_tbl_list_info ulp_wh_plus_act_tmpl_list[] = { [1] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 0, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 0 }, [2] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 3, - .start_tbl_idx = 6, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 6 }, [3] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 3, - .start_tbl_idx = 9, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 9 }, [4] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 12, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 12 }, [5] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 18, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 18 }, [6] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 24, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 24 } }; diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c index 7024658..470d91c 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c @@ -12,140 +12,117 @@ struct bnxt_ulp_mapper_tbl_list_info ulp_wh_plus_class_tmpl_list[] = { [1] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 0, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT + .start_tbl_idx = 0 }, [2] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 7, - .start_tbl_idx = 6, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT + .start_tbl_idx = 6 }, [3] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 7, - .start_tbl_idx = 13, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT + .start_tbl_idx = 13 }, [4] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 7, - .start_tbl_idx = 20, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT + .start_tbl_idx = 20 }, [5] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 1, - .start_tbl_idx = 27, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT + .start_tbl_idx = 27 }, [6] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 28, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 28 }, [7] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 33, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 33 }, [8] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 38, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 38 }, [9] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 44, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 44 }, [10] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 50, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 50 }, [11] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 56, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 56 }, [12] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 62, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 62 }, [13] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 67, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 67 }, [14] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 72, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 72 }, [15] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 77, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 77 }, [16] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 82, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 82 }, [17] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 87, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 87 }, [18] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 92, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 92 }, [19] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 98, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 98 }, [20] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 104, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 104 }, [21] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 6, - .start_tbl_idx = 110, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 110 }, [22] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 116, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 116 }, [23] = { .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS, .num_tbls = 5, - .start_tbl_idx = 121, - .flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR + .start_tbl_idx = 121 } }; diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h index 107a06a..69bb61e 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h +++ b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h @@ -175,7 +175,6 @@ struct bnxt_ulp_mapper_tbl_list_info { uint32_t device_name; uint32_t start_tbl_idx; uint32_t num_tbls; - enum bnxt_ulp_fdb_type flow_db_table_type; }; struct bnxt_ulp_mapper_tbl_info {