From: Somnath Kotur <somnath.kotur@broadcom.com> To: dev@dpdk.org Cc: ferruh.yigit@intel.com Subject: [dpdk-dev] [PATCH 35/36] net/bnxt: rename fields in the device params structure Date: Wed, 10 Jun 2020 12:27:32 +0530 Message-ID: <20200610065733.18698-36-somnath.kotur@broadcom.com> (raw) In-Reply-To: <20200610065733.18698-1-somnath.kotur@broadcom.com> From: Kishore Padmanabha <kishore.padmanabha@broadcom.com> The fields in the device params structure are renamed to reflect the usage of those fields. Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com> Reviewed-by: Michael Baucom <michael.baucom@broadcom.com> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com> --- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 12 ++++++------ drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 4 ++-- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 5 +++-- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 4 ++-- drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h | 7 +++++++ drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 19 ++++++++++--------- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 12 ++++++------ 7 files changed, 36 insertions(+), 27 deletions(-) diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c index fd3f61b..0c3c638 100644 --- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c +++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c @@ -146,14 +146,14 @@ bnxt_init_tbl_scope_parms(struct bnxt *bp, params->rx_max_action_entry_sz_in_bits = BNXT_ULP_DFLT_RX_MAX_ACTN_ENTRY; params->rx_mem_size_in_mb = BNXT_ULP_DFLT_RX_MEM; - params->rx_num_flows_in_k = dparms->num_flows / (1024); + params->rx_num_flows_in_k = dparms->flow_db_num_entries / 1024; params->rx_tbl_if_id = BNXT_ULP_RX_TBL_IF_ID; params->tx_max_key_sz_in_bits = BNXT_ULP_DFLT_TX_MAX_KEY; params->tx_max_action_entry_sz_in_bits = BNXT_ULP_DFLT_TX_MAX_ACTN_ENTRY; params->tx_mem_size_in_mb = BNXT_ULP_DFLT_TX_MEM; - params->tx_num_flows_in_k = dparms->num_flows / (1024); + params->tx_num_flows_in_k = dparms->flow_db_num_entries / 1024; params->tx_tbl_if_id = BNXT_ULP_TX_TBL_IF_ID; } } @@ -299,11 +299,11 @@ ulp_dparms_init(struct bnxt *bp, } /* num_flows = max_num_kflows * 1024 */ - dparms->num_flows = bp->max_num_kflows * 1024; + dparms->flow_db_num_entries = bp->max_num_kflows * 1024; /* GFID = 2 * num_flows */ - dparms->gfid_entries = dparms->num_flows * 2; + dparms->mark_db_gfid_entries = dparms->flow_db_num_entries * 2; BNXT_TF_DBG(DEBUG, "Set the number of flows = %"PRIu64"\n", - dparms->num_flows); + dparms->flow_db_num_entries); return 0; } @@ -328,7 +328,7 @@ ulp_dparms_dev_port_intf_update(struct bnxt *bp, } /* Update the bp flag with gfid flag */ - if (dparms->global_fid_enable) + if (dparms->flow_mem_type == BNXT_ULP_FLOW_MEM_TYPE_EXT) bp->flags |= BNXT_FLAG_GFID_ENABLE; return 0; diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c index fc4c4da..22996e5 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c +++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c @@ -300,7 +300,7 @@ int32_t ulp_flow_db_init(struct bnxt_ulp_context *ulp_ctxt) /* Populate the regular flow table limits. */ flow_tbl = &flow_db->flow_tbl[BNXT_ULP_REGULAR_FLOW_TABLE]; - flow_tbl->num_flows = dparms->num_flows + 1; + flow_tbl->num_flows = dparms->flow_db_num_entries + 1; flow_tbl->num_resources = (flow_tbl->num_flows * dparms->num_resources_per_flow); @@ -317,7 +317,7 @@ int32_t ulp_flow_db_init(struct bnxt_ulp_context *ulp_ctxt) goto error_free; /* add 1 since we are not using index 0 for flow id */ - flow_db->func_id_tbl_size = dparms->num_flows + 1; + flow_db->func_id_tbl_size = dparms->flow_db_num_entries + 1; /* Allocate the function Id table */ flow_db->func_id_tbl = rte_zmalloc("bnxt_ulp_flow_db_func_id_table", flow_db->func_id_tbl_size * diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c index f86cd76..d8e544f 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c +++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c @@ -1285,6 +1285,7 @@ ulp_mapper_em_tbl_process(struct bnxt_ulp_mapper_parms *parms, struct tf_insert_em_entry_parms iparms = { 0 }; struct tf_delete_em_entry_parms free_parms = { 0 }; int32_t trc; + enum bnxt_ulp_flow_mem_type mtype = parms->device_params->flow_mem_type; int32_t rc = 0; kflds = ulp_mapper_key_fields_get(tbl, &num_kflds); @@ -1375,10 +1376,10 @@ ulp_mapper_em_tbl_process(struct bnxt_ulp_mapper_parms *parms, } /* Mark action process */ - if (parms->device_params->global_fid_enable && + if (mtype == BNXT_ULP_FLOW_MEM_TYPE_EXT && tbl->resource_type == TF_MEM_EXTERNAL) rc = ulp_mapper_mark_gfid_process(parms, tbl, iparms.flow_id); - else if (!parms->device_params->global_fid_enable && + else if (mtype == BNXT_ULP_FLOW_MEM_TYPE_INT && tbl->resource_type == TF_MEM_INTERNAL) rc = ulp_mapper_mark_act_ptr_process(parms, tbl); if (rc) { diff --git a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c index 0c47768..89c08ab 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c +++ b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c @@ -77,7 +77,7 @@ ulp_mark_db_init(struct bnxt_ulp_context *ctxt) goto mem_error; /* Need to allocate 2 * Num flows to account for hash type bit.*/ - mark_tbl->lfid_num_entries = dparms->lfid_entries; + mark_tbl->lfid_num_entries = dparms->mark_db_lfid_entries; mark_tbl->lfid_tbl = rte_zmalloc("ulp_rx_em_flow_mark_table", mark_tbl->lfid_num_entries * sizeof(struct bnxt_lfid_mark_info), @@ -86,7 +86,7 @@ ulp_mark_db_init(struct bnxt_ulp_context *ctxt) goto mem_error; /* Need to allocate 2 * Num flows to account for hash type bit */ - mark_tbl->gfid_num_entries = dparms->gfid_entries; + mark_tbl->gfid_num_entries = dparms->mark_db_gfid_entries; mark_tbl->gfid_tbl = rte_zmalloc("ulp_rx_eem_flow_mark_table", mark_tbl->gfid_num_entries * sizeof(struct bnxt_gfid_mark_info), diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h index 5376245..50a28af 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h @@ -139,6 +139,13 @@ enum bnxt_ulp_direction { BNXT_ULP_DIRECTION_LAST = 2 }; +enum bnxt_ulp_flow_mem_type { + BNXT_ULP_FLOW_MEM_TYPE_INT = 0, + BNXT_ULP_FLOW_MEM_TYPE_EXT = 1, + BNXT_ULP_FLOW_MEM_TYPE_BOTH = 2, + BNXT_ULP_FLOW_MEM_TYPE_LAST = 3 +}; + enum bnxt_ulp_glb_regfile_index { BNXT_ULP_GLB_REGFILE_INDEX_GLB_PROF_FUNC_ID = 0, BNXT_ULP_GLB_REGFILE_INDEX_LAST = 1 diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c index b49b0a1..bd36368 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c @@ -313,15 +313,16 @@ struct bnxt_ulp_cache_tbl_params ulp_cache_tbl_params[] = { struct bnxt_ulp_device_params ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = { [BNXT_ULP_DEVICE_ID_WH_PLUS] = { - .global_fid_enable = BNXT_ULP_SYM_YES, - .byte_order = BNXT_ULP_BYTE_ORDER_LE, - .encap_byte_swap = 1, - .lfid_entries = 16384, - .lfid_entry_size = 4, - .gfid_entries = 65536, - .gfid_entry_size = 4, - .num_flows = 32768, - .num_resources_per_flow = 8 + .description = "Whitney_Plus", + .flow_mem_type = BNXT_ULP_FLOW_MEM_TYPE_EXT, + .byte_order = BNXT_ULP_BYTE_ORDER_LE, + .encap_byte_swap = 1, + .flow_db_num_entries = 32768, + .mark_db_lfid_entries = 65536, + .mark_db_gfid_entries = 65536, + .flow_count_db_entries = 16384, + .num_resources_per_flow = 8, + .num_phy_ports = 2 } }; diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h index 5d11a7e..5c43358 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h +++ b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h @@ -137,14 +137,14 @@ extern struct bnxt_ulp_act_match_info ulp_act_match_list[]; /* Device specific parameters */ struct bnxt_ulp_device_params { uint8_t description[16]; - uint32_t global_fid_enable; + enum bnxt_ulp_flow_mem_type flow_mem_type; enum bnxt_ulp_byte_order byte_order; uint8_t encap_byte_swap; - uint32_t lfid_entries; - uint32_t lfid_entry_size; - uint64_t gfid_entries; - uint32_t gfid_entry_size; - uint64_t num_flows; + uint8_t num_phy_ports; + uint32_t mark_db_lfid_entries; + uint64_t mark_db_gfid_entries; + uint64_t flow_db_num_entries; + uint32_t flow_count_db_entries; uint32_t num_resources_per_flow; }; -- 2.7.4
next prev parent reply other threads:[~2020-06-10 7:09 UTC|newest] Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-10 6:56 [dpdk-dev] [PATCH 00/36] bnxt fixes and enhancements Somnath Kotur 2020-06-10 6:56 ` [dpdk-dev] [PATCH 01/36] net/bnxt: Makefile changes Somnath Kotur 2020-06-10 6:56 ` [dpdk-dev] [PATCH 02/36] net/bnxt: remove svif and vlan information from header bitmap Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 03/36] net/bnxt: add vfr flag to the mark manager Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 04/36] net/bnxt: support for mark action for LFID rules Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 05/36] net/bnxt: remove mem field from mapper class table Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 06/36] net/bnxt: support more resource functions in flow database Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 07/36] net/bnxt: rename the ulp action bitmap enumeration values Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 08/36] net/bnxt: add support for computed header field in result opcode Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 09/36] net/bnxt: updated compute field list and access macros Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 10/36] net/bnxt: extend default identifier list to be global resource list Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 11/36] net/bnxt: add resource sub type to class and action tables Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 12/36] net/bnxt: remove cache tbl id from the mapper class table Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 13/36] net/bnxt: move vfr flag from computed field list to " Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 14/36] net/bnxt: add support for action bitmap opcode in result field processing Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 15/36] net/bnxt: direction bit needs to be added to the action bitmap Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 16/36] net/bnxt: remove cache_tbl_id enums Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 17/36] net/bnxt: extend index table processing to process action templates Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 18/36] net/bnxt: use vport in the phy port act handler Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 19/36] net/bnxt: add enum to the critical resource Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 20/36] net/bnxt: rename regfile_wr_idx to regfile_idx Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 21/36] net/bnxt: remove unused enum in regfile index Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 22/36] net/bnxt: rename an enum in the " Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 23/36] net/bnxt: rename the enums in the bnxt_ulp_resource_sub_type Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 24/36] net/bnxt: add a devarg to set max flow count Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 25/36] net/bnxt: add support for vxlan encap and decap templates Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 26/36] net/bnxt: flow db api to get vf rep action record Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 27/36] net/bnxt: parse ipv6 vtc_flow field for more granularly Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 28/36] net/bnxt: remove the implicit bitset update for vnic action Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 29/36] net/bnxt: divide the ulp template db file to smaller modules Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 30/36] net/bnxt: unify the mapper opcodes into single enum Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 31/36] net/bnxt: change opcode for adding pad to setting zero for common usage Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 32/36] net/bnxt: optimized key/mask/result fields to use set to zero opcode Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 33/36] net/bnxt: add support for internal exact match flows Somnath Kotur 2020-06-10 6:57 ` [dpdk-dev] [PATCH 34/36] net/bnxt: enable vfr flag processing with mark db opcode Somnath Kotur 2020-06-10 6:57 ` Somnath Kotur [this message] 2020-06-10 6:57 ` [dpdk-dev] [PATCH 36/36] net/bnxt: update ulp template database for new opcodes Somnath Kotur 2020-06-10 11:43 [dpdk-dev] [PATCH 00/36] bnxt patches Somnath Kotur 2020-06-10 11:44 ` [dpdk-dev] [PATCH 35/36] net/bnxt: rename fields in the device params structure Somnath Kotur 2020-06-12 12:49 [dpdk-dev] [PATCH v3 00/36] bnxt patches Somnath Kotur 2020-06-12 12:50 ` [dpdk-dev] [PATCH 35/36] net/bnxt: rename fields in the device params structure Somnath Kotur
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200610065733.18698-36-somnath.kotur@broadcom.com \ --to=somnath.kotur@broadcom.com \ --cc=dev@dpdk.org \ --cc=ferruh.yigit@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git