patchset for bnxt
cover patchset for bnxt
Some fixes and enhancements in the PMD and TruFlow layers
Kishore Padmanabha (14):
net/bnxt: fix port stop process and cleanup resources net/bnxt: fix the drop action flow to support count action net/bnxt: reject offload flows with invalid MAC address net/bnxt: reduce debug log messages
net/bnxt: fix to break the ipv4 and ipv6 ingress rule net/bnxt: change default flow rule to use 8B encap net/bnxt: fix the function id used in the flow flush net/bnxt: vfr port clean up during port stop net/bnxt: remove VLAN pop action for egress flows net/bnxt: increase counter support from 8K to 16K net/bnxt: enable support for VXLAN ipv6 encapsulation net/bnxt: enable support for nat action with tagged traffic net/bnxt: fix out of bound access in action bit handling net/bnxt: add support for locks in flow database
Mike Baucom (1):
net/bnxt: free the em index on failure
Randy Schacher (1):
net/bnxt: move IF tbl from tunneled to direct HWRM msg
Shahaji Bhosle (2):
net/bnxt: add a null ptr check for the resource manager net/bnxt: update resource allocation settings
Somnath Kotur (6):
net/bnxt: fix crash in VF rep queue selection net/bnxt: fix to conditionally rollback added VF-rep ports net/bnxt: fix to explicitly check and set for start cntr ID net/bnxt: fix bugs in representor data path net/bnxt: fix to check for vnic ptr in bnxt shutdown path net/bnxt: fix to have a separate mutex for FW health check
Sriharsha Basavapatna (1):
net/bnxt: provide switch info while VF-Reps are configured
drivers/net/bnxt/bnxt.h | 13 +- drivers/net/bnxt/bnxt_ethdev.c | 101 +- drivers/net/bnxt/bnxt_filter.c | 14 +- drivers/net/bnxt/bnxt_hwrm.c | 13 +- drivers/net/bnxt/bnxt_reps.c | 163 +- drivers/net/bnxt/bnxt_reps.h | 8 + drivers/net/bnxt/bnxt_rxr.c | 27 +- drivers/net/bnxt/bnxt_vnic.c | 3 + drivers/net/bnxt/hsi_struct_def_dpdk.h | 935 ++- drivers/net/bnxt/tf_core/tf_em_internal.c | 5 +- drivers/net/bnxt/tf_core/tf_msg.c | 58 +- drivers/net/bnxt/tf_core/tf_rm.c | 14 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 569 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 34 +- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 56 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 131 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 8 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 1 + drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 17 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 4 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 52 +- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 6 - drivers/net/bnxt/tf_ulp/ulp_port_db.c | 41 + drivers/net/bnxt/tf_ulp/ulp_port_db.h | 13 + drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 153 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 +- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 295 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 5531 +++++++++++------ .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 66 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 767 ++- drivers/net/bnxt/tf_ulp/ulp_utils.c | 43 +- drivers/net/bnxt/tf_ulp/ulp_utils.h | 7 +- 32 files changed, 5836 insertions(+), 3317 deletions(-)
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 1/25 net/bnxt: fix port stop process and cleanup resources
From: Kishore Padmanabha <[email protected]>
The port deinitialization now cleans up all the resources properly. If all the ports are stopped then ulp context is freed.
Added fix to update the correct tfp pointer in the ulp context with the changes to support multi control channels.
--- drivers/net/bnxt/bnxt.h | 12 +- drivers/net/bnxt/bnxt_ethdev.c | 18 +- drivers/net/bnxt/bnxt_reps.c | 106 ++--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 494 ++++++++++++++---------- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 16 +- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 19 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 131 ++++++- drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 4 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 4 +- 9 files changed, 494 insertions(+), 310 deletions(-)
drivers/net/bnxt/bnxt.h +7 -5
@@ -823,8 +823,7 @@ struct bnxt_vf_representor {uint16_t dflt_vnic_id;uint16_t svif;uint16_t vfr_tx_cfa_action; -uint32_t rep2vf_flow_id; -uint32_t vf2rep_flow_id; +uint32_t dpdk_port_id;/* Private data store of associated PF/Trusted VF */ struct rte_eth_dev *parent_dev;uint8_t mac_addr[RTE_ETHER_ADDR_LEN ];
@@ -894,11 +893,14 @@ extern int bnxt_logtype_driver; PMD_DRV_LOG_RAW(level, fmt, ## args) extern const struct rte_flow_ops bnxt_ulp_rte_flow_ops; -int32_t bnxt_ulp_init (struct bnxt *bp); -void bnxt_ulp_deinit (struct bnxt *bp); +int32_t bnxt_ulp_port_init (struct bnxt *bp); +void bnxt_ulp_port_deinit (struct bnxt *bp);int32_t bnxt_ulp_create_df_rules (struct bnxt *bp);void bnxt_ulp_destroy_df_rules (struct bnxt *bp,bool global); - +int32_t +bnxt_ulp_create_vfr_default_rules (struct rte_eth_dev *vfr_ethdev); +int32_t +bnxt_ulp_delete_vfr_default_rules (struct bnxt_vf_representor *vfr);uint16_t bnxt_get_vnic_id (uint16_t port,enum bnxt_ulp_intf_type type);uint16_t bnxt_get_svif (uint16_t port_id,bool func_svif,enum bnxt_ulp_intf_type type);
drivers/net/bnxt/bnxt_ethdev.c +12 -6
@@ -1236,6 +1236,11 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)if (rc) goto error; +/* Initialize bnxt ULP port details */ + rc =bnxt_ulp_port_init (bp); +if (rc) + goto error; + eth_dev->rx_pkt_burst =bnxt_receive_function (eth_dev); eth_dev->tx_pkt_burst =bnxt_transmit_function (eth_dev);
@@ -1243,8 +1248,6 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)bnxt_schedule_fw_health_check (bp);pthread_mutex_unlock (&bp->def_cp_lock); -bnxt_ulp_init (bp); -return 0 ; error:
@@ -1304,8 +1307,8 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)/* disable uio/vfio intr/eventfd mapping */ rte_intr_disable (intr_handle); -bnxt_ulp_destroy_df_rules (bp, false); -bnxt_ulp_deinit (bp); +/* delete the bnxt ULP port details */ +bnxt_ulp_port_deinit (bp);bnxt_cancel_fw_health_check (bp);
@@ -1599,8 +1602,6 @@ static int bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev)if (rc !=0 ) vnic->flags = old_flags; -bnxt_ulp_create_df_rules (bp); -return rc; }
@@ -3701,9 +3702,14 @@ bnxt_filter_ctrl_op(struct rte_eth_dev *dev,struct bnxt *bp = dev->data->dev_private;int ret =0 ; +if (!bp) +return -EIO ; +if (BNXT_ETH_DEV_IS_REPRESENTOR (dev)) {struct bnxt_vf_representor *vfr = dev->data->dev_private; bp = vfr->parent_dev->data->dev_private; +if (!bp) +return -EIO ; } ret =is_bnxt_in_error (bp);
drivers/net/bnxt/bnxt_reps.c +30 -76
145 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +299 -195
662 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +13 -3
@@ -28,6 +28,13 @@ struct bnxt_ulp_df_rule_info {uint8_t valid; }; +struct bnxt_ulp_vfr_rule_info { +uint32_t rep2vf_flow_id; +uint32_t vf2rep_flow_id; +uint16_t parent_port_id; +uint8_t valid; +}; +struct bnxt_ulp_data {uint32_t tbl_scope_id;struct bnxt_ulp_mark_tbl *mark_tbl;
@@ -38,12 +45,12 @@ struct bnxt_ulp_data {struct bnxt_ulp_port_db *port_db;struct bnxt_ulp_fc_info *fc_info;uint32_t ulp_flags; -struct bnxt_ulp_df_rule_info df_rule_info[RTE_MAX_ETHPORTS ]; +struct bnxt_ulp_df_rule_info df_rule_info[RTE_MAX_ETHPORTS ]; +struct bnxt_ulp_vfr_rule_info vfr_rule_info[RTE_MAX_ETHPORTS ]; };struct bnxt_ulp_context {struct bnxt_ulp_data *cfg_data; -/* TBD The tfp should be removed once tf_attach is implemented. */ struct tf *g_tfp; };
@@ -58,7 +65,6 @@ struct bnxt_ulp_session_state {pthread_mutex_t bnxt_ulp_mutex;struct bnxt_ulp_pci_info pci_info;struct bnxt_ulp_data *cfg_data; -/* TBD The tfp should be removed once tf_attach is implemented. */ struct tf *g_tfp;uint32_t session_opened; };
@@ -183,4 +189,8 @@ int32_t bnxt_ulp_get_df_rule_info(uint8_t port_id, struct bnxt_ulp_context *ulp_ctx, struct bnxt_ulp_df_rule_info *info); +struct bnxt_ulp_vfr_rule_info * +bnxt_ulp_cntxt_ptr2_ulp_vfr_info_get (struct bnxt_ulp_context *ulp_ctx, +uint32_t port_id); +#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +8 -11
@@ -87,19 +87,19 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,uint32_t class_id, act_tmpl;struct rte_flow *flow_id;uint32_t fid; -int ret; +int ret =BNXT_TF_RC_ERROR ;if (bnxt_ulp_flow_validate_args (attr, pattern, actions, error) ==BNXT_TF_RC_ERROR ) {BNXT_TF_DBG (ERR ,"Invalid arguments being passed\n" ); -return NULL ; + goto parse_error; } ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (dev);if (!ulp_ctx) {BNXT_TF_DBG (ERR ,"ULP context is not initialized\n" ); -return NULL ; + goto parse_error; }/* Initialize the parser params */
@@ -173,20 +173,20 @@ bnxt_ulp_flow_validate(struct rte_eth_dev *dev, {struct ulp_rte_parser_params params;uint32_t class_id, act_tmpl; -int ret; +int ret =BNXT_TF_RC_ERROR ;struct bnxt_ulp_context *ulp_ctx;if (bnxt_ulp_flow_validate_args (attr, pattern, actions, error) ==BNXT_TF_RC_ERROR ) {BNXT_TF_DBG (ERR ,"Invalid arguments being passed\n" ); -return -EINVAL ; + goto parse_error; } ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (dev);if (!ulp_ctx) {BNXT_TF_DBG (ERR ,"ULP context is not initialized\n" ); -return -EINVAL ; + goto parse_error; }/* Initialize the parser params */
@@ -289,11 +289,8 @@ bnxt_ulp_flow_flush(struct rte_eth_dev *eth_dev, ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (eth_dev);if (!ulp_ctx) { -BNXT_TF_DBG (ERR ,"ULP context is not initialized\n" ); -rte_flow_error_set (error,EINVAL , -RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , -"Failed to flush flow." ); -return -EINVAL ; +BNXT_TF_DBG (DEBUG ,"ULP context is not initialized\n" ); +return ret; } bp = eth_dev->data->dev_private;
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +122 -9
181 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +1 -3
@@ -351,10 +351,8 @@ int32_t ulp_flow_db_deinit(struct bnxt_ulp_context *ulp_ctxt)struct bnxt_ulp_flow_db *flow_db; flow_db =bnxt_ulp_cntxt_ptr2_flow_db_get (ulp_ctxt); -if (!flow_db) { -BNXT_TF_DBG (ERR ,"Invalid Arguments\n" ); +if (!flow_db)return -EINVAL ; - }/* Detach the flow database from the ulp context. */ bnxt_ulp_cntxt_ptr2_flow_db_set (ulp_ctxt,NULL );
drivers/net/bnxt/tf_ulp/ulp_flow_db.h +2 -2
@@ -9,8 +9,8 @@#include "bnxt_ulp.h" #include "ulp_template_db_enum.h" -#define BNXT_FLOW_DB_DEFAULT_NUM_FLOWS 128 -#define BNXT_FLOW_DB_DEFAULT_NUM_RESOURCES 5 +#define BNXT_FLOW_DB_DEFAULT_NUM_FLOWS 512 +#define BNXT_FLOW_DB_DEFAULT_NUM_RESOURCES 8/* * Structure for the flow database resource information
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 2/25 net/bnxt: fix the drop action flow to support count action
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Changed the action template to support count action in addition to a flow that does drop action.
--- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 5 +++-- drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +3 -2
@@ -36,7 +36,7 @@ uint16_t ulp_act_sig_tbl[BNXT_ULP_ACT_SIG_TBL_MAX_SZ] = { [BNXT_ULP_ACT_HID_0020] = 25, [BNXT_ULP_ACT_HID_0901] = 26, [BNXT_ULP_ACT_HID_0121] = 27, - [BNXT_ULP_ACT_HID_0004] = 28, + [BNXT_ULP_ACT_HID_0006] = 28, [BNXT_ULP_ACT_HID_0804] = 29, [BNXT_ULP_ACT_HID_0105] = 30, [BNXT_ULP_ACT_HID_0024] = 31,
@@ -332,9 +332,10 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { .act_tid = 2 }, [28] = { - .act_hid = BNXT_ULP_ACT_HID_0004, + .act_hid = BNXT_ULP_ACT_HID_0006, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_COUNT | +BNXT_ULP_ACTION_BIT_DROP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 },
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +1 -1
@@ -838,7 +838,7 @@ enum bnxt_ulp_act_hid {BNXT_ULP_ACT_HID_0020 =0x0020 ,BNXT_ULP_ACT_HID_0901 =0x0901 ,BNXT_ULP_ACT_HID_0121 =0x0121 , -BNXT_ULP_ACT_HID_0004 =0x0004 , +BNXT_ULP_ACT_HID_0006 =0x0006 ,BNXT_ULP_ACT_HID_0804 =0x0804 ,BNXT_ULP_ACT_HID_0105 =0x0105 , BNXT_ULP_ACT_HID_0024 = 0x0024,
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 3/25 net/bnxt: reject offload flows with invalid MAC address
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Reject offload flows that have broadcast or multicast ethernet addresses.
--- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +21 -0
@@ -603,6 +603,19 @@ ulp_rte_l2_proto_type_update(struct ulp_rte_parser_params *param, } } +/* Internal Function to indentify broadcast or multicast packets */ +static int32_t +ulp_rte_parser_is_bcmc_addr (const struct rte_ether_addr *eth_addr) +{ +if (rte_is_multicast_ether_addr (eth_addr) || +rte_is_broadcast_ether_addr (eth_addr)) { +BNXT_TF_DBG (DEBUG , +"No support for bcast or mcast addr offload\n" ); +return 1 ; + } +return 0 ; +} +/* Function to handle the parsing of RTE Flow item Ethernet Header. */ int32_t ulp_rte_eth_hdr_handler(const struct rte_flow_item *item,
@@ -625,10 +638,18 @@ ulp_rte_eth_hdr_handler(const struct rte_flow_item *item, field =ulp_rte_parser_fld_copy (¶ms->hdr_field[idx], eth_spec->dst.addr_bytes, size); +/* Todo: work around to avoid multicast and broadcast addr */ +if (ulp_rte_parser_is_bcmc_addr (ð_spec->dst)) +return BNXT_TF_RC_PARSE_ERR ; + size =sizeof (eth_spec->src.addr_bytes); field =ulp_rte_parser_fld_copy (field, eth_spec->src.addr_bytes, size); +/* Todo: work around to avoid multicast and broadcast addr */ +if (ulp_rte_parser_is_bcmc_addr (ð_spec->src)) +return BNXT_TF_RC_PARSE_ERR ; + field =ulp_rte_parser_fld_copy (field, ð_spec->type,sizeof (eth_spec->type));
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 4/25 net/bnxt: reduce debug log messages
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Removed the mark id log message since it is in the data path. Also optimized the link status debug message.
--- drivers/net/bnxt/bnxt_hwrm.c | 13 ++++--------- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 6 ------ 2 files changed, 4 insertions(+), 15 deletions(-)
drivers/net/bnxt/bnxt_hwrm.c +4 -9
@@ -1343,15 +1343,10 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,HWRM_UNLOCK (); -PMD_DRV_LOG (DEBUG ,"Link Speed %d\n" , link_info->link_speed); -PMD_DRV_LOG (DEBUG ,"Auto Mode %d\n" , link_info->auto_mode); -PMD_DRV_LOG (DEBUG ,"Support Speeds %x\n" , link_info->support_speeds); -PMD_DRV_LOG (DEBUG ,"Auto Link Speed %x\n" , link_info->auto_link_speed); -PMD_DRV_LOG (DEBUG ,"Auto Link Speed Mask %x\n" , - link_info->auto_link_speed_mask); -PMD_DRV_LOG (DEBUG ,"Forced Link Speed %x\n" , - link_info->force_link_speed); - +PMD_DRV_LOG (DEBUG ,"Link Speed:%d,Auto:%d:%x:%x,Support:%x,Force:%x\n" , + link_info->link_speed, link_info->auto_mode, + link_info->auto_link_speed, link_info->auto_link_speed_mask, + link_info->support_speeds, link_info->force_link_speed);return rc; }
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c +0 -6
@@ -194,9 +194,6 @@ ulp_mark_db_mark_get(struct bnxt_ulp_context *ctxt, ULP_MARK_DB_ENTRY_IS_INVALID(&mtbl->gfid_tbl[idx])) return -EINVAL; -BNXT_TF_DBG (DEBUG ,"Get GFID[0x%0x] = 0x%0x\n" , - idx, mtbl->gfid_tbl[idx].mark_id); - *vfr_flag =ULP_MARK_DB_ENTRY_IS_VFR_ID (&mtbl->gfid_tbl[idx]); *mark = mtbl->gfid_tbl[idx].mark_id; }else {
@@ -204,9 +201,6 @@ ulp_mark_db_mark_get(struct bnxt_ulp_context *ctxt, ULP_MARK_DB_ENTRY_IS_INVALID(&mtbl->lfid_tbl[idx])) return -EINVAL; -BNXT_TF_DBG (DEBUG ,"Get LFID[0x%0x] = 0x%0x\n" , - idx, mtbl->lfid_tbl[idx].mark_id); - *vfr_flag =ULP_MARK_DB_ENTRY_IS_VFR_ID (&mtbl->lfid_tbl[idx]); *mark = mtbl->lfid_tbl[idx].mark_id; }
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 5/25 net/bnxt: fix to break the ipv4 and ipv6 ingress rule
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
The ingress rule to match on ipv4 and ipv6 is now two rules to make sure both rules can coexist at the same time. Added count action only for ingress flows.
--- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 298 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 5522 +++++++++++------ .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 66 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 767 ++- 4 files changed, 4088 insertions(+), 2565 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +140 -158
@@ -36,64 +36,61 @@ uint16_t ulp_act_sig_tbl[BNXT_ULP_ACT_SIG_TBL_MAX_SZ] = { [BNXT_ULP_ACT_HID_0020] = 25, [BNXT_ULP_ACT_HID_0901] = 26, [BNXT_ULP_ACT_HID_0121] = 27, - [BNXT_ULP_ACT_HID_0006] = 28, - [BNXT_ULP_ACT_HID_0804] = 29, - [BNXT_ULP_ACT_HID_0105] = 30, - [BNXT_ULP_ACT_HID_0024] = 31, - [BNXT_ULP_ACT_HID_0905] = 32, - [BNXT_ULP_ACT_HID_0125] = 33, - [BNXT_ULP_ACT_HID_0001] = 34, - [BNXT_ULP_ACT_HID_0005] = 35, - [BNXT_ULP_ACT_HID_0009] = 36, - [BNXT_ULP_ACT_HID_000d] = 37, - [BNXT_ULP_ACT_HID_0021] = 38, - [BNXT_ULP_ACT_HID_0029] = 39, - [BNXT_ULP_ACT_HID_0025] = 40, - [BNXT_ULP_ACT_HID_002d] = 41, - [BNXT_ULP_ACT_HID_0801] = 42, - [BNXT_ULP_ACT_HID_0809] = 43, - [BNXT_ULP_ACT_HID_0805] = 44, - [BNXT_ULP_ACT_HID_080d] = 45, - [BNXT_ULP_ACT_HID_0c15] = 46, - [BNXT_ULP_ACT_HID_0c19] = 47, - [BNXT_ULP_ACT_HID_02f6] = 48, - [BNXT_ULP_ACT_HID_04f8] = 49, - [BNXT_ULP_ACT_HID_01df] = 50, - [BNXT_ULP_ACT_HID_07e5] = 51, - [BNXT_ULP_ACT_HID_06ce] = 52, - [BNXT_ULP_ACT_HID_02fa] = 53, - [BNXT_ULP_ACT_HID_04fc] = 54, - [BNXT_ULP_ACT_HID_01e3] = 55, - [BNXT_ULP_ACT_HID_07e9] = 56, - [BNXT_ULP_ACT_HID_06d2] = 57, - [BNXT_ULP_ACT_HID_03f7] = 58, - [BNXT_ULP_ACT_HID_05f9] = 59, - [BNXT_ULP_ACT_HID_02e0] = 60, - [BNXT_ULP_ACT_HID_08e6] = 61, - [BNXT_ULP_ACT_HID_07cf] = 62, - [BNXT_ULP_ACT_HID_03fb] = 63, - [BNXT_ULP_ACT_HID_05fd] = 64, - [BNXT_ULP_ACT_HID_02e4] = 65, - [BNXT_ULP_ACT_HID_08ea] = 66, - [BNXT_ULP_ACT_HID_07d3] = 67, - [BNXT_ULP_ACT_HID_040d] = 68, - [BNXT_ULP_ACT_HID_040f] = 69, - [BNXT_ULP_ACT_HID_0413] = 70, - [BNXT_ULP_ACT_HID_0c0d] = 71, + [BNXT_ULP_ACT_HID_0004] = 28, + [BNXT_ULP_ACT_HID_0006] = 29, + [BNXT_ULP_ACT_HID_0804] = 30, + [BNXT_ULP_ACT_HID_0105] = 31, + [BNXT_ULP_ACT_HID_0024] = 32, + [BNXT_ULP_ACT_HID_0905] = 33, + [BNXT_ULP_ACT_HID_0125] = 34, + [BNXT_ULP_ACT_HID_0001] = 35, + [BNXT_ULP_ACT_HID_0005] = 36, + [BNXT_ULP_ACT_HID_0009] = 37, + [BNXT_ULP_ACT_HID_000d] = 38, + [BNXT_ULP_ACT_HID_0021] = 39, + [BNXT_ULP_ACT_HID_0029] = 40, + [BNXT_ULP_ACT_HID_0025] = 41, + [BNXT_ULP_ACT_HID_002d] = 42, + [BNXT_ULP_ACT_HID_0801] = 43, + [BNXT_ULP_ACT_HID_0809] = 44, + [BNXT_ULP_ACT_HID_0805] = 45, + [BNXT_ULP_ACT_HID_080d] = 46, + [BNXT_ULP_ACT_HID_0c15] = 47, + [BNXT_ULP_ACT_HID_0c19] = 48, + [BNXT_ULP_ACT_HID_02f6] = 49, + [BNXT_ULP_ACT_HID_04f8] = 50, + [BNXT_ULP_ACT_HID_01df] = 51, + [BNXT_ULP_ACT_HID_07e5] = 52, + [BNXT_ULP_ACT_HID_06ce] = 53, + [BNXT_ULP_ACT_HID_02fa] = 54, + [BNXT_ULP_ACT_HID_04fc] = 55, + [BNXT_ULP_ACT_HID_01e3] = 56, + [BNXT_ULP_ACT_HID_07e9] = 57, + [BNXT_ULP_ACT_HID_06d2] = 58, + [BNXT_ULP_ACT_HID_03f7] = 59, + [BNXT_ULP_ACT_HID_05f9] = 60, + [BNXT_ULP_ACT_HID_02e0] = 61, + [BNXT_ULP_ACT_HID_08e6] = 62, + [BNXT_ULP_ACT_HID_07cf] = 63, + [BNXT_ULP_ACT_HID_03fb] = 64, + [BNXT_ULP_ACT_HID_05fd] = 65, + [BNXT_ULP_ACT_HID_02e4] = 66, + [BNXT_ULP_ACT_HID_08ea] = 67, + [BNXT_ULP_ACT_HID_07d3] = 68, + [BNXT_ULP_ACT_HID_040d] = 69, + [BNXT_ULP_ACT_HID_040f] = 70, + [BNXT_ULP_ACT_HID_0413] = 71, [BNXT_ULP_ACT_HID_0567] = 72, [BNXT_ULP_ACT_HID_0a49] = 73, [BNXT_ULP_ACT_HID_050e] = 74, - [BNXT_ULP_ACT_HID_0d0e] = 75, - [BNXT_ULP_ACT_HID_0668] = 76, - [BNXT_ULP_ACT_HID_0b4a] = 77, - [BNXT_ULP_ACT_HID_0411] = 78, - [BNXT_ULP_ACT_HID_056b] = 79, - [BNXT_ULP_ACT_HID_0a4d] = 80, - [BNXT_ULP_ACT_HID_0c11] = 81, - [BNXT_ULP_ACT_HID_0512] = 82, - [BNXT_ULP_ACT_HID_0d12] = 83, - [BNXT_ULP_ACT_HID_066c] = 84, - [BNXT_ULP_ACT_HID_0b4e] =85 + [BNXT_ULP_ACT_HID_0668] = 75, + [BNXT_ULP_ACT_HID_0b4a] = 76, + [BNXT_ULP_ACT_HID_0411] = 77, + [BNXT_ULP_ACT_HID_056b] = 78, + [BNXT_ULP_ACT_HID_0a4d] = 79, + [BNXT_ULP_ACT_HID_0512] = 80, + [BNXT_ULP_ACT_HID_066c] = 81, + [BNXT_ULP_ACT_HID_0b4e] =82 };struct bnxt_ulp_act_match_info ulp_act_match_list[] = {
@@ -332,6 +329,13 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { .act_tid = 2 }, [28] = { + .act_hid = BNXT_ULP_ACT_HID_0004, + .act_sig = { .bits = +BNXT_ULP_ACTION_BIT_COUNT | + BNXT_ULP_FLOW_DIR_BITMASK_ING }, + .act_tid =2 + }, + [29] = { .act_hid = BNXT_ULP_ACT_HID_0006, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -339,7 +343,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [29] = { + [30] = { .act_hid = BNXT_ULP_ACT_HID_0804, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -347,7 +351,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [30] = { + [31] = { .act_hid = BNXT_ULP_ACT_HID_0105, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -355,7 +359,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [31] = { + [32] = { .act_hid = BNXT_ULP_ACT_HID_0024, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -363,7 +367,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [32] = { + [33] = { .act_hid = BNXT_ULP_ACT_HID_0905, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -372,7 +376,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [33] = { + [34] = { .act_hid = BNXT_ULP_ACT_HID_0125, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -381,14 +385,14 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [34] = { + [35] = { .act_hid = BNXT_ULP_ACT_HID_0001, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_MARK | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [35] = { + [36] = { .act_hid = BNXT_ULP_ACT_HID_0005, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -396,7 +400,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [36] = { + [37] = { .act_hid = BNXT_ULP_ACT_HID_0009, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -404,7 +408,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [37] = { + [38] = { .act_hid = BNXT_ULP_ACT_HID_000d, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -413,7 +417,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [38] = { + [39] = { .act_hid = BNXT_ULP_ACT_HID_0021, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -421,7 +425,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [39] = { + [40] = { .act_hid = BNXT_ULP_ACT_HID_0029, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -430,7 +434,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [40] = { + [41] = { .act_hid = BNXT_ULP_ACT_HID_0025, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -439,7 +443,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [41] = { + [42] = { .act_hid = BNXT_ULP_ACT_HID_002d, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -449,7 +453,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [42] = { + [43] = { .act_hid = BNXT_ULP_ACT_HID_0801, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -457,7 +461,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [43] = { + [44] = { .act_hid = BNXT_ULP_ACT_HID_0809, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -466,7 +470,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [44] = { + [45] = { .act_hid = BNXT_ULP_ACT_HID_0805, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -475,7 +479,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [45] = { + [46] = { .act_hid = BNXT_ULP_ACT_HID_080d, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -485,14 +489,14 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [46] = { + [47] = { .act_hid = BNXT_ULP_ACT_HID_0c15, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_VXLAN_ENCAP | BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =4 }, - [47] = { + [48] = { .act_hid = BNXT_ULP_ACT_HID_0c19, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_VXLAN_ENCAP |
@@ -500,14 +504,14 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =4 }, - [48] = { + [49] = { .act_hid = BNXT_ULP_ACT_HID_02f6, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_SET_IPV4_SRC | BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [49] = { + [50] = { .act_hid = BNXT_ULP_ACT_HID_04f8, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_SET_IPV4_SRC |
@@ -515,14 +519,14 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [50] = { + [51] = { .act_hid = BNXT_ULP_ACT_HID_01df, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_SET_IPV4_DST | BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [51] = { + [52] = { .act_hid = BNXT_ULP_ACT_HID_07e5, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_SET_IPV4_DST |
@@ -531,7 +535,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [52] = { + [53] = { .act_hid = BNXT_ULP_ACT_HID_06ce, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_SET_IPV4_SRC |
@@ -541,7 +545,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [53] = { + [54] = { .act_hid = BNXT_ULP_ACT_HID_02fa, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -549,7 +553,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [54] = { + [55] = { .act_hid = BNXT_ULP_ACT_HID_04fc, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -558,7 +562,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [55] = { + [56] = { .act_hid = BNXT_ULP_ACT_HID_01e3, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -566,7 +570,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [56] = { + [57] = { .act_hid = BNXT_ULP_ACT_HID_07e9, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -576,7 +580,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [57] = { + [58] = { .act_hid = BNXT_ULP_ACT_HID_06d2, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -587,7 +591,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [58] = { + [59] = { .act_hid = BNXT_ULP_ACT_HID_03f7, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -595,7 +599,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [59] = { + [60] = { .act_hid = BNXT_ULP_ACT_HID_05f9, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -604,7 +608,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [60] = { + [61] = { .act_hid = BNXT_ULP_ACT_HID_02e0, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -612,7 +616,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [61] = { + [62] = { .act_hid = BNXT_ULP_ACT_HID_08e6, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -622,7 +626,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [62] = { + [63] = { .act_hid = BNXT_ULP_ACT_HID_07cf, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -633,7 +637,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [63] = { + [64] = { .act_hid = BNXT_ULP_ACT_HID_03fb, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -642,7 +646,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [64] = { + [65] = { .act_hid = BNXT_ULP_ACT_HID_05fd, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -652,7 +656,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [65] = { + [66] = { .act_hid = BNXT_ULP_ACT_HID_02e4, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -661,7 +665,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [66] = { + [67] = { .act_hid = BNXT_ULP_ACT_HID_08ea, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -672,7 +676,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [67] = { + [68] = { .act_hid = BNXT_ULP_ACT_HID_07d3, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -684,20 +688,20 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [68] = { + [69] = { .act_hid = BNXT_ULP_ACT_HID_040d, .act_sig = { .bits = BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [69] = { + [70] = { .act_hid = BNXT_ULP_ACT_HID_040f, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_DROP | BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [70] = { + [71] = { .act_hid = BNXT_ULP_ACT_HID_0413, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DROP |
@@ -705,13 +709,6 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [71] = { - .act_hid = BNXT_ULP_ACT_HID_0c0d, - .act_sig = { .bits = -BNXT_ULP_ACTION_BIT_POP_VLAN | - BNXT_ULP_FLOW_DIR_BITMASK_EGR }, - .act_tid =6 - }, [72] = { .act_hid = BNXT_ULP_ACT_HID_0567, .act_sig = { .bits =
@@ -737,14 +734,6 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { .act_tid = 6 }, [75] = { - .act_hid = BNXT_ULP_ACT_HID_0d0e, - .act_sig = { .bits = -BNXT_ULP_ACTION_BIT_DEC_TTL | -BNXT_ULP_ACTION_BIT_POP_VLAN | - BNXT_ULP_FLOW_DIR_BITMASK_EGR }, - .act_tid =6 - }, - [76] = { .act_hid = BNXT_ULP_ACT_HID_0668, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -754,7 +743,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [77] = { + [76] = { .act_hid = BNXT_ULP_ACT_HID_0b4a, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -763,14 +752,14 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [78] = { + [77] = { .act_hid = BNXT_ULP_ACT_HID_0411, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_COUNT | BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [79] = { + [78] = { .act_hid = BNXT_ULP_ACT_HID_056b, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -780,7 +769,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [80] = { + [79] = { .act_hid = BNXT_ULP_ACT_HID_0a4d, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -789,15 +778,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [81] = { - .act_hid = BNXT_ULP_ACT_HID_0c11, - .act_sig = { .bits = -BNXT_ULP_ACTION_BIT_COUNT | -BNXT_ULP_ACTION_BIT_POP_VLAN | - BNXT_ULP_FLOW_DIR_BITMASK_EGR }, - .act_tid =6 - }, - [82] = { + [80] = { .act_hid = BNXT_ULP_ACT_HID_0512, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -805,16 +786,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [83] = { - .act_hid = BNXT_ULP_ACT_HID_0d12, - .act_sig = { .bits = -BNXT_ULP_ACTION_BIT_COUNT | -BNXT_ULP_ACTION_BIT_DEC_TTL | -BNXT_ULP_ACTION_BIT_POP_VLAN | - BNXT_ULP_FLOW_DIR_BITMASK_EGR }, - .act_tid =6 - }, - [84] = { + [81] = { .act_hid = BNXT_ULP_ACT_HID_066c, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -825,7 +797,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [85] = { + [82] = { .act_hid = BNXT_ULP_ACT_HID_0b4e, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -1064,7 +1036,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = { }, { .resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE, - .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV4, + .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV6, .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL, .cond_opcode = BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET,
@@ -1462,11 +1434,21 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, - .result_operand = { -BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , -0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, + .result_operand = { + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , + (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
@@ -2364,11 +2346,21 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, - .result_operand = { -BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , -0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, + .result_operand = { + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , + (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
@@ -2593,17 +2585,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 1, - .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ACT_BIT, - .result_operand = { - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>56 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>48 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>40 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>32 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>24 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>16 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>8 ) &0xff , - (uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN &0xff , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO }, { .field_bit_size = 1,
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +3491 -2031
2,358 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +32 -34
66 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_field.h +425 -342
767 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.21.1 (Apple Git-122.3)
Part of the diff is not shown here. View the raw message.
PATCH 6/25 net/bnxt: free the em index on failure
In reply to Ajit KhapardeFrom: Mike Baucom <[email protected]>
When a Internal EM entry fails insertion, the allocated index needs to be pushed back to the allocation stack.
--- drivers/net/bnxt/tf_core/tf_em_internal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/bnxt/tf_core/tf_em_internal.c +4 -1
@@ -175,8 +175,11 @@ tf_em_insert_int_entry(struct tf *tfp, &rptr_index, &rptr_entry, &num_of_entries); -if (rc) +if (rc) { +/* Free the allocated index before returning */ +stack_push (pool, index);return -1 ; + }PMD_DRV_LOG (DEBUG,
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 7/25 net/bnxt: add a null ptr check for the resource manager
In reply to Ajit KhapardeFrom: Shahaji Bhosle <[email protected]>
Verify the resource manager exists prior to using
--- drivers/net/bnxt/tf_core/tf_rm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/net/bnxt/tf_core/tf_rm.c +14 -0
@@ -706,6 +706,8 @@ tf_rm_allocate(struct tf_rm_allocate_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by RM */
@@ -772,6 +774,8 @@ tf_rm_free(struct tf_rm_free_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by RM */
@@ -817,6 +821,8 @@ tf_rm_is_allocated(struct tf_rm_is_allocated_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by RM */
@@ -860,6 +866,8 @@ tf_rm_get_info(struct tf_rm_get_alloc_info_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by HCAPI */
@@ -883,6 +891,8 @@ tf_rm_get_hcapi_type(struct tf_rm_get_hcapi_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by HCAPI */
@@ -905,6 +915,8 @@ tf_rm_get_inuse_count(struct tf_rm_get_inuse_count_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by RM */
@@ -937,6 +949,8 @@ tf_rm_check_indexes_in_range(struct tf_rm_check_indexes_in_range_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by RM */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 8/25 net/bnxt: change default flow rule to use 8B encap
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
The VFR conduit uses vlan encap to send packets, the encap record is changed from 16B to 8B so the free 8B encap records could be used.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 3 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 59 ++++++++++--------- 2 files changed, 32 insertions(+), 30 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +2 -1
@@ -97,7 +97,7 @@ ulp_ctx_session_open(struct bnxt *bp, resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4 ] =1023 ;/* ENCAP */ - resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =16 ; + resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =255 ; resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_16B ] =63 ;/* TCAMs */
@@ -130,6 +130,7 @@ ulp_ctx_session_open(struct bnxt *bp,/* ENCAP */ resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_64B ] =511 ; resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_16B ] =200 ; + resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =255 ;/* TCAMs */ resources->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] =
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +30 -29
169 lines not on this page · raw message
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 9/25 net/bnxt: fix the function id used in the flow flush
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
The function id being used in the flush is incorrect, fixed the flush of the flows.
--- drivers/net/bnxt/bnxt_ethdev.c | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 19 +++++++----- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 5 +-- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 39 ++++++++++++++++------- drivers/net/bnxt/tf_ulp/ulp_port_db.c | 41 +++++++++++++++++++++++++ drivers/net/bnxt/tf_ulp/ulp_port_db.h | 13 ++++++++ 6 files changed, 95 insertions(+), 23 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +1 -0
@@ -3708,6 +3708,7 @@ bnxt_filter_ctrl_op(struct rte_eth_dev *dev,if (BNXT_ETH_DEV_IS_REPRESENTOR (dev)) {struct bnxt_vf_representor *vfr = dev->data->dev_private; bp = vfr->parent_dev->data->dev_private; +/* parent is deleted while children are still valid */ if (!bp)return -EIO ; }
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +11 -8
@@ -35,14 +35,12 @@ static pthread_mutex_t bnxt_ulp_global_mutex = PTHREAD_MUTEX_INITIALIZER;* created the session. */ bool -ulp_ctx_deinit_allowed (void *ptr) +ulp_ctx_deinit_allowed (struct bnxt_ulp_context *ulp_ctx) { -struct bnxt *bp = (struct bnxt *)ptr; - -if (!bp || !bp->ulp_ctx || !bp->ulp_ctx->cfg_data) +if (!ulp_ctx || !ulp_ctx->cfg_data)return false; -if (!bp->ulp_ctx->cfg_data->ref_cnt) { +if (!ulp_ctx->cfg_data->ref_cnt) {BNXT_TF_DBG (DEBUG ,"ulp ctx shall initiate deinit\n" );return true; }
@@ -629,9 +627,14 @@ bnxt_ulp_flush_port_flows(struct bnxt *bp) {uint16_t func_id; - func_id =bnxt_get_fw_func_id (bp->eth_dev->data->port_id, -BNXT_ULP_INTF_TYPE_INVALID ); -ulp_flow_db_function_flow_flush (bp->ulp_ctx, func_id); +/* it is assumed that port is either TVF or PF */ +if (ulp_port_db_port_func_id_get (bp->ulp_ctx, + bp->eth_dev->data->port_id, + &func_id)) { +BNXT_TF_DBG (ERR ,"Invalid argument\n" ); +return ; + } + (void )ulp_flow_db_function_flow_flush (bp->ulp_ctx, func_id); }/* Internal function to delete the VFR default flows */
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +1 -4
@@ -83,12 +83,9 @@ struct ulp_tlv_param {/* * Allow the deletion of context only for the bnxt device that * created the session -* TBD - The implementation of the function should change to -* using the reference count once tf_session_attach functionality -* is fixed. */ bool -ulp_ctx_deinit_allowed (void *bp); +ulp_ctx_deinit_allowed (struct bnxt_ulp_context *ulp_ctx);/* Function to set the device id of the hardware. */ int32_t
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +28 -11
@@ -10,6 +10,7 @@#include "ulp_flow_db.h" #include "ulp_mapper.h" #include "ulp_fc_mgr.h" +#include "ulp_port_db.h" #include <rte_malloc.h> static int32_t
@@ -146,8 +147,14 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev, mapper_cparms.act_prop = ¶ms.act_prop; mapper_cparms.class_tid = class_id; mapper_cparms.act_tid = act_tmpl; - mapper_cparms.func_id =bnxt_get_fw_func_id (dev->data->port_id, -BNXT_ULP_INTF_TYPE_INVALID ); + +/* Get the function id */ +if (ulp_port_db_port_func_id_get (ulp_ctx, + dev->data->port_id, + &mapper_cparms.func_id)) { +BNXT_TF_DBG (ERR ,"conversion of port to func id failed\n" ); + goto parse_error; + } mapper_cparms.dir_attr = params.dir_attr;/* Call the ulp mapper to create the flow in the hardware. */
@@ -251,8 +258,17 @@ bnxt_ulp_flow_destroy(struct rte_eth_dev *dev, } flow_id = (uint32_t )(uintptr_t )flow; - func_id =bnxt_get_fw_func_id (dev->data->port_id, -BNXT_ULP_INTF_TYPE_INVALID ); + +if (ulp_port_db_port_func_id_get (ulp_ctx, + dev->data->port_id, + &func_id)) { +BNXT_TF_DBG (ERR ,"conversion of port to func id failed\n" ); +if (error) +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , +"Failed to destroy flow." ); +return -EINVAL ; + }if (ulp_flow_db_validate_flow_func (ulp_ctx, flow_id, func_id) == false) {
@@ -284,23 +300,24 @@ bnxt_ulp_flow_flush(struct rte_eth_dev *eth_dev, {struct bnxt_ulp_context *ulp_ctx;int32_t ret =0 ; -struct bnxt *bp;uint16_t func_id; ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (eth_dev);if (!ulp_ctx) { -BNXT_TF_DBG (DEBUG ,"ULP context is not initialized\n" );return ret; } - bp = eth_dev->data->dev_private;/* Free the resources for the last device */ -if (ulp_ctx_deinit_allowed (bp)) { +if (ulp_ctx_deinit_allowed (ulp_ctx)) { ret =ulp_flow_db_session_flow_flush (ulp_ctx); }else if (bnxt_ulp_cntxt_ptr2_flow_db_get (ulp_ctx)) { - func_id =bnxt_get_fw_func_id (eth_dev->data->port_id, -BNXT_ULP_INTF_TYPE_INVALID ); - ret =ulp_flow_db_function_flow_flush (ulp_ctx, func_id); + ret =ulp_port_db_port_func_id_get (ulp_ctx, + eth_dev->data->port_id, + &func_id); +if (!ret) + ret =ulp_flow_db_function_flow_flush (ulp_ctx, func_id); +else +BNXT_TF_DBG (ERR ,"convert port to func id failed\n" ); }if (ret) rte_flow_error_set(error, ret,
drivers/net/bnxt/tf_ulp/ulp_port_db.c +41 -0
44 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_port_db.h +13 -0
@@ -259,4 +259,17 @@ int32_t ulp_port_db_dev_func_id_to_ulp_index(struct bnxt_ulp_context *ulp_ctxt, uint32_t func_id, uint32_t *ifindex); +/* +* Api to get the function id for a given port id. +* +* ulp_ctxt [in] Ptr to ulp context +* port_id [in] dpdk port id +* func_id [out] the function id of the given ifindex. +* +* Returns 0 on success or negative number on failure. +*/ +int32_t +ulp_port_db_port_func_id_get (struct bnxt_ulp_context *ulp_ctxt, +uint16_t port_id,uint16_t *func_id); +#endif /* _ULP_PORT_DB_H_ */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 10/25 net/bnxt: vfr port clean up during port stop
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
When parent VF or PF ports are cleaned up, the child VF representor ports also need to be cleaned up. If not cleaned up, then deleting the parent VF shall result in not cleaning up the hardware rules and updating the firmware of vfr removal. The issue can occur even when OVS is exited without deleting vfr ports.
--- drivers/net/bnxt/bnxt_ethdev.c | 20 ++++++++++++++-- drivers/net/bnxt/bnxt_reps.c | 38 ++++++++++++++++++++++++++---- drivers/net/bnxt/bnxt_reps.h | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 4 ++-- 4 files changed, 55 insertions(+), 8 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +18 -2
@@ -1307,6 +1307,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)/* disable uio/vfio intr/eventfd mapping */ rte_intr_disable (intr_handle); +/* Stop the child representors for this device */ +bnxt_vf_rep_stop_all (bp); +/* delete the bnxt ULP port details */ bnxt_ulp_port_deinit (bp);
@@ -3709,8 +3712,13 @@ bnxt_filter_ctrl_op(struct rte_eth_dev *dev,struct bnxt_vf_representor *vfr = dev->data->dev_private; bp = vfr->parent_dev->data->dev_private;/* parent is deleted while children are still valid */ -if (!bp) +if (!bp) { +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR Error %d:%d\n" , + dev->data->port_id, + filter_type, + filter_op);return -EIO ; + } } ret =is_bnxt_in_error (bp);
@@ -5912,8 +5920,12 @@ static int bnxt_pci_remove_dev_with_reps(struct rte_eth_dev *eth_dev) vf_rep_eth_dev = bp->rep_info[i].vfr_eth_dev;if (!vf_rep_eth_dev)continue ; +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR pci remove\n" , + vf_rep_eth_dev->data->port_id);rte_eth_dev_destroy (vf_rep_eth_dev, bnxt_vf_representor_uninit); } +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d pci remove\n" , + eth_dev->data->port_id); ret =rte_eth_dev_destroy (eth_dev, bnxt_dev_uninit);return ret;
@@ -6040,6 +6052,8 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev, ret = -ENODEV ;return ret; } +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR pci probe\n" , + backing_eth_dev->data->port_id); backing_bp->rep_info[representor.vf_id].vfr_eth_dev = vf_rep_eth_dev; backing_bp->num_reps++;
@@ -6088,7 +6102,8 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, backing_eth_dev =rte_eth_dev_allocated (pci_dev->device.name); } - +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d pci probe\n" , + backing_eth_dev->data->port_id);/* probe representor ports now */ ret =bnxt_rep_port_probe (pci_dev, eth_da, backing_eth_dev);
@@ -6107,6 +6122,7 @@ static int bnxt_pci_remove(struct rte_pci_device *pci_dev)* +ve value will at least help in proper cleanup */ +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d pci remove\n" , eth_dev->data->port_id);if (rte_eal_process_type () ==RTE_PROC_PRIMARY ) {if (eth_dev->data->dev_flags &RTE_ETH_DEV_REPRESENTOR ) return rte_eth_dev_destroy(eth_dev,
drivers/net/bnxt/bnxt_reps.c +34 -4
@@ -167,6 +167,7 @@ int bnxt_vf_representor_init(struct rte_eth_dev *eth_dev, void *params)struct rte_eth_link *link;struct bnxt *parent_bp; +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR init\n" , eth_dev->data->port_id); vf_rep_bp->vf_id = rep_params->vf_id; vf_rep_bp->switch_domain_id = rep_params->switch_domain_id; vf_rep_bp->parent_dev = rep_params->parent_dev;
@@ -217,15 +218,18 @@ int bnxt_vf_representor_uninit(struct rte_eth_dev *eth_dev)struct bnxt *parent_bp;struct bnxt_vf_representor *rep = (struct bnxt_vf_representor *)eth_dev->data->dev_private; -uint16_t vf_id; +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR uninit\n" , eth_dev->data->port_id); eth_dev->data->mac_addrs =NULL ; eth_dev->dev_ops =NULL ; parent_bp = rep->parent_dev->data->dev_private; -if (!parent_bp) +if (!parent_bp) { +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d already freed\n" , + eth_dev->data->port_id);return 0 ; + } parent_bp->num_reps--; vf_id = rep->vf_id;
@@ -297,7 +301,8 @@ static int bnxt_tf_vfr_alloc(struct rte_eth_dev *vfr_ethdev) vfr->vf_id, rc); (void )bnxt_ulp_delete_vfr_default_rules (vfr); } - +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d VFR created and initialized\n" , + vfr->dpdk_port_id);return rc; }
@@ -362,6 +367,7 @@ int bnxt_vf_rep_dev_start_op(struct rte_eth_dev *eth_dev) parent_bp = rep_bp->parent_dev->data->dev_private; rep_info = &parent_bp->rep_info[rep_bp->vf_id]; +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d VFR start\n" , eth_dev->data->port_id);pthread_mutex_lock (&rep_info->vfr_start_lock);if (!rep_info->conduit_valid) { rc =bnxt_get_dflt_vnic_svif (parent_bp, rep_bp);
@@ -387,6 +393,7 @@ int bnxt_vf_rep_dev_start_op(struct rte_eth_dev *eth_dev)static int bnxt_tf_vfr_free (struct bnxt_vf_representor *vfr) { +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d VFR ulp free\n" , vfr->dpdk_port_id);return bnxt_ulp_delete_vfr_default_rules (vfr); }
@@ -402,8 +409,11 @@ static int bnxt_vfr_free(struct bnxt_vf_representor *vfr) } parent_bp = vfr->parent_dev->data->dev_private; -if (!parent_bp) +if (!parent_bp) { +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR already freed\n" , + vfr->dpdk_port_id);return 0 ; + }/* Check if representor has been already freed in FW */ if (!vfr->vfr_tx_cfa_action)
@@ -433,6 +443,8 @@ void bnxt_vf_rep_dev_stop_op(struct rte_eth_dev *eth_dev) eth_dev->rx_pkt_burst = &bnxt_dummy_recv_pkts; eth_dev->tx_pkt_burst = &bnxt_dummy_xmit_pkts; +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d VFR stop\n" , eth_dev->data->port_id); +bnxt_vfr_free (vfr_bp);if (eth_dev->data->dev_started)
@@ -443,6 +455,7 @@ void bnxt_vf_rep_dev_stop_op(struct rte_eth_dev *eth_dev)void bnxt_vf_rep_dev_close_op (struct rte_eth_dev *eth_dev) { +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d VFR close\n" , eth_dev->data->port_id);bnxt_vf_representor_uninit (eth_dev); }
@@ -722,3 +735,20 @@ int bnxt_vf_rep_stats_reset_op(struct rte_eth_dev *eth_dev) }return 0 ; } + +void bnxt_vf_rep_stop_all (struct bnxt *bp) +{ +uint16_t vf_id; +struct rte_eth_dev *rep_eth_dev; + +/* No vfrep ports just exit */ +if (!bp->rep_info) +return ; + +for (vf_id =0 ; vf_id <BNXT_MAX_VF_REPS ; vf_id++) { + rep_eth_dev = bp->rep_info[vf_id].vfr_eth_dev; +if (!rep_eth_dev) +continue ; +bnxt_vf_rep_dev_stop_op (rep_eth_dev); + } +}
drivers/net/bnxt/bnxt_reps.h +1 -0
@@ -42,4 +42,5 @@ void bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev);int bnxt_vf_rep_stats_get_op (struct rte_eth_dev *eth_dev,struct rte_eth_stats *stats);int bnxt_vf_rep_stats_reset_op (struct rte_eth_dev *eth_dev); +void bnxt_vf_rep_stop_all (struct bnxt *bp);#endif /* _BNXT_REPS_H_ */
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +2 -2
@@ -905,7 +905,7 @@ bnxt_ulp_port_init(struct bnxt *bp) }/* create the default rules */ bnxt_ulp_create_df_rules (bp); -BNXT_TF_DBG (DEBUG ,"ULP Port:%d created and initialized\n" , +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d ULP port init\n" , bp->eth_dev->data->port_id);return rc;
@@ -940,7 +940,7 @@ bnxt_ulp_port_deinit(struct bnxt *bp)return ; } -BNXT_TF_DBG (DEBUG ,"ULP Port:%d destroyed\n" , +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d ULP port deinit\n" , bp->eth_dev->data->port_id);/* Get the session details */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 11/25 net/bnxt: fix crash in VF rep queue selection
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
Instead of bounds checking against max possible rings while selecting queue index for the VF rep, do it against the configured number of rings.
--- drivers/net/bnxt/bnxt_reps.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/bnxt/bnxt_reps.c +5 -2
@@ -45,9 +45,12 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf) vfr_eth_dev = &rte_eth_devices[port_id]; vfr_bp = vfr_eth_dev->data->dev_private; -/* If rxq_id happens to be > max rep_queue, use rxq0 */ - que = queue_id <BNXT_MAX_VF_REP_RINGS ? queue_id :0 ; +/* If rxq_id happens to be > nr_rings, use ring 0 */ + que = queue_id < vfr_bp->rx_nr_rings ? queue_id :0 ; rep_rxq = vfr_bp->rx_queues[que]; +/* Ideally should not happen now, paranoid check */ +if (!rep_rxq) +return 1 ; rep_rxr = rep_rxq->rx_ring; mask = rep_rxr->rx_ring_struct->ring_mask;
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 12/25 net/bnxt: fix to conditionally rollback added VF-rep ports
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
If VF-rep port add fails for some reason, code was rolling back all ports added so far. With OVS-DPDK particularly, there is no need to do that, just log failure message for the VF rep port add and continue. Also include RTE_MAX_ETH_PORTS value in the bounds check as one port will be taken by the uplink port anyway
--- drivers/net/bnxt/bnxt_ethdev.c | 44 ++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 18 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +26 -18
@@ -5999,7 +5999,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,return -EINVAL ; } -if (num_rep >RTE_MAX_ETHPORTS ) { +if (num_rep >=RTE_MAX_ETHPORTS ) {PMD_DRV_LOG (ERR ,"nb_representor_ports = %d > %d MAX ETHPORTS\n" , num_rep,RTE_MAX_ETHPORTS );
@@ -6042,28 +6042,36 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,NULL ,NULL , bnxt_vf_representor_init, &representor); - -if (!ret) { - vf_rep_eth_dev =rte_eth_dev_allocated (name); -if (!vf_rep_eth_dev) { -PMD_DRV_LOG (ERR ,"Failed to find the eth_dev" -" for VF-Rep: %s." , name); -bnxt_pci_remove_dev_with_reps (backing_eth_dev); - ret = -ENODEV ; -return ret; - } -PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR pci probe\n" , - backing_eth_dev->data->port_id); - backing_bp->rep_info[representor.vf_id].vfr_eth_dev = - vf_rep_eth_dev; - backing_bp->num_reps++; - }else { +if (ret) {PMD_DRV_LOG (ERR ,"failed to create bnxt vf " "representor %s." , name); -bnxt_pci_remove_dev_with_reps (backing_eth_dev); + goto err; } + + vf_rep_eth_dev =rte_eth_dev_allocated (name); +if (!vf_rep_eth_dev) { +PMD_DRV_LOG (ERR ,"Failed to find the eth_dev" +" for VF-Rep: %s." , name); + ret = -ENODEV ; + goto err; + } + +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR pci probe\n" , + backing_eth_dev->data->port_id); + backing_bp->rep_info[representor.vf_id].vfr_eth_dev = + vf_rep_eth_dev; + backing_bp->num_reps++; } +return 0 ; + +err: +/* If num_rep > 1, then rollback already created +* ports, since we'll be failing the probe anyway +*/ +if (num_rep >1 ) +bnxt_pci_remove_dev_with_reps (backing_eth_dev); +return ret; }
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 13/25 net/bnxt: update resource allocation settings
In reply to Ajit KhapardeFrom: Shahaji Bhosle <[email protected]>
Update resource as default configuration
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +16 -13
@@ -85,9 +85,9 @@ ulp_ctx_session_open(struct bnxt *bp,/* Identifiers */ resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH ] =422 ; resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_L2_CTXT_LOW ] =6 ; - resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_WC_PROF ] =8 ; - resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_PROF_FUNC ] =8 ; - resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_EM_PROF ] =8 ; + resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_WC_PROF ] =192 ; + resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_PROF_FUNC ] =64 ; + resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_EM_PROF ] =192 ;/* Table Types */ resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_FULL_ACT_RECORD ] =8192 ;
@@ -95,7 +95,7 @@ ulp_ctx_session_open(struct bnxt *bp, resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4 ] =1023 ;/* ENCAP */ - resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =255 ; + resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =511 ; resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_16B ] =63 ;/* TCAMs */
@@ -103,22 +103,25 @@ ulp_ctx_session_open(struct bnxt *bp,422 ; resources->tcam_cnt[TF_DIR_RX ].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW ] =6 ; - resources->tcam_cnt[TF_DIR_RX ].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM ] =8 ; + resources->tcam_cnt[TF_DIR_RX ].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM ] =960 ; resources->tcam_cnt[TF_DIR_RX ].cnt[TF_TCAM_TBL_TYPE_WC_TCAM ] =88 ;/* EM */ - resources->em_cnt[TF_DIR_RX ].cnt[TF_EM_TBL_TYPE_EM_RECORD ] =13176 ; + resources->em_cnt[TF_DIR_RX ].cnt[TF_EM_TBL_TYPE_EM_RECORD ] =13168 ;/* EEM */ resources->em_cnt[TF_DIR_RX ].cnt[TF_EM_TBL_TYPE_TBL_SCOPE ] =1 ; +/* SP */ + resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_SP_SMAC ] =255 ; +/** TX **/ /* Identifiers */ resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH ] =292 ; - resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_L2_CTXT_LOW ] =144 ; - resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_WC_PROF ] =8 ; - resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_PROF_FUNC ] =8 ; - resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_EM_PROF ] =8 ; + resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_L2_CTXT_LOW ] =148 ; + resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_WC_PROF ] =192 ; + resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_PROF_FUNC ] =64 ; + resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_EM_PROF ] =192 ;/* Table Types */ resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_FULL_ACT_RECORD ] =8192 ;
@@ -127,7 +130,7 @@ ulp_ctx_session_open(struct bnxt *bp,/* ENCAP */ resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_64B ] =511 ; - resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_16B ] =200 ; + resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_16B ] =223 ; resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =255 ;/* TCAMs */
@@ -135,8 +138,8 @@ ulp_ctx_session_open(struct bnxt *bp,292 ; resources->tcam_cnt[TF_DIR_TX ].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW ] =144 ; - resources->tcam_cnt[TF_DIR_TX ].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM ] =8 ; - resources->tcam_cnt[TF_DIR_TX ].cnt[TF_TCAM_TBL_TYPE_WC_TCAM ] =8 ; + resources->tcam_cnt[TF_DIR_TX ].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM ] =960 ; + resources->tcam_cnt[TF_DIR_TX ].cnt[TF_TCAM_TBL_TYPE_WC_TCAM ] =928 ;/* EM */ resources->em_cnt[TF_DIR_TX ].cnt[TF_EM_TBL_TYPE_EM_RECORD ] =15232 ;
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 14/25 net/bnxt: move IF tbl from tunneled to direct HWRM msg
In reply to Ajit KhapardeFrom: Randy Schacher <[email protected]>
Change IF tbl from tunneled to non-tunneled HWRM msg.
--- drivers/net/bnxt/hsi_struct_def_dpdk.h | 935 ++++++++++++++++++------- drivers/net/bnxt/tf_core/tf_msg.c | 58 +- 2 files changed, 706 insertions(+), 287 deletions(-)
drivers/net/bnxt/hsi_struct_def_dpdk.h +675 -260
@@ -341,9 +341,9 @@ struct cmd_nums {#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS UINT32_C(0x52)#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS UINT32_C(0x53)#define HWRM_RING_AGGINT_QCAPS UINT32_C(0x54) -#define HWRM_RING_SQ_ALLOC UINT32_C(0x55) -#define HWRM_RING_SQ_CFG UINT32_C(0x56) -#define HWRM_RING_SQ_FREE UINT32_C(0x57) +#define HWRM_RING_SCHQ_ALLOC UINT32_C(0x55) +#define HWRM_RING_SCHQ_CFG UINT32_C(0x56) +#define HWRM_RING_SCHQ_FREE UINT32_C(0x57)#define HWRM_RING_RESET UINT32_C(0x5e)#define HWRM_RING_GRP_ALLOC UINT32_C(0x60)#define HWRM_RING_GRP_FREE UINT32_C(0x61)
@@ -413,6 +413,7 @@ struct cmd_nums {#define HWRM_FW_IPC_MAILBOX UINT32_C(0xcc)#define HWRM_FW_ECN_CFG UINT32_C(0xcd)#define HWRM_FW_ECN_QCFG UINT32_C(0xce) +#define HWRM_FW_SECURE_CFG UINT32_C(0xcf)#define HWRM_EXEC_FWD_RESP UINT32_C(0xd0)#define HWRM_REJECT_FWD_RESP UINT32_C(0xd1)#define HWRM_FWD_RESP UINT32_C(0xd2)
@@ -704,6 +705,10 @@ struct cmd_nums {/* Experimental */ #define HWRM_TF_GLOBAL_CFG_GET UINT32_C(0x2fd)/* Experimental */ +#define HWRM_TF_IF_TBL_SET UINT32_C(0x2fe) +/* Experimental */ +#define HWRM_TF_IF_TBL_GET UINT32_C(0x2ff) +/* Experimental */ #define HWRM_SV UINT32_C(0x400)/* Experimental */ #define HWRM_DBG_READ_DIRECT UINT32_C(0xff10)
@@ -942,8 +947,8 @@ struct hwrm_err_output {#define HWRM_VERSION_MINOR 10#define HWRM_VERSION_UPDATE 1/* non-zero means beta version */ -#define HWRM_VERSION_RSVD 48 -#define HWRM_VERSION_STR "1.10.1.48" +#define HWRM_VERSION_RSVD 56 +#define HWRM_VERSION_STR "1.10.1.56"/**************** * hwrm_ver_get *
@@ -2204,16 +2209,18 @@ struct rx_prod_pkt_bd {*/ #define RX_PROD_PKT_BD_FLAGS_EOP_PAD UINT32_C(0x80)/* +* This field has been deprecated. There can be no additional +* BDs for this packet from this ring. +* +* Old definition: * This value is the number of additional buffers in the ring that * describe the buffer space to be consumed for this packet. * If the value is zero, then the packet must fit within the * space described by this BD. If this value is 1 or more, it * indicates how many additional "buffer" BDs are in the ring * immediately following this BD to be used for the same -* network packet. -* -* Even if the packet to be placed does not need all the -* additional buffers, they will be consumed anyway. +* network packet. Even if the packet to be placed does not need +* all the additional buffers, they will be consumed anyway. */ #define RX_PROD_PKT_BD_FLAGS_BUFFERS_MASK UINT32_C(0x300)#define RX_PROD_PKT_BD_FLAGS_BUFFERS_SFT 8
@@ -3585,16 +3592,36 @@ struct rx_pkt_v2_cmpl {* truncation placement is used, this value represents the placed * (truncated) length of the packet. */ -#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_MASK UINT32_C(0x1ff) -#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_SFT 0 +#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_MASK UINT32_C(0x1ff) +#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_SFT 0/* This is data from the CFA as indicated by the meta_format field. */ -#define RX_PKT_V2_CMPL_METADATA1_MASK UINT32_C(0xf000) -#define RX_PKT_V2_CMPL_METADATA1_SFT 12 -/* When meta_format != 0, this value is the VLAN TPID_SEL. */ -#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_MASK UINT32_C(0x7000) -#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_SFT 12 +#define RX_PKT_V2_CMPL_METADATA1_MASK UINT32_C(0xf000) +#define RX_PKT_V2_CMPL_METADATA1_SFT 12/* When meta_format != 0, this value is the VLAN TPID_SEL. */ -#define RX_PKT_V2_CMPL_METADATA1_VALID UINT32_C(0x8000) +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_MASK UINT32_C(0x7000) +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_SFT 12 +/* 0x88a8 */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID88A8 \ + (UINT32_C(0x0) << 12) +/* 0x8100 */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID8100 \ + (UINT32_C(0x1) << 12) +/* 0x9100 */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9100 \ + (UINT32_C(0x2) << 12) +/* 0x9200 */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9200 \ + (UINT32_C(0x3) << 12) +/* 0x9300 */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9300 \ + (UINT32_C(0x4) << 12) +/* Value programmed in CFA VLANTPID register. */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG \ + (UINT32_C(0x5) << 12) +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_LAST \ + RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG +/* When meta_format != 0, this value is the VLAN valid. */ +#define RX_PKT_V2_CMPL_METADATA1_VALID UINT32_C(0x8000)/* * This value is the RSS hash value calculated for the packet * based on the mode bits and key value in the VNIC. When vee_cmpl_mode
@@ -4484,15 +4511,38 @@ struct rx_tpa_start_v2_cmpl {* with. Use this number to correlate the TPA start completion * with the TPA end completion. */ -#define RX_TPA_START_V2_CMPL_AGG_ID_MASK UINT32_C(0xfff) -#define RX_TPA_START_V2_CMPL_AGG_ID_SFT 0 -#define RX_TPA_START_V2_CMPL_METADATA1_MASK UINT32_C(0xf000) -#define RX_TPA_START_V2_CMPL_METADATA1_SFT 12 +#define RX_TPA_START_V2_CMPL_AGG_ID_MASK UINT32_C(0xfff) +#define RX_TPA_START_V2_CMPL_AGG_ID_SFT 0 +#define RX_TPA_START_V2_CMPL_METADATA1_MASK \ + UINT32_C(0xf000) +#define RX_TPA_START_V2_CMPL_METADATA1_SFT 12/* When meta_format != 0, this value is the VLAN TPID_SEL. */ -#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_MASK UINT32_C(0x7000) -#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_SFT 12 +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_MASK \ + UINT32_C(0x7000) +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_SFT 12 +/* 0x88a8 */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID88A8 \ + (UINT32_C(0x0) << 12) +/* 0x8100 */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID8100 \ + (UINT32_C(0x1) << 12) +/* 0x9100 */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9100 \ + (UINT32_C(0x2) << 12) +/* 0x9200 */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9200 \ + (UINT32_C(0x3) << 12) +/* 0x9300 */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9300 \ + (UINT32_C(0x4) << 12) +/* Value programmed in CFA VLANTPID register. */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG \ + (UINT32_C(0x5) << 12) +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_LAST \ + RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG/* When meta_format != 0, this value is the VLAN valid. */ -#define RX_TPA_START_V2_CMPL_METADATA1_VALID UINT32_C(0x8000) +#define RX_TPA_START_V2_CMPL_METADATA1_VALID \ + UINT32_C(0x8000)/* * This value is the RSS hash value calculated for the packet * based on the mode bits and key value in the VNIC.
@@ -8908,6 +8958,13 @@ struct hwrm_func_vf_cfg_input {*/ #define HWRM_FUNC_VF_CFG_INPUT_FLAGS_PPP_PUSH_MODE_ENABLE \ UINT32_C(0x100) +/* +* If this bit is set to 1, the VF driver is requesting FW to disable +* PPP TX PUSH feature on all the TX rings of the VF. This flag is +* ignored if the VF doesn't support PPP tx push feature. +*/ +#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_PPP_PUSH_MODE_DISABLE \ + UINT32_C(0x200)/* The number of RSS/COS contexts requested for the VF. */ uint16_t num_rsscos_ctxs;/* The number of completion rings requested for the VF. */
@@ -9396,10 +9453,10 @@ struct hwrm_func_qcaps_output {#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_TX_PROXY_SRC_INTF_OVERRIDE_SUPPORT \ UINT32_C(0x20)/* -* If 1, the device supports scheduler queues. SQs can be managed -* using RING_SQ_ALLOC/CFG/FREE commands. +* If 1, the device supports scheduler queues. SCHQs can be managed +* using RING_SCHQ_ALLOC/CFG/FREE commands. */ -#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_SQ_SUPPORTED \ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_SCHQ_SUPPORTED \ UINT32_C(0x40)/* * If set to 1, then this function supports the TX push mode that
@@ -9407,8 +9464,8 @@ struct hwrm_func_qcaps_output {*/ #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PPP_PUSH_MODE_SUPPORTED \ UINT32_C(0x80) -/* The maximum number of SQs supported by this device. */ -uint8_t max_sqs; +/* The maximum number of SCHQs supported by this device. */ +uint8_t max_schqs;uint8_t unused_1[2 ];/* * This field is used in Output records to indicate that the output
@@ -10159,6 +10216,15 @@ struct hwrm_func_cfg_input {*/ #define HWRM_FUNC_CFG_INPUT_FLAGS_PPP_PUSH_MODE_ENABLE \ UINT32_C(0x8000000) +/* +* If this bit is set to 1, the PF driver is requesting FW +* to disable PPP TX PUSH feature on all the TX rings specified in +* the num_tx_rings field. This flag is ignored if num_tx_rings +* field is not specified or the function doesn't support PPP tx +* push feature. +*/ +#define HWRM_FUNC_CFG_INPUT_FLAGS_PPP_PUSH_MODE_DISABLE \ + UINT32_C(0x10000000)uint32_t enables;/* * This bit must be '1' for the mtu field to be
@@ -10305,10 +10371,10 @@ struct hwrm_func_cfg_input {#define HWRM_FUNC_CFG_INPUT_ENABLES_HOT_RESET_IF_SUPPORT \ UINT32_C(0x800000)/* -* This bit must be '1' for the sq_id field to be +* This bit must be '1' for the schq_id field to be * configured. */ -#define HWRM_FUNC_CFG_INPUT_ENABLES_SQ_ID \ +#define HWRM_FUNC_CFG_INPUT_ENABLES_SCHQ_ID \ UINT32_C(0x1000000)/* * The maximum transmission unit of the function.
@@ -10574,8 +10640,8 @@ struct hwrm_func_cfg_input {* be reserved for this function on the RX side. */ uint16_t num_mcast_filters; -/* Used by a PF driver to associate a SQ with a VF. */ -uint16_t sq_id; +/* Used by a PF driver to associate a SCHQ with a VF. */ +uint16_t schq_id;uint8_t unused_0[6 ]; } __rte_packed;
@@ -10808,12 +10874,12 @@ struct hwrm_func_qstats_ext_input {uint8_t unused_0[1 ];uint32_t enables;/* -* This bit must be '1' for the sq_id and traffic_class fields to be -* configured. +* This bit must be '1' for the schq_id and traffic_class fields to +* be configured. */ -#define HWRM_FUNC_QSTATS_EXT_INPUT_ENABLES_SQ_ID UINT32_C(0x1) -/* Specifies the SQ for which to gather statistics */ -uint16_t sq_id; +#define HWRM_FUNC_QSTATS_EXT_INPUT_ENABLES_SCHQ_ID UINT32_C(0x1) +/* Specifies the SCHQ for which to gather statistics */ +uint16_t schq_id;/* * Specifies the traffic class for which to gather statistics. Valid * values are 0 through (max_configurable_queues - 1), where
@@ -15275,7 +15341,14 @@ struct hwrm_port_phy_cfg_input {UINT32_C (0x80 )/* * When set to 1, then the HWRM shall enable FEC autonegotitation -* on this port if supported. +* on this port if supported. When enabled, at least one of the +* FEC modes must be advertised by enabling the fec_clause_74_enable, +* fec_clause_91_enable, fec_rs544_1xn_enable, or fec_rs544_2xn_enable +* flag. If none of the FEC mode is currently enabled, the HWRM +* shall choose a default advertisement setting. +* The default advertisment setting can be queried by calling +* hwrm_port_phy_qcfg. Note that the link speed must be +* in autonegotiation mode for FEC autonegotiation to take effect. * When set to 0, then this flag shall be ignored. * If FEC autonegotiation is not supported, then the HWRM shall ignore this * flag.
@@ -15293,7 +15366,8 @@ struct hwrm_port_phy_cfg_input {UINT32_C (0x200 )/* * When set to 1, then the HWRM shall enable FEC CLAUSE 74 (Fire Code) -* on this port if supported. +* on this port if supported, by advertising FEC CLAUSE 74 if +* FEC autonegotiation is enabled or force enabled otherwise. * When set to 0, then this flag shall be ignored. * If FEC CLAUSE 74 is not supported, then the HWRM shall ignore this * flag.
@@ -15302,7 +15376,8 @@ struct hwrm_port_phy_cfg_input {UINT32_C (0x400 )/* * When set to 1, then the HWRM shall disable FEC CLAUSE 74 (Fire Code) -* on this port if supported. +* on this port if supported, by not advertising FEC CLAUSE 74 if +* FEC autonegotiation is enabled or force disabled otherwise. * When set to 0, then this flag shall be ignored. * If FEC CLAUSE 74 is not supported, then the HWRM shall ignore this * flag.
@@ -15311,7 +15386,8 @@ struct hwrm_port_phy_cfg_input {UINT32_C (0x800 )/* * When set to 1, then the HWRM shall enable FEC CLAUSE 91 (Reed Solomon) -* on this port if supported. +* on this port if supported, by advertising FEC CLAUSE 91 if +* FEC autonegotiation is enabled or force enabled otherwise. * When set to 0, then this flag shall be ignored. * If FEC CLAUSE 91 is not supported, then the HWRM shall ignore this * flag.
@@ -15320,7 +15396,8 @@ struct hwrm_port_phy_cfg_input {UINT32_C (0x1000 )/* * When set to 1, then the HWRM shall disable FEC CLAUSE 91 (Reed Solomon) -* on this port if supported. +* on this port if supported, by not advertising FEC CLAUSE 91 if +* FEC autonegotiation is enabled or force disabled otherwise. * When set to 0, then this flag shall be ignored. * If FEC CLAUSE 91 is not supported, then the HWRM shall ignore this * flag.
@@ -15347,6 +15424,46 @@ struct hwrm_port_phy_cfg_input {*/ #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE_LINK_DWN \ UINT32_C(0x4000) +/* +* When set to 1, then the HWRM shall enable FEC RS544_1XN +* on this port if supported, by advertising FEC RS544_1XN if +* FEC autonegotiation is enabled or force enabled otherwise. +* When set to 0, then this flag shall be ignored. +* If FEC RS544_1XN is not supported, then the HWRM shall ignore this +* flag. +*/ +#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_1XN_ENABLE \ + UINT32_C(0x8000) +/* +* When set to 1, then the HWRM shall disable FEC RS544_1XN +* on this port if supported, by not advertising FEC RS544_1XN if +* FEC autonegotiation is enabled or force disabled otherwise. +* When set to 0, then this flag shall be ignored. +* If FEC RS544_1XN is not supported, then the HWRM shall ignore this +* flag. +*/ +#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_1XN_DISABLE \ + UINT32_C(0x10000) +/* +* When set to 1, then the HWRM shall enable FEC RS544_2XN +* on this port if supported, by advertising FEC RS544_2XN if +* FEC autonegotiation is enabled or force enabled otherwise. +* When set to 0, then this flag shall be ignored. +* If FEC RS544_2XN is not supported, then the HWRM shall ignore this +* flag. +*/ +#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_2XN_ENABLE \ + UINT32_C(0x20000) +/* +* When set to 1, then the HWRM shall disable FEC RS544_2XN +* on this port if supported, by not advertising FEC RS544_2XN if +* FEC autonegotiation is enabled or force disabled otherwise. +* When set to 0, then this flag shall be ignored. +* If FEC RS544_2XN is not supported, then the HWRM shall ignore this +* flag. +*/ +#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_2XN_DISABLE \ + UINT32_C(0x40000)uint32_t enables;/* * This bit must be '1' for the auto_mode field to be
@@ -16573,9 +16690,6 @@ struct hwrm_port_phy_qcfg_output {* is set to 1, then all other FEC configuration flags shall be ignored. * When set to 0, then FEC is supported as indicated by other * configuration flags. -* If no cable is attached and the HWRM does not yet know the FEC -* capability, then the HWRM shall set this flag to 1 when reporting -* FEC capability. */ #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_NONE_SUPPORTED \ UINT32_C(0x1)
@@ -16599,7 +16713,9 @@ struct hwrm_port_phy_qcfg_output {#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE74_SUPPORTED \ UINT32_C(0x8)/* -* When set to 1, then FEC CLAUSE 74 (Fire Code) is enabled on this port. +* When set to 1, then FEC CLAUSE 74 (Fire Code) is enabled on this +* port. This means that FEC CLAUSE 74 is either advertised if +* FEC autonegotiation is enabled or FEC CLAUSE 74 is force enabled. * When set to 0, then FEC CLAUSE 74 (Fire Code) is disabled if supported. * This flag should be ignored if FEC CLAUSE 74 is not supported on this port. */
@@ -16612,12 +16728,84 @@ struct hwrm_port_phy_qcfg_output {#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_SUPPORTED \ UINT32_C(0x20)/* -* When set to 1, then FEC CLAUSE 91 (Reed Solomon) is enabled on this port. +* When set to 1, then FEC CLAUSE 91 (Reed Solomon) is enabled on this +* port. This means that FEC CLAUSE 91 is either advertised if +* FEC autonegotiation is enabled or FEC CLAUSE 91 is force enabled. * When set to 0, then FEC CLAUSE 91 (Reed Solomon) is disabled if supported. * This flag should be ignored if FEC CLAUSE 91 is not supported on this port. */ #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_ENABLED \ UINT32_C(0x40) +/* +* When set to 1, then FEC RS544_1XN is supported on this port. +* When set to 0, then FEC RS544_1XN is not supported on this port. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_1XN_SUPPORTED \ + UINT32_C(0x80) +/* +* When set to 1, then RS544_1XN is enabled on this +* port. This means that FEC RS544_1XN is either advertised if +* FEC autonegotiation is enabled or FEC RS544_1XN is force enabled. +* When set to 0, then FEC RS544_1XN is disabled if supported. +* This flag should be ignored if FEC RS544_1XN is not supported on this port. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_1XN_ENABLED \ + UINT32_C(0x100) +/* +* When set to 1, then FEC RS544_2XN is supported on this port. +* When set to 0, then FEC RS544_2XN is not supported on this port. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_2XN_SUPPORTED \ + UINT32_C(0x200) +/* +* When set to 1, then RS544_2XN is enabled on this +* port. This means that FEC RS544_2XN is either advertised if +* FEC autonegotiation is enabled or FEC RS544_2XN is force enabled. +* When set to 0, then FEC RS544_2XN is disabled if supported. +* This flag should be ignored if FEC RS544_2XN is not supported on this port. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_2XN_ENABLED \ + UINT32_C(0x400) +/* +* When set to 1, then FEC CLAUSE 74 (Fire Code) is active on this +* port, either successfully autonegoatiated or forced. +* When set to 0, then FEC CLAUSE 74 (Fire Code) is not active. +* This flag is only valid when link is up on this port. +* At most only one active FEC flags (fec_clause74_active, +* fec_clause91_active, fec_rs544_1xn, fec_rs544_2xn) can be set. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE74_ACTIVE \ + UINT32_C(0x800) +/* +* When set to 1, then FEC CLAUSE 91 (Reed Solomon) is active on this +* port, either successfully autonegoatiated or forced. +* When set to 0, then FEC CLAUSE 91 (Reed Solomon) is not active. +* This flag is only valid when link is up on this port. +* At most only one active FEC flags (fec_clause74_active, +* fec_clause91_active, fec_rs544_1xn, fec_rs544_2xn) can be set. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_ACTIVE \ + UINT32_C(0x1000) +/* +* When set to 1, then FEC RS544_1XN is active on this +* port, either successfully autonegoatiated or forced. +* When set to 0, then FEC RS544_1XN is not active. +* This flag is only valid when link is up on this port. +* At most only one active FEC flags (fec_clause74_active, +* fec_clause91_active, fec_rs544_1xn, fec_rs544_2xn) can be set. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_1XN_ACTIVE \ + UINT32_C(0x2000) +/* +* When set to 1, then FEC RS544_2XN is active on this +* port, either successfully autonegoatiated or forced. +* When set to 0, then FEC RS544_2XN is not active. +* This flag is only valid when link is up on this port. +* At most only one active FEC flags (fec_clause74_active, +* fec_clause91_active, fec_rs544_1xn, fec_rs544_2xn) can be set. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_2XN_ACTIVE \ + UINT32_C(0x4000)/* * This value is indicates the duplex of the current * connection state.
@@ -19079,13 +19267,24 @@ struct hwrm_port_phy_qcaps_output {*/ #define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_SHARED_PHY_CFG_SUPPORTED \ UINT32_C(0x8) +/* +* If set to 1, it indicates that the port counters and extended +* port counters will not reset when the firmware shuts down or +* resets the PHY. These counters will only be reset during power +* cycle or by calling HWRM_PORT_CLR_STATS. +* If set to 0, the state of the counters is unspecified when +* firmware shuts down or resets the PHY. +*/ +#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_CUMULATIVE_COUNTERS_ON_RESET \ + UINT32_C(0x10)/* * Reserved field. The HWRM shall set this field to 0. * An HWRM client shall ignore this field. */ #define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_RSVD1_MASK \ - UINT32_C(0xf0) -#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_RSVD1_SFT 4 + UINT32_C(0xe0) +#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_RSVD1_SFT \ + 5/* Number of front panel ports for this device. */ uint8_t port_cnt;/* Not supported or unknown */
@@ -21251,7 +21450,7 @@ struct hwrm_queue_qportcfg_input {uint8_t unused_0; } __rte_packed; -/* hwrm_queue_qportcfg_output (size:256b/32B) */ +/* hwrm_queue_qportcfg_output (size:1344b/168B) */ struct hwrm_queue_qportcfg_output {/* The specific error status for the command. */ uint16_t error_code;
@@ -21627,6 +21826,28 @@ struct hwrm_queue_qportcfg_output { UINT32_C(0xff)#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LAST \ HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_UNKNOWN +uint8_t unused_0; +/* +* Up to 16 bytes of null padded ASCII string describing this queue. +* The queue name includes a CoS queue index and, in some cases, text +* that distinguishes the queue from other queues in the group. +*/ +char qid0_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid1_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid2_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid3_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid4_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid5_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid6_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid7_name[16 ]; +uint8_t unused_1[7 ];/* * This field is used in Output records to indicate that the output * is completely written to RAM. This field should be read as '1'
@@ -26929,10 +27150,10 @@ struct hwrm_ring_alloc_input {#define HWRM_RING_ALLOC_INPUT_ENABLES_RX_BUF_SIZE_VALID \ UINT32_C(0x100)/* -* This bit must be '1' for the sq_id field to be +* This bit must be '1' for the schq_id field to be * configured. */ -#define HWRM_RING_ALLOC_INPUT_ENABLES_SQ_ID \ +#define HWRM_RING_ALLOC_INPUT_ENABLES_SCHQ_ID \ UINT32_C(0x200)/* Ring Type. */ uint8_t ring_type;
@@ -26999,8 +27220,8 @@ struct hwrm_ring_alloc_input {* element of the ring. */ uint8_t page_tbl_depth; -/* Used by a PF driver to associate a SQ with one of its TX rings. */ -uint16_t sq_id; +/* Used by a PF driver to associate a SCHQ with one of its TX rings. */ +uint16_t schq_id;/* * Number of 16B units in the ring. Minimum size for * a ring is 16 16B entries.
@@ -27453,8 +27674,8 @@ struct hwrm_ring_cfg_input {*/ #define HWRM_RING_CFG_INPUT_ENABLES_TX_PROXY_SRC_INTF_OVERRIDE \ UINT32_C(0x4) -/* The sq_id field is valid */ -#define HWRM_RING_CFG_INPUT_ENABLES_SQ_ID \ +/* The schq_id field is valid */ +#define HWRM_RING_CFG_INPUT_ENABLES_SCHQ_ID \ UINT32_C(0x8)/* Update completion ring ID associated with Tx or Rx ring. */ #define HWRM_RING_CFG_INPUT_ENABLES_CMPL_RING_ID_UPDATE \
@@ -27471,12 +27692,12 @@ struct hwrm_ring_cfg_input {*/ uint16_t proxy_fid;/* -* Identifies the new scheduler queue (SQ) to associate with the ring. -* Only valid for Tx rings. +* Identifies the new scheduler queue (SCHQ) to associate with the +* ring. Only valid for Tx rings. * A value of zero indicates that the Tx ring should be associated -* with the default scheduler queue (SQ). +* with the default scheduler queue (SCHQ). */ -uint16_t sq_id; +uint16_t schq_id;/* * This field is valid for TX or Rx rings. This value identifies the * new completion ring ID to associate with the TX or Rx ring.
@@ -27622,12 +27843,12 @@ struct hwrm_ring_qcfg_output {*/ uint16_t proxy_fid;/* -* Identifies the new scheduler queue (SQ) to associate with the ring. -* Only valid for Tx rings. +* Identifies the new scheduler queue (SCHQ) to associate with the +* ring. Only valid for Tx rings. * A value of zero indicates that the Tx ring should be associated with -* the default scheduler queue (SQ). +* the default scheduler queue (SCHQ). */ -uint16_t sq_id; +uint16_t schq_id;/* * This field is used when ring_type is a TX or Rx ring. * This value indicates what completion ring the TX or Rx ring
@@ -28222,13 +28443,13 @@ struct hwrm_ring_grp_free_output {uint8_t valid; } __rte_packed; -/********************** -* hwrm_ring_sq_alloc * -**********************/ +/************************ +* hwrm_ring_schq_alloc * +************************/ -/* hwrm_ring_sq_alloc_input (size:1088b/136B) */ -struct hwrm_ring_sq_alloc_input { +/* hwrm_ring_schq_alloc_input (size:1088b/136B) */ +struct hwrm_ring_schq_alloc_input {/* The HWRM command request type. */ uint16_t req_type;/*
@@ -28262,380 +28483,396 @@ struct hwrm_ring_sq_alloc_input {* This bit must be '1' for the tqm_ring0 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING0 UINT32_C(0x1) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING0 UINT32_C(0x1)/* * This bit must be '1' for the tqm_ring1 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING1 UINT32_C(0x2) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING1 UINT32_C(0x2)/* * This bit must be '1' for the tqm_ring2 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING2 UINT32_C(0x4) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING2 UINT32_C(0x4)/* * This bit must be '1' for the tqm_ring3 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING3 UINT32_C(0x8) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING3 UINT32_C(0x8)/* * This bit must be '1' for the tqm_ring4 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING4 UINT32_C(0x10) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING4 UINT32_C(0x10)/* * This bit must be '1' for the tqm_ring5 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING5 UINT32_C(0x20) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING5 UINT32_C(0x20)/* * This bit must be '1' for the tqm_ring6 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING6 UINT32_C(0x40) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING6 UINT32_C(0x40)/* * This bit must be '1' for the tqm_ring7 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING7 UINT32_C(0x80) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING7 UINT32_C(0x80)/* Reserved for future use. */ uint32_t reserved;/* TQM ring 0 page size and level. */ uint8_t tqm_ring0_pg_size_tqm_ring0_lvl;/* TQM ring 0 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2/* TQM ring 0 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G/* TQM ring 1 page size and level. */ uint8_t tqm_ring1_pg_size_tqm_ring1_lvl;/* TQM ring 1 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2/* TQM ring 1 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G/* TQM ring 2 page size and level. */ uint8_t tqm_ring2_pg_size_tqm_ring2_lvl;/* TQM ring 2 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2/* TQM ring 2 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G/* TQM ring 3 page size and level. */ uint8_t tqm_ring3_pg_size_tqm_ring3_lvl;/* TQM ring 3 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2/* TQM ring 3 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G/* TQM ring 4 page size and level. */ uint8_t tqm_ring4_pg_size_tqm_ring4_lvl;/* TQM ring 4 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2/* TQM ring 4 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G/* TQM ring 5 page size and level. */ uint8_t tqm_ring5_pg_size_tqm_ring5_lvl;/* TQM ring 5 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2/* TQM ring 5 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G/* TQM ring 6 page size and level. */ uint8_t tqm_ring6_pg_size_tqm_ring6_lvl;/* TQM ring 6 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2/* TQM ring 6 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G/* TQM ring 7 page size and level. */ uint8_t tqm_ring7_pg_size_tqm_ring7_lvl;/* TQM ring 7 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2/* TQM ring 7 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G/* TQM ring 0 page directory. */ uint64_t tqm_ring0_page_dir;/* TQM ring 1 page directory. */
@@ -28661,7 +28898,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring0_num_entries;/*
@@ -28673,7 +28910,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring1_num_entries;/*
@@ -28685,7 +28922,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring2_num_entries;/*
@@ -28697,7 +28934,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring3_num_entries;/*
@@ -28709,7 +28946,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring4_num_entries;/*
@@ -28721,7 +28958,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring5_num_entries;/*
@@ -28733,7 +28970,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring6_num_entries;/*
@@ -28745,7 +28982,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring7_num_entries;/* Number of bytes that have been allocated for each context entry. */
@@ -28753,8 +28990,8 @@ struct hwrm_ring_sq_alloc_input {uint8_t unused_0[6 ]; } __rte_packed; -/* hwrm_ring_sq_alloc_output (size:128b/16B) */ -struct hwrm_ring_sq_alloc_output { +/* hwrm_ring_schq_alloc_output (size:128b/16B) */ +struct hwrm_ring_schq_alloc_output {/* The specific error status for the command. */ uint16_t error_code;/* The HWRM command request type. */
@@ -28764,11 +29001,11 @@ struct hwrm_ring_sq_alloc_output {/* The length of the response data in number of bytes. */ uint16_t resp_len;/* -* This is an identifier for the SQ to be used in other HWRM commands -* that need to reference this SQ. This value is greater than zero -* (i.e. a sq_id of zero references the default SQ). +* This is an identifier for the SCHQ to be used in other HWRM commands +* that need to reference this SCHQ. This value is greater than zero +* (i.e. a schq_id of zero references the default SCHQ). */ -uint16_t sq_id; +uint16_t schq_id;uint8_t unused_0[5 ];/* * This field is used in Output records to indicate that the output
@@ -28780,13 +29017,13 @@ struct hwrm_ring_sq_alloc_output {uint8_t valid; } __rte_packed; -/******************** -* hwrm_ring_sq_cfg * -********************/ +/********************** +* hwrm_ring_schq_cfg * +**********************/ -/* hwrm_ring_sq_cfg_input (size:768b/96B) */ -struct hwrm_ring_sq_cfg_input { +/* hwrm_ring_schq_cfg_input (size:768b/96B) */ +struct hwrm_ring_schq_cfg_input {/* The HWRM command request type. */ uint16_t req_type;/*
@@ -28816,23 +29053,23 @@ struct hwrm_ring_sq_cfg_input {*/ uint64_t resp_addr;/* -* Identifies the SQ being configured. A sq_id of zero refers to the -* default SQ. +* Identifies the SCHQ being configured. A schq_id of zero refers to +* the default SCHQ. */ -uint16_t sq_id; +uint16_t schq_id;/* * This field is an 8 bit bitmap that indicates which TCs are enabled -* in this SQ. Bit 0 represents traffic class 0 and bit 7 represents +* in this SCHQ. Bit 0 represents traffic class 0 and bit 7 represents * traffic class 7. */ uint8_t tc_enabled;uint8_t unused_0;uint32_t flags;/* The tc_max_bw array and the max_bw parameters are valid */ -#define HWRM_RING_SQ_CFG_INPUT_FLAGS_TC_MAX_BW_ENABLED \ +#define HWRM_RING_SCHQ_CFG_INPUT_FLAGS_TC_MAX_BW_ENABLED \ UINT32_C(0x1)/* The tc_min_bw array is valid */ -#define HWRM_RING_SQ_CFG_INPUT_FLAGS_TC_MIN_BW_ENABLED \ +#define HWRM_RING_SCHQ_CFG_INPUT_FLAGS_TC_MIN_BW_ENABLED \ UINT32_C(0x2)/* Maximum bandwidth of the traffic class, specified in Mbps. */ uint32_t max_bw_tc0;
@@ -28854,68 +29091,68 @@ struct hwrm_ring_sq_cfg_input {* Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc0;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc1;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc2;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc3;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc4;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc5;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc6;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc7;/* * Indicates the max bandwidth for all enabled traffic classes in -* this SQ, specified in Mbps. +* this SCHQ, specified in Mbps. */ uint32_t max_bw;uint8_t unused_1[4 ]; } __rte_packed; -/* hwrm_ring_sq_cfg_output (size:128b/16B) */ -struct hwrm_ring_sq_cfg_output { +/* hwrm_ring_schq_cfg_output (size:128b/16B) */ +struct hwrm_ring_schq_cfg_output {/* The specific error status for the command. */ uint16_t error_code;/* The HWRM command request type. */
@@ -28935,13 +29172,13 @@ struct hwrm_ring_sq_cfg_output {uint8_t valid; } __rte_packed; -/********************* -* hwrm_ring_sq_free * -*********************/ +/*********************** +* hwrm_ring_schq_free * +***********************/ -/* hwrm_ring_sq_free_input (size:192b/24B) */ -struct hwrm_ring_sq_free_input { +/* hwrm_ring_schq_free_input (size:192b/24B) */ +struct hwrm_ring_schq_free_input {/* The HWRM command request type. */ uint16_t req_type;/*
@@ -28970,13 +29207,13 @@ struct hwrm_ring_sq_free_input {* point to a physically contiguous block of memory. */ uint64_t resp_addr; -/* Identifies the SQ being freed. */ -uint16_t sq_id; +/* Identifies the SCHQ being freed. */ +uint16_t schq_id;uint8_t unused_0[6 ]; } __rte_packed; -/* hwrm_ring_sq_free_output (size:128b/16B) */ -struct hwrm_ring_sq_free_output { +/* hwrm_ring_schq_free_output (size:128b/16B) */ +struct hwrm_ring_schq_free_output {/* The specific error status for the command. */ uint16_t error_code;/* The HWRM command request type. */
@@ -38802,7 +39039,9 @@ struct hwrm_tf_global_cfg_set_input {/* unused. */ uint8_t unused0[6 ];/* Data to set */ -uint8_t data[16 ]; +uint8_t data[8 ]; +/* Mask of data to set, 0 indicates no mask */ +uint8_t mask[8 ]; } __rte_packed;/* hwrm_tf_global_cfg_set_output (size:128b/16B) */
@@ -38903,6 +39142,182 @@ struct hwrm_tf_global_cfg_get_output {uint8_t data[16 ]; } __rte_packed; +/********************** +* hwrm_tf_if_tbl_get * +**********************/ + + +/* hwrm_tf_if_tbl_get_input (size:256b/32B) */ +struct hwrm_tf_if_tbl_get_input { +/* The HWRM command request type. */ +uint16_t req_type; +/* +* The completion ring to send the completion event on. This should +* be the NQ ID returned from the `nq_alloc` HWRM command. +*/ +uint16_t cmpl_ring; +/* +* The sequence ID is used by the driver for tracking multiple +* commands. This ID is treated as opaque data by the firmware and +* the value is returned in the `hwrm_resp_hdr` upon completion. +*/ +uint16_t seq_id; +/* +* The target ID of the command: +* * 0x0-0xFFF8 - The function ID +* * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors +* * 0xFFFD - Reserved for user-space HWRM interface +* * 0xFFFF - HWRM +*/ +uint16_t target_id; +/* +* A physical address pointer pointing to a host buffer that the +* command's response data will be written. This can be either a host +* physical address (HPA) or a guest physical address (GPA) and must +* point to a physically contiguous block of memory. +*/ +uint64_t resp_addr; +/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */ +uint32_t fw_session_id; +/* Control flags. */ +uint16_t flags; +/* Indicates the flow direction. */ +#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR UINT32_C(0x1) +/* If this bit set to 0, then it indicates rx flow. */ +#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_RX UINT32_C(0x0) +/* If this bit is set to 1, then it indicates that tx flow. */ +#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX UINT32_C(0x1) +#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_LAST \ + HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX +/* Size of the data to set. */ +uint16_t size; +/* +* Type of the resource, defined globally in the +* hwrm_tf_resc_type enum. +*/ +uint32_t type; +/* Index of the type to retrieve. */ +uint32_t index; +} __rte_packed; + +/* hwrm_tf_if_tbl_get_output (size:256b/32B) */ +struct hwrm_tf_if_tbl_get_output { +/* The specific error status for the command. */ +uint16_t error_code; +/* The HWRM command request type. */ +uint16_t req_type; +/* The sequence ID from the original command. */ +uint16_t seq_id; +/* The length of the response data in number of bytes. */ +uint16_t resp_len; +/* Response code. */ +uint32_t resp_code; +/* Response size. */ +uint16_t size; +/* unused */ +uint16_t unused0; +/* Response data. */ +uint8_t data[8 ]; +/* unused */ +uint8_t unused1[7 ]; +/* +* This field is used in Output records to indicate that the output +* is completely written to RAM. This field should be read as '1' +* to indicate that the output has been completely written. +* When writing a command completion or response to an internal +* processor, the order of writes has to be such that this field +* is written last. +*/ +uint8_t valid; +} __rte_packed; + +/*************************** +* hwrm_tf_if_tbl_type_set * +***************************/ + + +/* hwrm_tf_if_tbl_set_input (size:384b/48B) */ +struct hwrm_tf_if_tbl_set_input { +/* The HWRM command request type. */ +uint16_t req_type; +/* +* The completion ring to send the completion event on. This should +* be the NQ ID returned from the `nq_alloc` HWRM command. +*/ +uint16_t cmpl_ring; +/* +* The sequence ID is used by the driver for tracking multiple +* commands. This ID is treated as opaque data by the firmware and +* the value is returned in the `hwrm_resp_hdr` upon completion. +*/ +uint16_t seq_id; +/* +* The target ID of the command: +* * 0x0-0xFFF8 - The function ID +* * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors +* * 0xFFFD - Reserved for user-space HWRM interface +* * 0xFFFF - HWRM +*/ +uint16_t target_id; +/* +* A physical address pointer pointing to a host buffer that the +* command's response data will be written. This can be either a host +* physical address (HPA) or a guest physical address (GPA) and must +* point to a physically contiguous block of memory. +*/ +uint64_t resp_addr; +/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */ +uint32_t fw_session_id; +/* Control flags. */ +uint16_t flags; +/* Indicates the flow direction. */ +#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR UINT32_C(0x1) +/* If this bit set to 0, then it indicates rx flow. */ +#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_RX UINT32_C(0x0) +/* If this bit is set to 1, then it indicates that tx flow. */ +#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX UINT32_C(0x1) +#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_LAST \ + HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX +/* unused. */ +uint8_t unused0[2 ]; +/* +* Type of the resource, defined globally in the +* hwrm_tf_resc_type enum. +*/ +uint32_t type; +/* Index of the type to set. */ +uint32_t index; +/* Size of the data to set. */ +uint16_t size; +/* unused */ +uint8_t unused1[6 ]; +/* Data to be set. */ +uint8_t data[8 ]; +} __rte_packed; + +/* hwrm_tf_if_tbl_set_output (size:128b/16B) */ +struct hwrm_tf_if_tbl_set_output { +/* The specific error status for the command. */ +uint16_t error_code; +/* The HWRM command request type. */ +uint16_t req_type; +/* The sequence ID from the original command. */ +uint16_t seq_id; +/* The length of the response data in number of bytes. */ +uint16_t resp_len; +/* unused. */ +uint8_t unused0[7 ]; +/* +* This field is used in Output records to indicate that the output +* is completely written to RAM. This field should be read as '1' +* to indicate that the output has been completely written. +* When writing a command completion or response to an internal +* processor, the order of writes has to be such that this field +* is written last. +*/ +uint8_t valid; +} __rte_packed; +/****************************** * hwrm_tunnel_dst_port_query * ******************************/
drivers/net/bnxt/tf_core/tf_msg.c +31 -27
103 lines not on this page · raw message
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 15/25 net/bnxt: remove VLAN pop action for egress flows
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Whitney platform does not support vlan pop action in the egress direction, hence the vlan pop action is removed from the egress action templates.
--- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 42 +++++-------------- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 3 +- 2 files changed, 12 insertions(+), 33 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +11 -31
@@ -1036,7 +1036,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = { }, { .resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE, - .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV6, + .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV4, .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL, .cond_opcode = BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET,
@@ -1434,21 +1434,11 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, - .result_operand = { - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , - (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, + .result_operand = { +BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
@@ -2346,21 +2336,11 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, - .result_operand = { - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , - (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, + .result_operand = { +BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +1 -2
@@ -218,8 +218,7 @@ enum bnxt_ulp_mapper_opc {BNXT_ULP_MAPPER_OPC_IF_ACT_BIT_THEN_ACT_PROP_ELSE_CONST =9 ,BNXT_ULP_MAPPER_OPC_IF_ACT_BIT_THEN_CONST_ELSE_CONST =10 ,BNXT_ULP_MAPPER_OPC_IF_COMP_FIELD_THEN_CF_ELSE_CF =11 , -BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST =12 , -BNXT_ULP_MAPPER_OPC_LAST =13 +BNXT_ULP_MAPPER_OPC_LAST =12 }; enum bnxt_ulp_mark_db_opcode {
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 16/25 net/bnxt: increase counter support from 8K to 16K
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
The number of internal stats counter is increased to 16k in both egress and ingress direction.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +2 -2
@@ -91,7 +91,7 @@ ulp_ctx_session_open(struct bnxt *bp,/* Table Types */ resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_FULL_ACT_RECORD ] =8192 ; - resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =8192 ; + resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =16384 ; resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4 ] =1023 ;/* ENCAP */
@@ -125,7 +125,7 @@ ulp_ctx_session_open(struct bnxt *bp,/* Table Types */ resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_FULL_ACT_RECORD ] =8192 ; - resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =8192 ; + resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =16384 ; resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4 ] =1023 ;/* ENCAP */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 17/25 net/bnxt: fix to explicitly check and set for start cntr ID
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
Instead of relying on value of Flow counter ID to determine validity have an explicit boolean flag for the same to check and set.
--- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 8 ++++---- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c +4 -4
@@ -431,8 +431,7 @@ bool ulp_fc_mgr_start_idx_isset(struct bnxt_ulp_context *ctxt, enum tf_dir dir) ulp_fc_info =bnxt_ulp_cntxt_ptr2_fc_info_get (ctxt); -/* Assuming start_idx of 0 is invalid */ -return (ulp_fc_info->shadow_hw_tbl[dir].start_idx !=0 ); +return ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set; }/*
@@ -456,9 +455,10 @@ int32_t ulp_fc_mgr_start_idx_set(struct bnxt_ulp_context *ctxt, enum tf_dir dir,if (!ulp_fc_info)return -EIO ; -/* Assuming that 0 is an invalid counter ID ? */ -if (ulp_fc_info->shadow_hw_tbl[dir].start_idx ==0 ) +if (!ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set) { ulp_fc_info->shadow_hw_tbl[dir].start_idx = start_idx; + ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set = true; + }return 0 ; }
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h +1 -0
@@ -38,6 +38,7 @@ struct hw_fc_mem_info {*/ void *mem_pa;uint32_t start_idx; +bool start_idx_is_set; };struct bnxt_ulp_fc_info {
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 18/25 net/bnxt: enable support for VXLAN ipv6 encapsulation
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Add code to support vxlan ipv6 tunnel encapsulation. The ipv6 flow traffic class and flow label wild card match are ignore to support ovs offload.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 1 + drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 132 ++++++++++++++---- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 +- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_utils.c | 43 ++++-- drivers/net/bnxt/tf_ulp/ulp_utils.h | 7 +- 6 files changed, 147 insertions(+), 43 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +1 -0
@@ -149,6 +149,7 @@ ulp_ctx_session_open(struct bnxt *bp,/* SP */ resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV4 ] =488 ; + resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV6 ] =511 ; rc =tf_open_session (&bp->tfp, ¶ms);if (rc) {
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +104 -28
225 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +4 -1
@@ -17,7 +17,10 @@#define BNXT_ULP_ENCAP_IPV4_ID_PROTO 6#define BNXT_ULP_ENCAP_IPV4_DEST_IP 4#define BNXT_ULP_ENCAP_IPV4_SIZE 12 -#define BNXT_ULP_ENCAP_IPV6_SIZE 8 +#define BNXT_ULP_ENCAP_IPV6_VTC_FLOW 4 +#define BNXT_ULP_ENCAP_IPV6_PROTO_TTL 2 +#define BNXT_ULP_ENCAP_IPV6_DO 2 +#define BNXT_ULP_ENCAP_IPV6_SIZE 24#define BNXT_ULP_ENCAP_UDP_SIZE 4#define BNXT_ULP_INVALID_SVIF_VAL -1U
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +1 -1
@@ -1036,7 +1036,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = { }, { .resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE, - .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV4, + .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV6, .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL, .cond_opcode = BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET,
drivers/net/bnxt/tf_ulp/ulp_utils.c +31 -12
66 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_utils.h +6 -1
@@ -9,6 +9,9 @@#include "bnxt.h" #include "ulp_template_db_enum.h" +#define ULP_BUFFER_ALIGN_8_BYTE 8 +#define ULP_BUFFER_ALIGN_16_BYTE 16 +/* * Macros for bitmap sets and gets * These macros can be used if the val are power of 2.
@@ -315,11 +318,13 @@ ulp_operand_read(uint8_t *operand,* dst [out] The destination buffer * src [in] The source buffer dst * size[in] size of the buffer. +* align[in] The alignment is either 8 or 16. */ void ulp_encap_buffer_copy (uint8_t *dst,const uint8_t *src, -uint16_t size); +uint16_t size, +uint16_t align);/* * Check the buffer is empty
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 19/25 net/bnxt: enable support for nat action with tagged traffic
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Added support for performing l3 or l4 rewrite for vlan tagged flows. The outer most dmac, smac and vlan are used to overwrite when nat operations are performed.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 14 ++----- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 6 +++ drivers/net/bnxt/tf_ulp/ulp_mapper.c | 21 ++++++++++ drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 40 ++++++++++++++----- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 3 +- 5 files changed, 63 insertions(+), 21 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +4 -10
@@ -721,15 +721,11 @@ bnxt_ulp_deinit(struct bnxt *bp,/* Disable NAT feature */ (void )bnxt_ulp_global_cfg_update (bp,TF_DIR_RX ,TF_TUNNEL_ENCAP ,TF_TUNNEL_ENCAP_NAT , - (BNXT_ULP_NAT_INNER_L2_HEADER_SMAC | -BNXT_ULP_NAT_INNER_L2_HEADER_DMAC ), -0 ); +BNXT_ULP_NAT_OUTER_MOST_FLAGS ,0 ); (void )bnxt_ulp_global_cfg_update (bp,TF_DIR_TX ,TF_TUNNEL_ENCAP ,TF_TUNNEL_ENCAP_NAT , - (BNXT_ULP_NAT_INNER_L2_HEADER_SMAC | -BNXT_ULP_NAT_INNER_L2_HEADER_DMAC ), -0 ); +BNXT_ULP_NAT_OUTER_MOST_FLAGS ,0 );/* Delete the ulp context and tf session and free the ulp context */ ulp_ctx_deinit (bp, session);
@@ -808,8 +804,7 @@ bnxt_ulp_init(struct bnxt *bp,*/ rc =bnxt_ulp_global_cfg_update (bp,TF_DIR_RX ,TF_TUNNEL_ENCAP ,TF_TUNNEL_ENCAP_NAT , - (BNXT_ULP_NAT_INNER_L2_HEADER_SMAC | -BNXT_ULP_NAT_INNER_L2_HEADER_DMAC ),1 ); +BNXT_ULP_NAT_OUTER_MOST_FLAGS ,1 );if (rc) {BNXT_TF_DBG (ERR ,"Failed to set rx global configuration\n" ); goto jump_to_error;
@@ -817,8 +812,7 @@ bnxt_ulp_init(struct bnxt *bp, rc =bnxt_ulp_global_cfg_update (bp,TF_DIR_TX ,TF_TUNNEL_ENCAP ,TF_TUNNEL_ENCAP_NAT , - (BNXT_ULP_NAT_INNER_L2_HEADER_SMAC | -BNXT_ULP_NAT_INNER_L2_HEADER_DMAC ),1 ); +BNXT_ULP_NAT_OUTER_MOST_FLAGS ,1 );if (rc) {BNXT_TF_DBG (ERR ,"Failed to set tx global configuration\n" ); goto jump_to_error;
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +6 -0
@@ -16,7 +16,13 @@/* NAT defines to reuse existing inner L2 SMAC and DMAC */ #define BNXT_ULP_NAT_INNER_L2_HEADER_SMAC 0x2000 +#define BNXT_ULP_NAT_OUTER_MOST_L2_HDR_SMAC 0x6000 +#define BNXT_ULP_NAT_OUTER_MOST_L2_VLAN_TAGS 0xc00#define BNXT_ULP_NAT_INNER_L2_HEADER_DMAC 0x100 +#define BNXT_ULP_NAT_OUTER_MOST_L2_HDR_DMAC 0x300 +#define BNXT_ULP_NAT_OUTER_MOST_FLAGS (BNXT_ULP_NAT_OUTER_MOST_L2_HDR_SMAC |\ + BNXT_ULP_NAT_OUTER_MOST_L2_VLAN_TAGS |\ + BNXT_ULP_NAT_OUTER_MOST_L2_HDR_DMAC)/* defines for the ulp_flags */ #define BNXT_ULP_VF_REP_ENABLED 0x1
drivers/net/bnxt/tf_ulp/ulp_mapper.c +21 -0
@@ -783,6 +783,7 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,uint32_t val_size =0 , field_size =0 ;uint64_t act_bit;uint8_t act_val; +uint64_t hdr_bit;switch (fld->result_opcode) {case BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT :
@@ -1033,6 +1034,26 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,return -EINVAL ; }break ; +case BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST : +if (!ulp_operand_read (fld->result_operand, + (uint8_t *)&hdr_bit,sizeof (uint64_t ))) { +BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); +return -EINVAL ; + } + hdr_bit =tfp_be_to_cpu_64 (hdr_bit); +if (ULP_BITMAP_ISSET (parms->hdr_bitmap->bits, hdr_bit)) { +/* Header bit is set so consider operand_true */ + val = fld->result_operand_true; + }else { +/* Header bit is not set, use the operand false */ + val = fld->result_operand_false; + } +if (!ulp_blob_push (blob, val, fld->field_bit_size)) { +BNXT_TF_DBG (ERR ,"%s failed to add field\n" , + name); +return -EINVAL ; + } +break ;default :BNXT_TF_DBG (ERR ,"invalid result mapper opcode 0x%x\n" , fld->result_opcode);
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +30 -10
@@ -1434,11 +1434,21 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, - .result_operand = { -BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , -0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, + .result_operand = { + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , + (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
@@ -2336,11 +2346,21 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, - .result_operand = { -BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , -0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, + .result_operand = { + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , + (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +2 -1
@@ -218,7 +218,8 @@ enum bnxt_ulp_mapper_opc {BNXT_ULP_MAPPER_OPC_IF_ACT_BIT_THEN_ACT_PROP_ELSE_CONST =9 ,BNXT_ULP_MAPPER_OPC_IF_ACT_BIT_THEN_CONST_ELSE_CONST =10 ,BNXT_ULP_MAPPER_OPC_IF_COMP_FIELD_THEN_CF_ELSE_CF =11 , -BNXT_ULP_MAPPER_OPC_LAST =12 +BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST =12 , +BNXT_ULP_MAPPER_OPC_LAST =13 }; enum bnxt_ulp_mark_db_opcode {
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 20/25 net/bnxt: fix out of bound access in action bit handling
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
The act_val is changed to be array to resolve out of bound access issue
--- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_mapper.c +5 -6
@@ -782,7 +782,7 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,uint64_t regval;uint32_t val_size =0 , field_size =0 ;uint64_t act_bit; -uint8_t act_val; +uint8_t act_val[16 ];uint64_t hdr_bit;switch (fld->result_opcode) {
@@ -824,19 +824,18 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,return -EINVAL ; } act_bit =tfp_be_to_cpu_64 (act_bit); +memset (act_val,0 ,sizeof (act_val));if (ULP_BITMAP_ISSET (parms->act_bitmap->bits, act_bit)) - act_val =1 ; -else - act_val =0 ; + act_val[0 ] =1 ;if (fld->field_bit_size >ULP_BYTE_2_BITS (sizeof (act_val))) {BNXT_TF_DBG (ERR ,"%s field size is incorrect\n" , name);return -EINVAL ; } -if (!ulp_blob_push (blob, &act_val, fld->field_bit_size)) { +if (!ulp_blob_push (blob, act_val, fld->field_bit_size)) {BNXT_TF_DBG (ERR ,"%s push field failed\n" , name);return -EINVAL ; } - val = &act_val; + val = act_val;break ;case BNXT_ULP_MAPPER_OPC_SET_TO_ENCAP_ACT_PROP_SZ : if (!ulp_operand_read(fld->result_operand,
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 21/25 net/bnxt: provide switch info while VF-Reps are configured
In reply to Ajit KhapardeFrom: Sriharsha Basavapatna <[email protected]>
Some applications need switch_info of the device to be returned as a part of eth_dev_info_get(). The offload logic in such applications could use this info.
--- drivers/net/bnxt/bnxt_ethdev.c | 8 ++++++++ drivers/net/bnxt/bnxt_reps.c | 5 +++++ drivers/net/bnxt/bnxt_reps.h | 7 +++++++ 3 files changed, 20 insertions(+)
drivers/net/bnxt/bnxt_ethdev.c +8 -0
@@ -908,6 +908,14 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, dev_info->tx_desc_lim.nb_min =BNXT_MIN_RING_DESC ; dev_info->tx_desc_lim.nb_max =BNXT_MAX_TX_RING_DESC ; +if (BNXT_PF (bp) ||BNXT_VF_IS_TRUSTED (bp)) { + dev_info->switch_info.name = eth_dev->device->name; + dev_info->switch_info.domain_id = bp->switch_domain_id; + dev_info->switch_info.port_id = +BNXT_PF (bp) ?BNXT_SWITCH_PORT_ID_PF : +BNXT_SWITCH_PORT_ID_TRUSTED_VF ; + } +/* *INDENT-ON* */ /*
drivers/net/bnxt/bnxt_reps.c +5 -0
@@ -501,6 +501,11 @@ int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev, dev_info->tx_offload_capa =BNXT_DEV_TX_OFFLOAD_SUPPORT ; dev_info->flow_type_rss_offloads =BNXT_ETH_RSS_SUPPORT ; + dev_info->switch_info.name = eth_dev->device->name; + dev_info->switch_info.domain_id = rep_bp->switch_domain_id; + dev_info->switch_info.port_id = + rep_bp->vf_id &BNXT_SWITCH_PORT_ID_VF_MASK ; +return 0 ; }
drivers/net/bnxt/bnxt_reps.h +7 -0
@@ -12,6 +12,13 @@#define BNXT_MAX_CFA_CODE 65536#define BNXT_VF_IDX_INVALID 0xffff +/* Switchdev Port ID Mapping (Per switch domain id). +* Lower 15 bits map the VFs (VF_ID). Upper bit maps the PF. +*/ +#define BNXT_SWITCH_PORT_ID_PF 0x8000 +#define BNXT_SWITCH_PORT_ID_TRUSTED_VF 0x0 +#define BNXT_SWITCH_PORT_ID_VF_MASK 0x7FFF +uint16_t bnxt_vfr_recv (uint16_t port_id,uint16_t queue_id,struct rte_mbuf *mbuf);int bnxt_vf_representor_init (struct rte_eth_dev *eth_dev,void *params);
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 22/25 net/bnxt: fix bugs in representor data path
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
1.Representor Rx ring producer index was not getting reset in the ring full case. Fix it by incrementing only in success case.
2.Instead of calling the mbuf specific routine to free the mbuf when representor ring is full rte_free was being called leading to 'invalid memory' errors being logged.
3. Do not account the pkt meant for the representor in the parent Rx ring's array that is returned to the application.
--- drivers/net/bnxt/bnxt_reps.c | 7 ++++--- drivers/net/bnxt/bnxt_rxr.c | 27 +++++++++++++-------------- 2 files changed, 17 insertions(+), 17 deletions(-)
drivers/net/bnxt/bnxt_reps.c +4 -3
@@ -55,16 +55,17 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf) mask = rep_rxr->rx_ring_struct->ring_mask;/* Put this mbuf on the RxQ of the Representor */ - prod_rx_buf = - &rep_rxr->rx_buf_ring[rep_rxr->rx_prod++ & mask]; + prod_rx_buf = &rep_rxr->rx_buf_ring[rep_rxr->rx_prod & mask];if (!prod_rx_buf->mbuf) { prod_rx_buf->mbuf = mbuf; vfr_bp->rx_bytes[que] += mbuf->pkt_len; vfr_bp->rx_pkts[que]++; + rep_rxr->rx_prod++; }else { +/* Representor Rx ring full, drop pkt */ vfr_bp->rx_drop_bytes[que] += mbuf->pkt_len; vfr_bp->rx_drop_pkts[que]++; -rte_pktmbuf_free (mbuf);/* Representor Rx ring full, drop pkt */ +rte_pktmbuf_free (mbuf); }return 0 ;
drivers/net/bnxt/bnxt_rxr.c +13 -14
@@ -733,6 +733,19 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, goto rx; } rxr->rx_prod = prod; + +if (BNXT_TRUFLOW_EN (bp) && (BNXT_VF_IS_TRUSTED (bp) ||BNXT_PF (bp)) && + vfr_flag) { +bnxt_vfr_recv (mark_id, rxq->queue_id, mbuf); +/* Now return an error so that nb_rx_pkts is not +* incremented. +* This packet was meant to be given to the representor. +* So no need to account the packet and give it to +* parent Rx burst function. +*/ + rc = -ENODEV ; + goto next_rx; + }/* * All MBUFs are allocated with the same size under DPDK, * no optimization for rx_copy_thresh
@@ -740,20 +753,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, rx: *rx_pkt = mbuf; -if (BNXT_TRUFLOW_EN (bp) && - (BNXT_VF_IS_TRUSTED (bp) ||BNXT_PF (bp)) && - vfr_flag) { -if (!bnxt_vfr_recv (mark_id, rxq->queue_id, mbuf)) { -/* Now return an error so that nb_rx_pkts is not -* incremented. -* This packet was meant to be given to the representor. -* So no need to account the packet and give it to -* parent Rx burst function. -*/ - rc = -ENODEV ; - } - } - next_rx: *raw_cons = tmp_raw_cons;
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 23/25 net/bnxt: add support for locks in flow database
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Added support for mutex protection for the flow database to prevent simultaneous access to flow database and protect flow creation and deletion.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 33 +++++++++++++++++++++++++++ drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 7 ++++++ drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 13 ++++++++++- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 20 +++++++++++++++- 4 files changed, 71 insertions(+), 2 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +33 -0
@@ -727,6 +727,9 @@ bnxt_ulp_deinit(struct bnxt *bp,TF_TUNNEL_ENCAP_NAT , BNXT_ULP_NAT_OUTER_MOST_FLAGS, 0); +/* free the flow db lock */ +pthread_mutex_destroy (&bp->ulp_ctx->cfg_data->flow_db_lock); +/* Delete the ulp context and tf session and free the ulp context */ ulp_ctx_deinit (bp, session);BNXT_TF_DBG (DEBUG ,"ulp ctx has been deinitialized\n" );
@@ -750,6 +753,12 @@ bnxt_ulp_init(struct bnxt *bp, goto jump_to_error; } + rc =pthread_mutex_init (&bp->ulp_ctx->cfg_data->flow_db_lock,NULL ); +if (rc) { +BNXT_TF_DBG (ERR ,"Unable to initialize flow db lock\n" ); + goto jump_to_error; + } +/* Initialize ulp dparms with values devargs passed */ rc =ulp_dparms_init (bp, bp->ulp_ctx);if (rc) {
@@ -1235,3 +1244,27 @@ bnxt_ulp_cntxt_ptr2_ulp_vfr_info_get(struct bnxt_ulp_context *ulp_ctx,return &ulp_ctx->cfg_data->vfr_rule_info[port_id]; } + +/* Function to acquire the flow database lock from the ulp context. */ +int32_t +bnxt_ulp_cntxt_acquire_fdb_lock (struct bnxt_ulp_context *ulp_ctx) +{ +if (!ulp_ctx || !ulp_ctx->cfg_data) +return -1 ; + +if (pthread_mutex_lock (&ulp_ctx->cfg_data->flow_db_lock)) { +BNXT_TF_DBG (ERR ,"unable to acquire fdb lock\n" ); +return -1 ; + } +return 0 ; +} + +/* Function to release the flow database lock from the ulp context. */ +void +bnxt_ulp_cntxt_release_fdb_lock (struct bnxt_ulp_context *ulp_ctx) +{ +if (!ulp_ctx || !ulp_ctx->cfg_data) +return ; + +pthread_mutex_unlock (&ulp_ctx->cfg_data->flow_db_lock); +}
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +7 -0
@@ -47,6 +47,7 @@ struct bnxt_ulp_data {uint32_t dev_id;/* Hardware device id */ uint32_t ref_cnt;struct bnxt_ulp_flow_db *flow_db; +pthread_mutex_t flow_db_lock;void *mapper_data;struct bnxt_ulp_port_db *port_db;struct bnxt_ulp_fc_info *fc_info;
@@ -196,4 +197,10 @@ struct bnxt_ulp_vfr_rule_info* bnxt_ulp_cntxt_ptr2_ulp_vfr_info_get(struct bnxt_ulp_context *ulp_ctx, uint32_t port_id); +int32_t +bnxt_ulp_cntxt_acquire_fdb_lock (struct bnxt_ulp_context *ulp_ctx); + +void +bnxt_ulp_cntxt_release_fdb_lock (struct bnxt_ulp_context *ulp_ctx); +#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +12 -1
@@ -793,10 +793,17 @@ int32_t ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,BNXT_TF_DBG (ERR ,"Flow database not found\n" );return -EINVAL ; } +if (bnxt_ulp_cntxt_acquire_fdb_lock (ulp_ctx)) { +BNXT_TF_DBG (ERR ,"Flow db lock acquire failed\n" ); +return -EINVAL ; + } + flow_tbl = &flow_db->flow_tbl[idx];while (!ulp_flow_db_next_entry_get (flow_tbl, &fid))ulp_mapper_resources_free (ulp_ctx, fid, idx); +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx); +return 0 ; }
@@ -826,13 +833,17 @@ ulp_flow_db_function_flow_flush(struct bnxt_ulp_context *ulp_ctx,BNXT_TF_DBG (ERR ,"Flow database not found\n" );return -EINVAL ; } +if (bnxt_ulp_cntxt_acquire_fdb_lock (ulp_ctx)) { +BNXT_TF_DBG (ERR ,"Flow db lock acquire failed\n" ); +return -EINVAL ; + } flow_tbl = &flow_db->flow_tbl[BNXT_ULP_REGULAR_FLOW_TABLE ];while (!ulp_flow_db_next_entry_get (flow_tbl, &flow_id)) {if (flow_db->func_id_tbl[flow_id] == func_id)ulp_mapper_resources_free (ulp_ctx, flow_id,BNXT_ULP_REGULAR_FLOW_TABLE ); } - +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx);return 0 ; }
drivers/net/bnxt/tf_ulp/ulp_mapper.c +19 -1
@@ -2668,12 +2668,21 @@ int32_t ulp_mapper_flow_destroy(struct bnxt_ulp_context *ulp_ctx, uint32_t fid, enum bnxt_ulp_flow_db_tables flow_tbl_type) { + int32_t rc; +if (!ulp_ctx) {BNXT_TF_DBG (ERR ,"Invalid parms, unable to free flow\n" );return -EINVAL ; } +if (bnxt_ulp_cntxt_acquire_fdb_lock (ulp_ctx)) { +BNXT_TF_DBG (ERR ,"Flow db lock acquire failed\n" ); +return -EINVAL ; + } + + rc =ulp_mapper_resources_free (ulp_ctx, fid, flow_tbl_type); +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx); +return rc; -return ulp_mapper_resources_free (ulp_ctx, fid, flow_tbl_type); }/* Function to handle the default global templates that are allocated during
@@ -2838,6 +2847,12 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,return -EINVAL ; } +/* Protect flow creation */ +if (bnxt_ulp_cntxt_acquire_fdb_lock (ulp_ctx)) { +BNXT_TF_DBG (ERR ,"Flow db lock acquire failed\n" ); +return -EINVAL ; + } +/* Allocate a Flow ID for attaching all resources for the flow to. * Once allocated, all errors have to walk the list of resources and * free each of them.
@@ -2848,6 +2863,7 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx, &parms.fid);if (rc) {BNXT_TF_DBG (ERR ,"Unable to allocate flow table entry\n" ); +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx);return rc; }
@@ -2871,10 +2887,12 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx, } *flowid = parms.fid; +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx);return rc; flow_error: +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx);/* Free all resources that were allocated during flow creation */ trc =ulp_mapper_flow_destroy (ulp_ctx, parms.fid,BNXT_ULP_REGULAR_FLOW_TABLE );
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 24/25 net/bnxt: fix to check for vnic ptr in bnxt shutdown path
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
Add a couple of NULL ptr checks in bnxt_free_all_filters() and bnxt_free_vnics() respectively to guard against certain error injection/recovery scenarios where it was found that the application was crashing with the bp->vnic_info ptr being NULL.
--- drivers/net/bnxt/bnxt_filter.c | 14 +++++++++----- drivers/net/bnxt/bnxt_vnic.c | 3 +++ 2 files changed, 12 insertions(+), 5 deletions(-)
drivers/net/bnxt/bnxt_filter.c +9 -5
@@ -81,6 +81,15 @@ void bnxt_free_all_filters(struct bnxt *bp)struct bnxt_filter_info *filter, *temp_filter;unsigned int i; +for (i =0 ; i < bp->pf->max_vfs; i++) { + STAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) { +bnxt_hwrm_clear_l2_filter (bp, filter); + } + } + +if (bp->vnic_info ==NULL ) +return ; +for (i =0 ; i < bp->nr_vnics; i++) { vnic = &bp->vnic_info[i]; filter =STAILQ_FIRST (&vnic->filter);
@@ -95,11 +104,6 @@ void bnxt_free_all_filters(struct bnxt *bp)STAILQ_INIT (&vnic->filter); } -for (i =0 ; i < bp->pf->max_vfs; i++) { - STAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) { -bnxt_hwrm_clear_l2_filter (bp, filter); - } - } }void bnxt_free_filter_mem (struct bnxt *bp)
drivers/net/bnxt/bnxt_vnic.c +3 -0
@@ -78,6 +78,9 @@ void bnxt_free_all_vnics(struct bnxt *bp)struct bnxt_vnic_info *vnic;unsigned int i; +if (bp->vnic_info ==NULL ) +return ; +for (i =0 ; i < bp->max_vnics; i++) { vnic = &bp->vnic_info[i];STAILQ_INSERT_TAIL (&bp->free_vnic_list, vnic, next);
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH 25/25 net/bnxt: fix to have a separate mutex for FW health check
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
def_cp_lock was added to sync race between dev_configure and int_handler. It should not be used to synchronize scheduling of FW health check between dev_start and async event handler as well, use a separate mutex for the same.
--- drivers/net/bnxt/bnxt.h | 1 + drivers/net/bnxt/bnxt_ethdev.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-)
drivers/net/bnxt/bnxt.h +1 -0
@@ -713,6 +713,7 @@ struct bnxt {rte_iova_t hwrm_short_cmd_req_dma_addr;rte_spinlock_t hwrm_lock;pthread_mutex_t def_cp_lock; +pthread_mutex_t health_check_lock;uint16_t max_req_len;uint16_t max_resp_len;uint16_t hwrm_max_ext_req_len;
drivers/net/bnxt/bnxt_ethdev.c +12 -4
@@ -1252,9 +1252,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) eth_dev->rx_pkt_burst =bnxt_receive_function (eth_dev); eth_dev->tx_pkt_burst =bnxt_transmit_function (eth_dev); -pthread_mutex_lock (&bp->def_cp_lock);bnxt_schedule_fw_health_check (bp); -pthread_mutex_unlock (&bp->def_cp_lock);return 0 ;
@@ -4663,17 +4661,22 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp) {uint32_t polling_freq; +pthread_mutex_lock (&bp->health_check_lock); +if (!bnxt_is_recovery_enabled (bp)) -return ; + goto done;if (bp->flags &BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED ) -return ; + goto done; polling_freq = bp->recovery_info->driver_polling_freq;rte_eal_alarm_set (US_PER_MS * polling_freq, bnxt_check_fw_health, (void *)bp); bp->flags |=BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED ; + +done: +pthread_mutex_unlock (&bp->health_check_lock); }static void bnxt_cancel_fw_health_check (struct bnxt *bp)
@@ -5461,6 +5464,10 @@ bnxt_init_locks(struct bnxt *bp) err =pthread_mutex_init (&bp->def_cp_lock,NULL );if (err)PMD_DRV_LOG (ERR ,"Unable to initialize def_cp_lock\n" ); + + err =pthread_mutex_init (&bp->health_check_lock,NULL ); +if (err) +PMD_DRV_LOG (ERR ,"Unable to initialize health_check_lock\n" );return err; }
@@ -5869,6 +5876,7 @@ bnxt_uninit_locks(struct bnxt *bp) {pthread_mutex_destroy (&bp->flow_lock);pthread_mutex_destroy (&bp->def_cp_lock); +pthread_mutex_destroy (&bp->health_check_lock);if (bp->rep_info) {pthread_mutex_destroy (&bp->rep_info->vfr_lock);pthread_mutex_destroy (&bp->rep_info->vfr_start_lock);
Signature · 1 line
2.21.1 (Apple Git-122.3)
v2 cover patchset for bnxt
In reply to Ajit KhapardeSome fixes and enhancements in the PMD and TruFlow layers.
v1->v2:
- rebased to latest
- updated commit messages
Kishore Padmanabha (14):
net/bnxt: fix port stop process and cleanup resources net/bnxt: fix the drop action flow to support count net/bnxt: reject flow offload with invalid MAC net/bnxt: reduce debug log messages
net/bnxt: fix coexistence of ipv4 and ipv6 ingress rules net/bnxt: modify default flow rule creation net/bnxt: fix the function id used in flow flush net/bnxt: refactor VFR port clean up
net/bnxt: remove VLAN pop action for egress flows net/bnxt: increase counter support from 8K to 16K net/bnxt: enable VXLAN ipv6 encapsulation net/bnxt: enable NAT action with tagged traffic net/bnxt: fix out of bound access in bit handling net/bnxt: add locks in flow database
Mike Baucom (1):
net/bnxt: free the EM index on failure
Randy Schacher (1):
net/bnxt: use direct HWRM message for interface table
Shahaji Bhosle (2):
net/bnxt: add null pointer check for resource manager net/bnxt: update resource settings
Somnath Kotur (6):
net/bnxt: fix crash in VFR queue select net/bnxt: fix VFR cleanup during init failure net/bnxt: check and set initial counter ID net/bnxt: fix bugs in representor data path net/bnxt: fix to check VNIC in shutdown path net/bnxt: add separate mutex for FW health check
Sriharsha Basavapatna (1):
net/bnxt: provide switch info if VFR are configured
drivers/net/bnxt/bnxt.h | 13 +- drivers/net/bnxt/bnxt_ethdev.c | 101 +- drivers/net/bnxt/bnxt_filter.c | 14 +- drivers/net/bnxt/bnxt_hwrm.c | 13 +- drivers/net/bnxt/bnxt_reps.c | 162 +- drivers/net/bnxt/bnxt_reps.h | 8 + drivers/net/bnxt/bnxt_rxr.c | 27 +- drivers/net/bnxt/bnxt_vnic.c | 3 + drivers/net/bnxt/hsi_struct_def_dpdk.h | 935 ++- drivers/net/bnxt/tf_core/tf_em_internal.c | 5 +- drivers/net/bnxt/tf_core/tf_msg.c | 58 +- drivers/net/bnxt/tf_core/tf_rm.c | 14 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 569 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 34 +- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 56 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 131 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 8 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 1 + drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 17 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 4 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 52 +- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 6 - drivers/net/bnxt/tf_ulp/ulp_port_db.c | 41 + drivers/net/bnxt/tf_ulp/ulp_port_db.h | 13 + drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 153 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 +- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 295 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 5531 +++++++++++------ .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 66 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 767 ++- drivers/net/bnxt/tf_ulp/ulp_utils.c | 43 +- drivers/net/bnxt/tf_ulp/ulp_utils.h | 7 +- 32 files changed, 5836 insertions(+), 3316 deletions(-)
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 1/25 net/bnxt: fix resource cleanup in port stop
From: Kishore Padmanabha <[email protected]>
The port deinitialization now cleans up all the resources properly. If all the ports are stopped then ULP context is freed.
Added fix to update the correct tfp pointer in the ULP context with the changes to support multi control channels.
--- drivers/net/bnxt/bnxt.h | 12 +- drivers/net/bnxt/bnxt_ethdev.c | 18 +- drivers/net/bnxt/bnxt_reps.c | 106 ++--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 494 ++++++++++++++---------- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 16 +- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 19 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 131 ++++++- drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 4 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 4 +- 9 files changed, 494 insertions(+), 310 deletions(-)
drivers/net/bnxt/bnxt.h +7 -5
@@ -822,8 +822,7 @@ struct bnxt_vf_representor {uint16_t dflt_vnic_id;uint16_t svif;uint16_t vfr_tx_cfa_action; -uint32_t rep2vf_flow_id; -uint32_t vf2rep_flow_id; +uint32_t dpdk_port_id;/* Private data store of associated PF/Trusted VF */ struct rte_eth_dev *parent_dev;uint8_t mac_addr[RTE_ETHER_ADDR_LEN ];
@@ -893,11 +892,14 @@ extern int bnxt_logtype_driver; PMD_DRV_LOG_RAW(level, fmt, ## args) extern const struct rte_flow_ops bnxt_ulp_rte_flow_ops; -int32_t bnxt_ulp_init (struct bnxt *bp); -void bnxt_ulp_deinit (struct bnxt *bp); +int32_t bnxt_ulp_port_init (struct bnxt *bp); +void bnxt_ulp_port_deinit (struct bnxt *bp);int32_t bnxt_ulp_create_df_rules (struct bnxt *bp);void bnxt_ulp_destroy_df_rules (struct bnxt *bp,bool global); - +int32_t +bnxt_ulp_create_vfr_default_rules (struct rte_eth_dev *vfr_ethdev); +int32_t +bnxt_ulp_delete_vfr_default_rules (struct bnxt_vf_representor *vfr);uint16_t bnxt_get_vnic_id (uint16_t port,enum bnxt_ulp_intf_type type);uint16_t bnxt_get_svif (uint16_t port_id,bool func_svif,enum bnxt_ulp_intf_type type);
drivers/net/bnxt/bnxt_ethdev.c +12 -6
@@ -1236,6 +1236,11 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)if (rc) goto error; +/* Initialize bnxt ULP port details */ + rc =bnxt_ulp_port_init (bp); +if (rc) + goto error; + eth_dev->rx_pkt_burst =bnxt_receive_function (eth_dev); eth_dev->tx_pkt_burst =bnxt_transmit_function (eth_dev);
@@ -1243,8 +1248,6 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)bnxt_schedule_fw_health_check (bp);pthread_mutex_unlock (&bp->def_cp_lock); -bnxt_ulp_init (bp); -return 0 ; error:
@@ -1306,8 +1309,8 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)/* disable uio/vfio intr/eventfd mapping */ rte_intr_disable (intr_handle); -bnxt_ulp_destroy_df_rules (bp, false); -bnxt_ulp_deinit (bp); +/* delete the bnxt ULP port details */ +bnxt_ulp_port_deinit (bp);bnxt_cancel_fw_health_check (bp);
@@ -1601,8 +1604,6 @@ static int bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev)if (rc !=0 ) vnic->flags = old_flags; -bnxt_ulp_create_df_rules (bp); -return rc; }
@@ -3716,9 +3717,14 @@ bnxt_filter_ctrl_op(struct rte_eth_dev *dev,struct bnxt *bp = dev->data->dev_private;int ret =0 ; +if (!bp) +return -EIO ; +if (BNXT_ETH_DEV_IS_REPRESENTOR (dev)) {struct bnxt_vf_representor *vfr = dev->data->dev_private; bp = vfr->parent_dev->data->dev_private; +if (!bp) +return -EIO ; } ret =is_bnxt_in_error (bp);
drivers/net/bnxt/bnxt_reps.c +30 -76
145 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +299 -195
662 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +13 -3
@@ -28,6 +28,13 @@ struct bnxt_ulp_df_rule_info {uint8_t valid; }; +struct bnxt_ulp_vfr_rule_info { +uint32_t rep2vf_flow_id; +uint32_t vf2rep_flow_id; +uint16_t parent_port_id; +uint8_t valid; +}; +struct bnxt_ulp_data {uint32_t tbl_scope_id;struct bnxt_ulp_mark_tbl *mark_tbl;
@@ -38,12 +45,12 @@ struct bnxt_ulp_data {struct bnxt_ulp_port_db *port_db;struct bnxt_ulp_fc_info *fc_info;uint32_t ulp_flags; -struct bnxt_ulp_df_rule_info df_rule_info[RTE_MAX_ETHPORTS ]; +struct bnxt_ulp_df_rule_info df_rule_info[RTE_MAX_ETHPORTS ]; +struct bnxt_ulp_vfr_rule_info vfr_rule_info[RTE_MAX_ETHPORTS ]; };struct bnxt_ulp_context {struct bnxt_ulp_data *cfg_data; -/* TBD The tfp should be removed once tf_attach is implemented. */ struct tf *g_tfp; };
@@ -58,7 +65,6 @@ struct bnxt_ulp_session_state {pthread_mutex_t bnxt_ulp_mutex;struct bnxt_ulp_pci_info pci_info;struct bnxt_ulp_data *cfg_data; -/* TBD The tfp should be removed once tf_attach is implemented. */ struct tf *g_tfp;uint32_t session_opened; };
@@ -183,4 +189,8 @@ int32_t bnxt_ulp_get_df_rule_info(uint8_t port_id, struct bnxt_ulp_context *ulp_ctx, struct bnxt_ulp_df_rule_info *info); +struct bnxt_ulp_vfr_rule_info * +bnxt_ulp_cntxt_ptr2_ulp_vfr_info_get (struct bnxt_ulp_context *ulp_ctx, +uint32_t port_id); +#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +8 -11
@@ -87,19 +87,19 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,uint32_t class_id, act_tmpl;struct rte_flow *flow_id;uint32_t fid; -int ret; +int ret =BNXT_TF_RC_ERROR ;if (bnxt_ulp_flow_validate_args (attr, pattern, actions, error) ==BNXT_TF_RC_ERROR ) {BNXT_TF_DBG (ERR ,"Invalid arguments being passed\n" ); -return NULL ; + goto parse_error; } ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (dev);if (!ulp_ctx) {BNXT_TF_DBG (ERR ,"ULP context is not initialized\n" ); -return NULL ; + goto parse_error; }/* Initialize the parser params */
@@ -173,20 +173,20 @@ bnxt_ulp_flow_validate(struct rte_eth_dev *dev, {struct ulp_rte_parser_params params;uint32_t class_id, act_tmpl; -int ret; +int ret =BNXT_TF_RC_ERROR ;struct bnxt_ulp_context *ulp_ctx;if (bnxt_ulp_flow_validate_args (attr, pattern, actions, error) ==BNXT_TF_RC_ERROR ) {BNXT_TF_DBG (ERR ,"Invalid arguments being passed\n" ); -return -EINVAL ; + goto parse_error; } ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (dev);if (!ulp_ctx) {BNXT_TF_DBG (ERR ,"ULP context is not initialized\n" ); -return -EINVAL ; + goto parse_error; }/* Initialize the parser params */
@@ -289,11 +289,8 @@ bnxt_ulp_flow_flush(struct rte_eth_dev *eth_dev, ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (eth_dev);if (!ulp_ctx) { -BNXT_TF_DBG (ERR ,"ULP context is not initialized\n" ); -rte_flow_error_set (error,EINVAL , -RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , -"Failed to flush flow." ); -return -EINVAL ; +BNXT_TF_DBG (DEBUG ,"ULP context is not initialized\n" ); +return ret; } bp = eth_dev->data->dev_private;
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +122 -9
181 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +1 -3
@@ -351,10 +351,8 @@ int32_t ulp_flow_db_deinit(struct bnxt_ulp_context *ulp_ctxt)struct bnxt_ulp_flow_db *flow_db; flow_db =bnxt_ulp_cntxt_ptr2_flow_db_get (ulp_ctxt); -if (!flow_db) { -BNXT_TF_DBG (ERR ,"Invalid Arguments\n" ); +if (!flow_db)return -EINVAL ; - }/* Detach the flow database from the ulp context. */ bnxt_ulp_cntxt_ptr2_flow_db_set (ulp_ctxt,NULL );
drivers/net/bnxt/tf_ulp/ulp_flow_db.h +2 -2
@@ -9,8 +9,8 @@#include "bnxt_ulp.h" #include "ulp_template_db_enum.h" -#define BNXT_FLOW_DB_DEFAULT_NUM_FLOWS 128 -#define BNXT_FLOW_DB_DEFAULT_NUM_RESOURCES 5 +#define BNXT_FLOW_DB_DEFAULT_NUM_FLOWS 512 +#define BNXT_FLOW_DB_DEFAULT_NUM_RESOURCES 8/* * Structure for the flow database resource information
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 2/25 net/bnxt: fix the drop action flow to support count
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Changed the action template to support count action in addition to a flow that does drop action.
--- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 5 +++-- drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +3 -2
@@ -36,7 +36,7 @@ uint16_t ulp_act_sig_tbl[BNXT_ULP_ACT_SIG_TBL_MAX_SZ] = { [BNXT_ULP_ACT_HID_0020] = 25, [BNXT_ULP_ACT_HID_0901] = 26, [BNXT_ULP_ACT_HID_0121] = 27, - [BNXT_ULP_ACT_HID_0004] = 28, + [BNXT_ULP_ACT_HID_0006] = 28, [BNXT_ULP_ACT_HID_0804] = 29, [BNXT_ULP_ACT_HID_0105] = 30, [BNXT_ULP_ACT_HID_0024] = 31,
@@ -332,9 +332,10 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { .act_tid = 2 }, [28] = { - .act_hid = BNXT_ULP_ACT_HID_0004, + .act_hid = BNXT_ULP_ACT_HID_0006, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_COUNT | +BNXT_ULP_ACTION_BIT_DROP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 },
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +1 -1
@@ -838,7 +838,7 @@ enum bnxt_ulp_act_hid {BNXT_ULP_ACT_HID_0020 =0x0020 ,BNXT_ULP_ACT_HID_0901 =0x0901 ,BNXT_ULP_ACT_HID_0121 =0x0121 , -BNXT_ULP_ACT_HID_0004 =0x0004 , +BNXT_ULP_ACT_HID_0006 =0x0006 ,BNXT_ULP_ACT_HID_0804 =0x0804 ,BNXT_ULP_ACT_HID_0105 =0x0105 , BNXT_ULP_ACT_HID_0024 = 0x0024,
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 3/25 net/bnxt: reject flow offload with invalid MAC
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Reject offload flows that have broadcast or multicast ethernet addresses.
--- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +21 -0
@@ -603,6 +603,19 @@ ulp_rte_l2_proto_type_update(struct ulp_rte_parser_params *param, } } +/* Internal Function to identify broadcast or multicast packets */ +static int32_t +ulp_rte_parser_is_bcmc_addr (const struct rte_ether_addr *eth_addr) +{ +if (rte_is_multicast_ether_addr (eth_addr) || +rte_is_broadcast_ether_addr (eth_addr)) { +BNXT_TF_DBG (DEBUG , +"No support for bcast or mcast addr offload\n" ); +return 1 ; + } +return 0 ; +} +/* Function to handle the parsing of RTE Flow item Ethernet Header. */ int32_t ulp_rte_eth_hdr_handler(const struct rte_flow_item *item,
@@ -625,10 +638,18 @@ ulp_rte_eth_hdr_handler(const struct rte_flow_item *item, field =ulp_rte_parser_fld_copy (¶ms->hdr_field[idx], eth_spec->dst.addr_bytes, size); +/* Todo: work around to avoid multicast and broadcast addr */ +if (ulp_rte_parser_is_bcmc_addr (ð_spec->dst)) +return BNXT_TF_RC_PARSE_ERR ; + size =sizeof (eth_spec->src.addr_bytes); field =ulp_rte_parser_fld_copy (field, eth_spec->src.addr_bytes, size); +/* Todo: work around to avoid multicast and broadcast addr */ +if (ulp_rte_parser_is_bcmc_addr (ð_spec->src)) +return BNXT_TF_RC_PARSE_ERR ; + field =ulp_rte_parser_fld_copy (field, ð_spec->type,sizeof (eth_spec->type));
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 4/25 net/bnxt: reduce debug log messages
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Removed the mark id log message since it is in the data path. Also optimized the link status debug message.
--- drivers/net/bnxt/bnxt_hwrm.c | 13 ++++--------- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 6 ------ 2 files changed, 4 insertions(+), 15 deletions(-)
drivers/net/bnxt/bnxt_hwrm.c +4 -9
@@ -1343,15 +1343,10 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,HWRM_UNLOCK (); -PMD_DRV_LOG (DEBUG ,"Link Speed %d\n" , link_info->link_speed); -PMD_DRV_LOG (DEBUG ,"Auto Mode %d\n" , link_info->auto_mode); -PMD_DRV_LOG (DEBUG ,"Support Speeds %x\n" , link_info->support_speeds); -PMD_DRV_LOG (DEBUG ,"Auto Link Speed %x\n" , link_info->auto_link_speed); -PMD_DRV_LOG (DEBUG ,"Auto Link Speed Mask %x\n" , - link_info->auto_link_speed_mask); -PMD_DRV_LOG (DEBUG ,"Forced Link Speed %x\n" , - link_info->force_link_speed); - +PMD_DRV_LOG (DEBUG ,"Link Speed:%d,Auto:%d:%x:%x,Support:%x,Force:%x\n" , + link_info->link_speed, link_info->auto_mode, + link_info->auto_link_speed, link_info->auto_link_speed_mask, + link_info->support_speeds, link_info->force_link_speed);return rc; }
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c +0 -6
@@ -194,9 +194,6 @@ ulp_mark_db_mark_get(struct bnxt_ulp_context *ctxt, ULP_MARK_DB_ENTRY_IS_INVALID(&mtbl->gfid_tbl[idx])) return -EINVAL; -BNXT_TF_DBG (DEBUG ,"Get GFID[0x%0x] = 0x%0x\n" , - idx, mtbl->gfid_tbl[idx].mark_id); - *vfr_flag =ULP_MARK_DB_ENTRY_IS_VFR_ID (&mtbl->gfid_tbl[idx]); *mark = mtbl->gfid_tbl[idx].mark_id; }else {
@@ -204,9 +201,6 @@ ulp_mark_db_mark_get(struct bnxt_ulp_context *ctxt, ULP_MARK_DB_ENTRY_IS_INVALID(&mtbl->lfid_tbl[idx])) return -EINVAL; -BNXT_TF_DBG (DEBUG ,"Get LFID[0x%0x] = 0x%0x\n" , - idx, mtbl->lfid_tbl[idx].mark_id); - *vfr_flag =ULP_MARK_DB_ENTRY_IS_VFR_ID (&mtbl->lfid_tbl[idx]); *mark = mtbl->lfid_tbl[idx].mark_id; }
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 5/25 net/bnxt: fix coexistence of ipv4 and ipv6 ingress rules
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
The ingress rule to match on ipv4 and ipv6 is now two rules to make sure both rules can coexist at the same time. Added count action only for ingress flows.
--- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 298 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 5522 +++++++++++------ .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 66 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 767 ++- 4 files changed, 4088 insertions(+), 2565 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +140 -158
@@ -36,64 +36,61 @@ uint16_t ulp_act_sig_tbl[BNXT_ULP_ACT_SIG_TBL_MAX_SZ] = { [BNXT_ULP_ACT_HID_0020] = 25, [BNXT_ULP_ACT_HID_0901] = 26, [BNXT_ULP_ACT_HID_0121] = 27, - [BNXT_ULP_ACT_HID_0006] = 28, - [BNXT_ULP_ACT_HID_0804] = 29, - [BNXT_ULP_ACT_HID_0105] = 30, - [BNXT_ULP_ACT_HID_0024] = 31, - [BNXT_ULP_ACT_HID_0905] = 32, - [BNXT_ULP_ACT_HID_0125] = 33, - [BNXT_ULP_ACT_HID_0001] = 34, - [BNXT_ULP_ACT_HID_0005] = 35, - [BNXT_ULP_ACT_HID_0009] = 36, - [BNXT_ULP_ACT_HID_000d] = 37, - [BNXT_ULP_ACT_HID_0021] = 38, - [BNXT_ULP_ACT_HID_0029] = 39, - [BNXT_ULP_ACT_HID_0025] = 40, - [BNXT_ULP_ACT_HID_002d] = 41, - [BNXT_ULP_ACT_HID_0801] = 42, - [BNXT_ULP_ACT_HID_0809] = 43, - [BNXT_ULP_ACT_HID_0805] = 44, - [BNXT_ULP_ACT_HID_080d] = 45, - [BNXT_ULP_ACT_HID_0c15] = 46, - [BNXT_ULP_ACT_HID_0c19] = 47, - [BNXT_ULP_ACT_HID_02f6] = 48, - [BNXT_ULP_ACT_HID_04f8] = 49, - [BNXT_ULP_ACT_HID_01df] = 50, - [BNXT_ULP_ACT_HID_07e5] = 51, - [BNXT_ULP_ACT_HID_06ce] = 52, - [BNXT_ULP_ACT_HID_02fa] = 53, - [BNXT_ULP_ACT_HID_04fc] = 54, - [BNXT_ULP_ACT_HID_01e3] = 55, - [BNXT_ULP_ACT_HID_07e9] = 56, - [BNXT_ULP_ACT_HID_06d2] = 57, - [BNXT_ULP_ACT_HID_03f7] = 58, - [BNXT_ULP_ACT_HID_05f9] = 59, - [BNXT_ULP_ACT_HID_02e0] = 60, - [BNXT_ULP_ACT_HID_08e6] = 61, - [BNXT_ULP_ACT_HID_07cf] = 62, - [BNXT_ULP_ACT_HID_03fb] = 63, - [BNXT_ULP_ACT_HID_05fd] = 64, - [BNXT_ULP_ACT_HID_02e4] = 65, - [BNXT_ULP_ACT_HID_08ea] = 66, - [BNXT_ULP_ACT_HID_07d3] = 67, - [BNXT_ULP_ACT_HID_040d] = 68, - [BNXT_ULP_ACT_HID_040f] = 69, - [BNXT_ULP_ACT_HID_0413] = 70, - [BNXT_ULP_ACT_HID_0c0d] = 71, + [BNXT_ULP_ACT_HID_0004] = 28, + [BNXT_ULP_ACT_HID_0006] = 29, + [BNXT_ULP_ACT_HID_0804] = 30, + [BNXT_ULP_ACT_HID_0105] = 31, + [BNXT_ULP_ACT_HID_0024] = 32, + [BNXT_ULP_ACT_HID_0905] = 33, + [BNXT_ULP_ACT_HID_0125] = 34, + [BNXT_ULP_ACT_HID_0001] = 35, + [BNXT_ULP_ACT_HID_0005] = 36, + [BNXT_ULP_ACT_HID_0009] = 37, + [BNXT_ULP_ACT_HID_000d] = 38, + [BNXT_ULP_ACT_HID_0021] = 39, + [BNXT_ULP_ACT_HID_0029] = 40, + [BNXT_ULP_ACT_HID_0025] = 41, + [BNXT_ULP_ACT_HID_002d] = 42, + [BNXT_ULP_ACT_HID_0801] = 43, + [BNXT_ULP_ACT_HID_0809] = 44, + [BNXT_ULP_ACT_HID_0805] = 45, + [BNXT_ULP_ACT_HID_080d] = 46, + [BNXT_ULP_ACT_HID_0c15] = 47, + [BNXT_ULP_ACT_HID_0c19] = 48, + [BNXT_ULP_ACT_HID_02f6] = 49, + [BNXT_ULP_ACT_HID_04f8] = 50, + [BNXT_ULP_ACT_HID_01df] = 51, + [BNXT_ULP_ACT_HID_07e5] = 52, + [BNXT_ULP_ACT_HID_06ce] = 53, + [BNXT_ULP_ACT_HID_02fa] = 54, + [BNXT_ULP_ACT_HID_04fc] = 55, + [BNXT_ULP_ACT_HID_01e3] = 56, + [BNXT_ULP_ACT_HID_07e9] = 57, + [BNXT_ULP_ACT_HID_06d2] = 58, + [BNXT_ULP_ACT_HID_03f7] = 59, + [BNXT_ULP_ACT_HID_05f9] = 60, + [BNXT_ULP_ACT_HID_02e0] = 61, + [BNXT_ULP_ACT_HID_08e6] = 62, + [BNXT_ULP_ACT_HID_07cf] = 63, + [BNXT_ULP_ACT_HID_03fb] = 64, + [BNXT_ULP_ACT_HID_05fd] = 65, + [BNXT_ULP_ACT_HID_02e4] = 66, + [BNXT_ULP_ACT_HID_08ea] = 67, + [BNXT_ULP_ACT_HID_07d3] = 68, + [BNXT_ULP_ACT_HID_040d] = 69, + [BNXT_ULP_ACT_HID_040f] = 70, + [BNXT_ULP_ACT_HID_0413] = 71, [BNXT_ULP_ACT_HID_0567] = 72, [BNXT_ULP_ACT_HID_0a49] = 73, [BNXT_ULP_ACT_HID_050e] = 74, - [BNXT_ULP_ACT_HID_0d0e] = 75, - [BNXT_ULP_ACT_HID_0668] = 76, - [BNXT_ULP_ACT_HID_0b4a] = 77, - [BNXT_ULP_ACT_HID_0411] = 78, - [BNXT_ULP_ACT_HID_056b] = 79, - [BNXT_ULP_ACT_HID_0a4d] = 80, - [BNXT_ULP_ACT_HID_0c11] = 81, - [BNXT_ULP_ACT_HID_0512] = 82, - [BNXT_ULP_ACT_HID_0d12] = 83, - [BNXT_ULP_ACT_HID_066c] = 84, - [BNXT_ULP_ACT_HID_0b4e] =85 + [BNXT_ULP_ACT_HID_0668] = 75, + [BNXT_ULP_ACT_HID_0b4a] = 76, + [BNXT_ULP_ACT_HID_0411] = 77, + [BNXT_ULP_ACT_HID_056b] = 78, + [BNXT_ULP_ACT_HID_0a4d] = 79, + [BNXT_ULP_ACT_HID_0512] = 80, + [BNXT_ULP_ACT_HID_066c] = 81, + [BNXT_ULP_ACT_HID_0b4e] =82 };struct bnxt_ulp_act_match_info ulp_act_match_list[] = {
@@ -332,6 +329,13 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { .act_tid = 2 }, [28] = { + .act_hid = BNXT_ULP_ACT_HID_0004, + .act_sig = { .bits = +BNXT_ULP_ACTION_BIT_COUNT | + BNXT_ULP_FLOW_DIR_BITMASK_ING }, + .act_tid =2 + }, + [29] = { .act_hid = BNXT_ULP_ACT_HID_0006, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -339,7 +343,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [29] = { + [30] = { .act_hid = BNXT_ULP_ACT_HID_0804, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -347,7 +351,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [30] = { + [31] = { .act_hid = BNXT_ULP_ACT_HID_0105, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -355,7 +359,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [31] = { + [32] = { .act_hid = BNXT_ULP_ACT_HID_0024, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -363,7 +367,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [32] = { + [33] = { .act_hid = BNXT_ULP_ACT_HID_0905, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -372,7 +376,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [33] = { + [34] = { .act_hid = BNXT_ULP_ACT_HID_0125, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -381,14 +385,14 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =2 }, - [34] = { + [35] = { .act_hid = BNXT_ULP_ACT_HID_0001, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_MARK | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [35] = { + [36] = { .act_hid = BNXT_ULP_ACT_HID_0005, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -396,7 +400,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [36] = { + [37] = { .act_hid = BNXT_ULP_ACT_HID_0009, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -404,7 +408,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [37] = { + [38] = { .act_hid = BNXT_ULP_ACT_HID_000d, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -413,7 +417,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [38] = { + [39] = { .act_hid = BNXT_ULP_ACT_HID_0021, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -421,7 +425,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [39] = { + [40] = { .act_hid = BNXT_ULP_ACT_HID_0029, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -430,7 +434,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [40] = { + [41] = { .act_hid = BNXT_ULP_ACT_HID_0025, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -439,7 +443,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [41] = { + [42] = { .act_hid = BNXT_ULP_ACT_HID_002d, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -449,7 +453,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [42] = { + [43] = { .act_hid = BNXT_ULP_ACT_HID_0801, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -457,7 +461,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [43] = { + [44] = { .act_hid = BNXT_ULP_ACT_HID_0809, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -466,7 +470,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [44] = { + [45] = { .act_hid = BNXT_ULP_ACT_HID_0805, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -475,7 +479,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [45] = { + [46] = { .act_hid = BNXT_ULP_ACT_HID_080d, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_MARK |
@@ -485,14 +489,14 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .act_tid =3 }, - [46] = { + [47] = { .act_hid = BNXT_ULP_ACT_HID_0c15, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_VXLAN_ENCAP | BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =4 }, - [47] = { + [48] = { .act_hid = BNXT_ULP_ACT_HID_0c19, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_VXLAN_ENCAP |
@@ -500,14 +504,14 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =4 }, - [48] = { + [49] = { .act_hid = BNXT_ULP_ACT_HID_02f6, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_SET_IPV4_SRC | BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [49] = { + [50] = { .act_hid = BNXT_ULP_ACT_HID_04f8, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_SET_IPV4_SRC |
@@ -515,14 +519,14 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [50] = { + [51] = { .act_hid = BNXT_ULP_ACT_HID_01df, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_SET_IPV4_DST | BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [51] = { + [52] = { .act_hid = BNXT_ULP_ACT_HID_07e5, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_SET_IPV4_DST |
@@ -531,7 +535,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [52] = { + [53] = { .act_hid = BNXT_ULP_ACT_HID_06ce, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_SET_IPV4_SRC |
@@ -541,7 +545,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [53] = { + [54] = { .act_hid = BNXT_ULP_ACT_HID_02fa, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -549,7 +553,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [54] = { + [55] = { .act_hid = BNXT_ULP_ACT_HID_04fc, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -558,7 +562,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [55] = { + [56] = { .act_hid = BNXT_ULP_ACT_HID_01e3, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -566,7 +570,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [56] = { + [57] = { .act_hid = BNXT_ULP_ACT_HID_07e9, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -576,7 +580,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [57] = { + [58] = { .act_hid = BNXT_ULP_ACT_HID_06d2, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -587,7 +591,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [58] = { + [59] = { .act_hid = BNXT_ULP_ACT_HID_03f7, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -595,7 +599,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [59] = { + [60] = { .act_hid = BNXT_ULP_ACT_HID_05f9, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -604,7 +608,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [60] = { + [61] = { .act_hid = BNXT_ULP_ACT_HID_02e0, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -612,7 +616,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [61] = { + [62] = { .act_hid = BNXT_ULP_ACT_HID_08e6, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -622,7 +626,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [62] = { + [63] = { .act_hid = BNXT_ULP_ACT_HID_07cf, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -633,7 +637,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [63] = { + [64] = { .act_hid = BNXT_ULP_ACT_HID_03fb, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -642,7 +646,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [64] = { + [65] = { .act_hid = BNXT_ULP_ACT_HID_05fd, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -652,7 +656,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [65] = { + [66] = { .act_hid = BNXT_ULP_ACT_HID_02e4, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -661,7 +665,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [66] = { + [67] = { .act_hid = BNXT_ULP_ACT_HID_08ea, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -672,7 +676,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [67] = { + [68] = { .act_hid = BNXT_ULP_ACT_HID_07d3, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -684,20 +688,20 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =5 }, - [68] = { + [69] = { .act_hid = BNXT_ULP_ACT_HID_040d, .act_sig = { .bits = BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [69] = { + [70] = { .act_hid = BNXT_ULP_ACT_HID_040f, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_DROP | BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [70] = { + [71] = { .act_hid = BNXT_ULP_ACT_HID_0413, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DROP |
@@ -705,13 +709,6 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [71] = { - .act_hid = BNXT_ULP_ACT_HID_0c0d, - .act_sig = { .bits = -BNXT_ULP_ACTION_BIT_POP_VLAN | - BNXT_ULP_FLOW_DIR_BITMASK_EGR }, - .act_tid =6 - }, [72] = { .act_hid = BNXT_ULP_ACT_HID_0567, .act_sig = { .bits =
@@ -737,14 +734,6 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { .act_tid = 6 }, [75] = { - .act_hid = BNXT_ULP_ACT_HID_0d0e, - .act_sig = { .bits = -BNXT_ULP_ACTION_BIT_DEC_TTL | -BNXT_ULP_ACTION_BIT_POP_VLAN | - BNXT_ULP_FLOW_DIR_BITMASK_EGR }, - .act_tid =6 - }, - [76] = { .act_hid = BNXT_ULP_ACT_HID_0668, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -754,7 +743,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [77] = { + [76] = { .act_hid = BNXT_ULP_ACT_HID_0b4a, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_DEC_TTL |
@@ -763,14 +752,14 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [78] = { + [77] = { .act_hid = BNXT_ULP_ACT_HID_0411, .act_sig = { .bits =BNXT_ULP_ACTION_BIT_COUNT | BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [79] = { + [78] = { .act_hid = BNXT_ULP_ACT_HID_056b, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -780,7 +769,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [80] = { + [79] = { .act_hid = BNXT_ULP_ACT_HID_0a4d, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -789,15 +778,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [81] = { - .act_hid = BNXT_ULP_ACT_HID_0c11, - .act_sig = { .bits = -BNXT_ULP_ACTION_BIT_COUNT | -BNXT_ULP_ACTION_BIT_POP_VLAN | - BNXT_ULP_FLOW_DIR_BITMASK_EGR }, - .act_tid =6 - }, - [82] = { + [80] = { .act_hid = BNXT_ULP_ACT_HID_0512, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -805,16 +786,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [83] = { - .act_hid = BNXT_ULP_ACT_HID_0d12, - .act_sig = { .bits = -BNXT_ULP_ACTION_BIT_COUNT | -BNXT_ULP_ACTION_BIT_DEC_TTL | -BNXT_ULP_ACTION_BIT_POP_VLAN | - BNXT_ULP_FLOW_DIR_BITMASK_EGR }, - .act_tid =6 - }, - [84] = { + [81] = { .act_hid = BNXT_ULP_ACT_HID_066c, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -825,7 +797,7 @@ struct bnxt_ulp_act_match_info ulp_act_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_EGR }, .act_tid =6 }, - [85] = { + [82] = { .act_hid = BNXT_ULP_ACT_HID_0b4e, .act_sig = { .bits = BNXT_ULP_ACTION_BIT_COUNT |
@@ -1064,7 +1036,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = { }, { .resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE, - .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV4, + .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV6, .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL, .cond_opcode = BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET,
@@ -1462,11 +1434,21 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, - .result_operand = { -BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , -0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, + .result_operand = { + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , + (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
@@ -2364,11 +2346,21 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, - .result_operand = { -BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , -0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, + .result_operand = { + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , + (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
@@ -2593,17 +2585,7 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 1, - .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ACT_BIT, - .result_operand = { - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>56 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>48 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>40 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>32 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>24 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>16 ) &0xff , - ((uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN >>8 ) &0xff , - (uint64_t )BNXT_ULP_ACTION_BIT_POP_VLAN &0xff , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_ZERO }, { .field_bit_size = 1,
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +3491 -2031
2,358 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +32 -34
66 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_field.h +425 -342
767 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.21.1 (Apple Git-122.3)
Part of the diff is not shown here. View the raw message.
PATCH v2 6/25 net/bnxt: free the EM index on failure
In reply to Ajit KhapardeFrom: Mike Baucom <[email protected]>
When a Exact Match entry fails insertion, the allocated index needs to be pushed back to the allocation stack. This patch takes care of that.
--- drivers/net/bnxt/tf_core/tf_em_internal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/bnxt/tf_core/tf_em_internal.c +4 -1
@@ -175,8 +175,11 @@ tf_em_insert_int_entry(struct tf *tfp, &rptr_index, &rptr_entry, &num_of_entries); -if (rc) +if (rc) { +/* Free the allocated index before returning */ +stack_push (pool, index);return -1 ; + }PMD_DRV_LOG (DEBUG,
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 7/25 net/bnxt: add null pointer check for resource manager
In reply to Ajit KhapardeFrom: Shahaji Bhosle <[email protected]>
Verify the resource manager has been allocated prior to using it. This can avoid potential segmentation faults.
--- drivers/net/bnxt/tf_core/tf_rm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/net/bnxt/tf_core/tf_rm.c +14 -0
@@ -706,6 +706,8 @@ tf_rm_allocate(struct tf_rm_allocate_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by RM */
@@ -772,6 +774,8 @@ tf_rm_free(struct tf_rm_free_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by RM */
@@ -817,6 +821,8 @@ tf_rm_is_allocated(struct tf_rm_is_allocated_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by RM */
@@ -860,6 +866,8 @@ tf_rm_get_info(struct tf_rm_get_alloc_info_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by HCAPI */
@@ -883,6 +891,8 @@ tf_rm_get_hcapi_type(struct tf_rm_get_hcapi_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by HCAPI */
@@ -905,6 +915,8 @@ tf_rm_get_inuse_count(struct tf_rm_get_inuse_count_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by RM */
@@ -937,6 +949,8 @@ tf_rm_check_indexes_in_range(struct tf_rm_check_indexes_in_range_parms *parms)TF_CHECK_PARMS2 (parms, parms->rm_db); rm_db = (struct tf_rm_new_db *)parms->rm_db; +if (!rm_db->db) +return -EINVAL ; cfg_type = rm_db->db[parms->db_index].cfg_type;/* Bail out if not controlled by RM */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 8/25 net/bnxt: modify default flow rule creation
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Change default flow rule to use 8-byte encap.
The VFR conduit uses VLAN encap to send packets. So the encap record is changed from 16B to 8B. That frees up 8B of encap records.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 3 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 59 ++++++++++--------- 2 files changed, 32 insertions(+), 30 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +2 -1
@@ -97,7 +97,7 @@ ulp_ctx_session_open(struct bnxt *bp, resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4 ] =1023 ;/* ENCAP */ - resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =16 ; + resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =255 ; resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_16B ] =63 ;/* TCAMs */
@@ -130,6 +130,7 @@ ulp_ctx_session_open(struct bnxt *bp,/* ENCAP */ resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_64B ] =511 ; resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_16B ] =200 ; + resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =255 ;/* TCAMs */ resources->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] =
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +30 -29
169 lines not on this page · raw message
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 9/25 net/bnxt: fix the function id used in flow flush
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
The function id being used in the flush is incorrect, fixed the flush of the flows.
--- drivers/net/bnxt/bnxt_ethdev.c | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 19 +++++++----- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 5 +-- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 39 ++++++++++++++++------- drivers/net/bnxt/tf_ulp/ulp_port_db.c | 41 +++++++++++++++++++++++++ drivers/net/bnxt/tf_ulp/ulp_port_db.h | 13 ++++++++ 6 files changed, 95 insertions(+), 23 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +1 -0
@@ -3723,6 +3723,7 @@ bnxt_filter_ctrl_op(struct rte_eth_dev *dev,if (BNXT_ETH_DEV_IS_REPRESENTOR (dev)) {struct bnxt_vf_representor *vfr = dev->data->dev_private; bp = vfr->parent_dev->data->dev_private; +/* parent is deleted while children are still valid */ if (!bp)return -EIO ; }
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +11 -8
@@ -35,14 +35,12 @@ static pthread_mutex_t bnxt_ulp_global_mutex = PTHREAD_MUTEX_INITIALIZER;* created the session. */ bool -ulp_ctx_deinit_allowed (void *ptr) +ulp_ctx_deinit_allowed (struct bnxt_ulp_context *ulp_ctx) { -struct bnxt *bp = (struct bnxt *)ptr; - -if (!bp || !bp->ulp_ctx || !bp->ulp_ctx->cfg_data) +if (!ulp_ctx || !ulp_ctx->cfg_data)return false; -if (!bp->ulp_ctx->cfg_data->ref_cnt) { +if (!ulp_ctx->cfg_data->ref_cnt) {BNXT_TF_DBG (DEBUG ,"ulp ctx shall initiate deinit\n" );return true; }
@@ -629,9 +627,14 @@ bnxt_ulp_flush_port_flows(struct bnxt *bp) {uint16_t func_id; - func_id =bnxt_get_fw_func_id (bp->eth_dev->data->port_id, -BNXT_ULP_INTF_TYPE_INVALID ); -ulp_flow_db_function_flow_flush (bp->ulp_ctx, func_id); +/* it is assumed that port is either TVF or PF */ +if (ulp_port_db_port_func_id_get (bp->ulp_ctx, + bp->eth_dev->data->port_id, + &func_id)) { +BNXT_TF_DBG (ERR ,"Invalid argument\n" ); +return ; + } + (void )ulp_flow_db_function_flow_flush (bp->ulp_ctx, func_id); }/* Internal function to delete the VFR default flows */
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +1 -4
@@ -83,12 +83,9 @@ struct ulp_tlv_param {/* * Allow the deletion of context only for the bnxt device that * created the session -* TBD - The implementation of the function should change to -* using the reference count once tf_session_attach functionality -* is fixed. */ bool -ulp_ctx_deinit_allowed (void *bp); +ulp_ctx_deinit_allowed (struct bnxt_ulp_context *ulp_ctx);/* Function to set the device id of the hardware. */ int32_t
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +28 -11
@@ -10,6 +10,7 @@#include "ulp_flow_db.h" #include "ulp_mapper.h" #include "ulp_fc_mgr.h" +#include "ulp_port_db.h" #include <rte_malloc.h> static int32_t
@@ -146,8 +147,14 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev, mapper_cparms.act_prop = ¶ms.act_prop; mapper_cparms.class_tid = class_id; mapper_cparms.act_tid = act_tmpl; - mapper_cparms.func_id =bnxt_get_fw_func_id (dev->data->port_id, -BNXT_ULP_INTF_TYPE_INVALID ); + +/* Get the function id */ +if (ulp_port_db_port_func_id_get (ulp_ctx, + dev->data->port_id, + &mapper_cparms.func_id)) { +BNXT_TF_DBG (ERR ,"conversion of port to func id failed\n" ); + goto parse_error; + } mapper_cparms.dir_attr = params.dir_attr;/* Call the ulp mapper to create the flow in the hardware. */
@@ -251,8 +258,17 @@ bnxt_ulp_flow_destroy(struct rte_eth_dev *dev, } flow_id = (uint32_t )(uintptr_t )flow; - func_id =bnxt_get_fw_func_id (dev->data->port_id, -BNXT_ULP_INTF_TYPE_INVALID ); + +if (ulp_port_db_port_func_id_get (ulp_ctx, + dev->data->port_id, + &func_id)) { +BNXT_TF_DBG (ERR ,"conversion of port to func id failed\n" ); +if (error) +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , +"Failed to destroy flow." ); +return -EINVAL ; + }if (ulp_flow_db_validate_flow_func (ulp_ctx, flow_id, func_id) == false) {
@@ -284,23 +300,24 @@ bnxt_ulp_flow_flush(struct rte_eth_dev *eth_dev, {struct bnxt_ulp_context *ulp_ctx;int32_t ret =0 ; -struct bnxt *bp;uint16_t func_id; ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (eth_dev);if (!ulp_ctx) { -BNXT_TF_DBG (DEBUG ,"ULP context is not initialized\n" );return ret; } - bp = eth_dev->data->dev_private;/* Free the resources for the last device */ -if (ulp_ctx_deinit_allowed (bp)) { +if (ulp_ctx_deinit_allowed (ulp_ctx)) { ret =ulp_flow_db_session_flow_flush (ulp_ctx); }else if (bnxt_ulp_cntxt_ptr2_flow_db_get (ulp_ctx)) { - func_id =bnxt_get_fw_func_id (eth_dev->data->port_id, -BNXT_ULP_INTF_TYPE_INVALID ); - ret =ulp_flow_db_function_flow_flush (ulp_ctx, func_id); + ret =ulp_port_db_port_func_id_get (ulp_ctx, + eth_dev->data->port_id, + &func_id); +if (!ret) + ret =ulp_flow_db_function_flow_flush (ulp_ctx, func_id); +else +BNXT_TF_DBG (ERR ,"convert port to func id failed\n" ); }if (ret) rte_flow_error_set(error, ret,
drivers/net/bnxt/tf_ulp/ulp_port_db.c +41 -0
44 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_port_db.h +13 -0
@@ -259,4 +259,17 @@ int32_t ulp_port_db_dev_func_id_to_ulp_index(struct bnxt_ulp_context *ulp_ctxt, uint32_t func_id, uint32_t *ifindex); +/* +* Api to get the function id for a given port id. +* +* ulp_ctxt [in] Ptr to ulp context +* port_id [in] dpdk port id +* func_id [out] the function id of the given ifindex. +* +* Returns 0 on success or negative number on failure. +*/ +int32_t +ulp_port_db_port_func_id_get (struct bnxt_ulp_context *ulp_ctxt, +uint16_t port_id,uint16_t *func_id); +#endif /* _ULP_PORT_DB_H_ */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 10/25 net/bnxt: refactor VFR port clean up
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
When parent VF or PF ports are cleaned up, the child VF representor ports also need to be cleaned up. If not cleaned up, then deleting the parent VF shall result in not cleaning up the hardware rules and updating the firmware of VFR removal. The issue can occur even when application is exited without deleting VFR ports.
--- drivers/net/bnxt/bnxt_ethdev.c | 20 ++++++++++++++-- drivers/net/bnxt/bnxt_reps.c | 38 ++++++++++++++++++++++++++---- drivers/net/bnxt/bnxt_reps.h | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 4 ++-- 4 files changed, 55 insertions(+), 8 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +18 -2
@@ -1309,6 +1309,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)/* disable uio/vfio intr/eventfd mapping */ rte_intr_disable (intr_handle); +/* Stop the child representors for this device */ +bnxt_vf_rep_stop_all (bp); +/* delete the bnxt ULP port details */ bnxt_ulp_port_deinit (bp);
@@ -3724,8 +3727,13 @@ bnxt_filter_ctrl_op(struct rte_eth_dev *dev,struct bnxt_vf_representor *vfr = dev->data->dev_private; bp = vfr->parent_dev->data->dev_private;/* parent is deleted while children are still valid */ -if (!bp) +if (!bp) { +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR Error %d:%d\n" , + dev->data->port_id, + filter_type, + filter_op);return -EIO ; + } } ret =is_bnxt_in_error (bp);
@@ -5927,8 +5935,12 @@ static int bnxt_pci_remove_dev_with_reps(struct rte_eth_dev *eth_dev) vf_rep_eth_dev = bp->rep_info[i].vfr_eth_dev;if (!vf_rep_eth_dev)continue ; +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR pci remove\n" , + vf_rep_eth_dev->data->port_id);rte_eth_dev_destroy (vf_rep_eth_dev, bnxt_vf_representor_uninit); } +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d pci remove\n" , + eth_dev->data->port_id); ret =rte_eth_dev_destroy (eth_dev, bnxt_dev_uninit);return ret;
@@ -6055,6 +6067,8 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev, ret = -ENODEV ;return ret; } +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR pci probe\n" , + backing_eth_dev->data->port_id); backing_bp->rep_info[representor.vf_id].vfr_eth_dev = vf_rep_eth_dev; backing_bp->num_reps++;
@@ -6103,7 +6117,8 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, backing_eth_dev =rte_eth_dev_allocated (pci_dev->device.name); } - +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d pci probe\n" , + backing_eth_dev->data->port_id);/* probe representor ports now */ ret =bnxt_rep_port_probe (pci_dev, eth_da, backing_eth_dev);
@@ -6122,6 +6137,7 @@ static int bnxt_pci_remove(struct rte_pci_device *pci_dev)* +ve value will at least help in proper cleanup */ +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d pci remove\n" , eth_dev->data->port_id);if (rte_eal_process_type () ==RTE_PROC_PRIMARY ) {if (eth_dev->data->dev_flags &RTE_ETH_DEV_REPRESENTOR ) return rte_eth_dev_destroy(eth_dev,
drivers/net/bnxt/bnxt_reps.c +34 -4
@@ -166,6 +166,7 @@ int bnxt_vf_representor_init(struct rte_eth_dev *eth_dev, void *params)struct rte_eth_link *link;struct bnxt *parent_bp; +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR init\n" , eth_dev->data->port_id); vf_rep_bp->vf_id = rep_params->vf_id; vf_rep_bp->switch_domain_id = rep_params->switch_domain_id; vf_rep_bp->parent_dev = rep_params->parent_dev;
@@ -216,15 +217,18 @@ int bnxt_vf_representor_uninit(struct rte_eth_dev *eth_dev)struct bnxt *parent_bp;struct bnxt_vf_representor *rep = (struct bnxt_vf_representor *)eth_dev->data->dev_private; -uint16_t vf_id; +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR uninit\n" , eth_dev->data->port_id); eth_dev->data->mac_addrs =NULL ; eth_dev->dev_ops =NULL ; parent_bp = rep->parent_dev->data->dev_private; -if (!parent_bp) +if (!parent_bp) { +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d already freed\n" , + eth_dev->data->port_id);return 0 ; + } parent_bp->num_reps--; vf_id = rep->vf_id;
@@ -296,7 +300,8 @@ static int bnxt_tf_vfr_alloc(struct rte_eth_dev *vfr_ethdev) vfr->vf_id, rc); (void )bnxt_ulp_delete_vfr_default_rules (vfr); } - +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d VFR created and initialized\n" , + vfr->dpdk_port_id);return rc; }
@@ -361,6 +366,7 @@ int bnxt_vf_rep_dev_start_op(struct rte_eth_dev *eth_dev) parent_bp = rep_bp->parent_dev->data->dev_private; rep_info = &parent_bp->rep_info[rep_bp->vf_id]; +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d VFR start\n" , eth_dev->data->port_id);pthread_mutex_lock (&rep_info->vfr_start_lock);if (!rep_info->conduit_valid) { rc =bnxt_get_dflt_vnic_svif (parent_bp, rep_bp);
@@ -386,6 +392,7 @@ int bnxt_vf_rep_dev_start_op(struct rte_eth_dev *eth_dev)static int bnxt_tf_vfr_free (struct bnxt_vf_representor *vfr) { +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d VFR ulp free\n" , vfr->dpdk_port_id);return bnxt_ulp_delete_vfr_default_rules (vfr); }
@@ -401,8 +408,11 @@ static int bnxt_vfr_free(struct bnxt_vf_representor *vfr) } parent_bp = vfr->parent_dev->data->dev_private; -if (!parent_bp) +if (!parent_bp) { +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR already freed\n" , + vfr->dpdk_port_id);return 0 ; + }/* Check if representor has been already freed in FW */ if (!vfr->vfr_tx_cfa_action)
@@ -432,6 +442,8 @@ void bnxt_vf_rep_dev_stop_op(struct rte_eth_dev *eth_dev) eth_dev->rx_pkt_burst = &bnxt_dummy_recv_pkts; eth_dev->tx_pkt_burst = &bnxt_dummy_xmit_pkts; +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d VFR stop\n" , eth_dev->data->port_id); +bnxt_vfr_free (vfr_bp);if (eth_dev->data->dev_started)
@@ -442,6 +454,7 @@ void bnxt_vf_rep_dev_stop_op(struct rte_eth_dev *eth_dev)void bnxt_vf_rep_dev_close_op (struct rte_eth_dev *eth_dev) { +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d VFR close\n" , eth_dev->data->port_id);bnxt_vf_representor_uninit (eth_dev); }
@@ -721,3 +734,20 @@ int bnxt_vf_rep_stats_reset_op(struct rte_eth_dev *eth_dev) }return 0 ; } + +void bnxt_vf_rep_stop_all (struct bnxt *bp) +{ +uint16_t vf_id; +struct rte_eth_dev *rep_eth_dev; + +/* No vfrep ports just exit */ +if (!bp->rep_info) +return ; + +for (vf_id =0 ; vf_id <BNXT_MAX_VF_REPS ; vf_id++) { + rep_eth_dev = bp->rep_info[vf_id].vfr_eth_dev; +if (!rep_eth_dev) +continue ; +bnxt_vf_rep_dev_stop_op (rep_eth_dev); + } +}
drivers/net/bnxt/bnxt_reps.h +1 -0
@@ -42,4 +42,5 @@ void bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev);int bnxt_vf_rep_stats_get_op (struct rte_eth_dev *eth_dev,struct rte_eth_stats *stats);int bnxt_vf_rep_stats_reset_op (struct rte_eth_dev *eth_dev); +void bnxt_vf_rep_stop_all (struct bnxt *bp);#endif /* _BNXT_REPS_H_ */
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +2 -2
@@ -905,7 +905,7 @@ bnxt_ulp_port_init(struct bnxt *bp) }/* create the default rules */ bnxt_ulp_create_df_rules (bp); -BNXT_TF_DBG (DEBUG ,"ULP Port:%d created and initialized\n" , +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d ULP port init\n" , bp->eth_dev->data->port_id);return rc;
@@ -940,7 +940,7 @@ bnxt_ulp_port_deinit(struct bnxt *bp)return ; } -BNXT_TF_DBG (DEBUG ,"ULP Port:%d destroyed\n" , +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d ULP port deinit\n" , bp->eth_dev->data->port_id);/* Get the session details */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 11/25 net/bnxt: fix crash in VFR queue select
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
Instead of bounds checking against max possible rings while selecting queue index for the VF representor, do it against the number of rings configured.
--- drivers/net/bnxt/bnxt_reps.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/bnxt/bnxt_reps.c +5 -2
@@ -45,9 +45,12 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf) vfr_eth_dev = &rte_eth_devices[port_id]; vfr_bp = vfr_eth_dev->data->dev_private; -/* If rxq_id happens to be > max rep_queue, use rxq0 */ - que = queue_id <BNXT_MAX_VF_REP_RINGS ? queue_id :0 ; +/* If rxq_id happens to be > nr_rings, use ring 0 */ + que = queue_id < vfr_bp->rx_nr_rings ? queue_id :0 ; rep_rxq = vfr_bp->rx_queues[que]; +/* Ideally should not happen now, paranoid check */ +if (!rep_rxq) +return 1 ; rep_rxr = rep_rxq->rx_ring; mask = rep_rxr->rx_ring_struct->ring_mask;
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 12/25 net/bnxt: fix VFR cleanup during init failure
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
If VF-rep port add fails for some reason, code was rolling back all ports added so far. With some applications, there is no need to do that. Just log failure message for the VF rep port add and continue. Also include RTE_MAX_ETH_PORTS value in the bounds check as one port will be taken by the uplink port anyway
--- drivers/net/bnxt/bnxt_ethdev.c | 44 ++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 18 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +26 -18
@@ -6014,7 +6014,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,return -EINVAL ; } -if (num_rep >RTE_MAX_ETHPORTS ) { +if (num_rep >=RTE_MAX_ETHPORTS ) {PMD_DRV_LOG (ERR ,"nb_representor_ports = %d > %d MAX ETHPORTS\n" , num_rep,RTE_MAX_ETHPORTS );
@@ -6057,28 +6057,36 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,NULL ,NULL , bnxt_vf_representor_init, &representor); - -if (!ret) { - vf_rep_eth_dev =rte_eth_dev_allocated (name); -if (!vf_rep_eth_dev) { -PMD_DRV_LOG (ERR ,"Failed to find the eth_dev" -" for VF-Rep: %s." , name); -bnxt_pci_remove_dev_with_reps (backing_eth_dev); - ret = -ENODEV ; -return ret; - } -PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR pci probe\n" , - backing_eth_dev->data->port_id); - backing_bp->rep_info[representor.vf_id].vfr_eth_dev = - vf_rep_eth_dev; - backing_bp->num_reps++; - }else { +if (ret) {PMD_DRV_LOG (ERR ,"failed to create bnxt vf " "representor %s." , name); -bnxt_pci_remove_dev_with_reps (backing_eth_dev); + goto err; } + + vf_rep_eth_dev =rte_eth_dev_allocated (name); +if (!vf_rep_eth_dev) { +PMD_DRV_LOG (ERR ,"Failed to find the eth_dev" +" for VF-Rep: %s." , name); + ret = -ENODEV ; + goto err; + } + +PMD_DRV_LOG (DEBUG ,"BNXT Port:%d VFR pci probe\n" , + backing_eth_dev->data->port_id); + backing_bp->rep_info[representor.vf_id].vfr_eth_dev = + vf_rep_eth_dev; + backing_bp->num_reps++; } +return 0 ; + +err: +/* If num_rep > 1, then rollback already created +* ports, since we'll be failing the probe anyway +*/ +if (num_rep >1 ) +bnxt_pci_remove_dev_with_reps (backing_eth_dev); +return ret; }
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 13/25 net/bnxt: update resource settings
In reply to Ajit KhapardeFrom: Shahaji Bhosle <[email protected]>
Update default resource configuration.
Resources include ENCAP records, TCAM, wild card, source property functions and such.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +16 -13
@@ -85,9 +85,9 @@ ulp_ctx_session_open(struct bnxt *bp,/* Identifiers */ resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH ] =422 ; resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_L2_CTXT_LOW ] =6 ; - resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_WC_PROF ] =8 ; - resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_PROF_FUNC ] =8 ; - resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_EM_PROF ] =8 ; + resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_WC_PROF ] =192 ; + resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_PROF_FUNC ] =64 ; + resources->ident_cnt[TF_DIR_RX ].cnt[TF_IDENT_TYPE_EM_PROF ] =192 ;/* Table Types */ resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_FULL_ACT_RECORD ] =8192 ;
@@ -95,7 +95,7 @@ ulp_ctx_session_open(struct bnxt *bp, resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4 ] =1023 ;/* ENCAP */ - resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =255 ; + resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =511 ; resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_ENCAP_16B ] =63 ;/* TCAMs */
@@ -103,22 +103,25 @@ ulp_ctx_session_open(struct bnxt *bp,422 ; resources->tcam_cnt[TF_DIR_RX ].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW ] =6 ; - resources->tcam_cnt[TF_DIR_RX ].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM ] =8 ; + resources->tcam_cnt[TF_DIR_RX ].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM ] =960 ; resources->tcam_cnt[TF_DIR_RX ].cnt[TF_TCAM_TBL_TYPE_WC_TCAM ] =88 ;/* EM */ - resources->em_cnt[TF_DIR_RX ].cnt[TF_EM_TBL_TYPE_EM_RECORD ] =13176 ; + resources->em_cnt[TF_DIR_RX ].cnt[TF_EM_TBL_TYPE_EM_RECORD ] =13168 ;/* EEM */ resources->em_cnt[TF_DIR_RX ].cnt[TF_EM_TBL_TYPE_TBL_SCOPE ] =1 ; +/* SP */ + resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_SP_SMAC ] =255 ; +/** TX **/ /* Identifiers */ resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH ] =292 ; - resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_L2_CTXT_LOW ] =144 ; - resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_WC_PROF ] =8 ; - resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_PROF_FUNC ] =8 ; - resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_EM_PROF ] =8 ; + resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_L2_CTXT_LOW ] =148 ; + resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_WC_PROF ] =192 ; + resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_PROF_FUNC ] =64 ; + resources->ident_cnt[TF_DIR_TX ].cnt[TF_IDENT_TYPE_EM_PROF ] =192 ;/* Table Types */ resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_FULL_ACT_RECORD ] =8192 ;
@@ -127,7 +130,7 @@ ulp_ctx_session_open(struct bnxt *bp,/* ENCAP */ resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_64B ] =511 ; - resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_16B ] =200 ; + resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_16B ] =223 ; resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_ENCAP_8B ] =255 ;/* TCAMs */
@@ -135,8 +138,8 @@ ulp_ctx_session_open(struct bnxt *bp,292 ; resources->tcam_cnt[TF_DIR_TX ].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW ] =144 ; - resources->tcam_cnt[TF_DIR_TX ].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM ] =8 ; - resources->tcam_cnt[TF_DIR_TX ].cnt[TF_TCAM_TBL_TYPE_WC_TCAM ] =8 ; + resources->tcam_cnt[TF_DIR_TX ].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM ] =960 ; + resources->tcam_cnt[TF_DIR_TX ].cnt[TF_TCAM_TBL_TYPE_WC_TCAM ] =928 ;/* EM */ resources->em_cnt[TF_DIR_TX ].cnt[TF_EM_TBL_TYPE_EM_RECORD ] =15232 ;
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 14/25 net/bnxt: use direct HWRM message for interface table
In reply to Ajit KhapardeFrom: Randy Schacher <[email protected]>
Change interface tables to use direct or non-tunneled HWRM messaging instead of tunneled messaging. Update HWRM API to a new version to allow this change.
--- drivers/net/bnxt/hsi_struct_def_dpdk.h | 935 ++++++++++++++++++------- drivers/net/bnxt/tf_core/tf_msg.c | 58 +- 2 files changed, 706 insertions(+), 287 deletions(-)
drivers/net/bnxt/hsi_struct_def_dpdk.h +675 -260
@@ -341,9 +341,9 @@ struct cmd_nums {#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS UINT32_C(0x52)#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS UINT32_C(0x53)#define HWRM_RING_AGGINT_QCAPS UINT32_C(0x54) -#define HWRM_RING_SQ_ALLOC UINT32_C(0x55) -#define HWRM_RING_SQ_CFG UINT32_C(0x56) -#define HWRM_RING_SQ_FREE UINT32_C(0x57) +#define HWRM_RING_SCHQ_ALLOC UINT32_C(0x55) +#define HWRM_RING_SCHQ_CFG UINT32_C(0x56) +#define HWRM_RING_SCHQ_FREE UINT32_C(0x57)#define HWRM_RING_RESET UINT32_C(0x5e)#define HWRM_RING_GRP_ALLOC UINT32_C(0x60)#define HWRM_RING_GRP_FREE UINT32_C(0x61)
@@ -413,6 +413,7 @@ struct cmd_nums {#define HWRM_FW_IPC_MAILBOX UINT32_C(0xcc)#define HWRM_FW_ECN_CFG UINT32_C(0xcd)#define HWRM_FW_ECN_QCFG UINT32_C(0xce) +#define HWRM_FW_SECURE_CFG UINT32_C(0xcf)#define HWRM_EXEC_FWD_RESP UINT32_C(0xd0)#define HWRM_REJECT_FWD_RESP UINT32_C(0xd1)#define HWRM_FWD_RESP UINT32_C(0xd2)
@@ -704,6 +705,10 @@ struct cmd_nums {/* Experimental */ #define HWRM_TF_GLOBAL_CFG_GET UINT32_C(0x2fd)/* Experimental */ +#define HWRM_TF_IF_TBL_SET UINT32_C(0x2fe) +/* Experimental */ +#define HWRM_TF_IF_TBL_GET UINT32_C(0x2ff) +/* Experimental */ #define HWRM_SV UINT32_C(0x400)/* Experimental */ #define HWRM_DBG_READ_DIRECT UINT32_C(0xff10)
@@ -942,8 +947,8 @@ struct hwrm_err_output {#define HWRM_VERSION_MINOR 10#define HWRM_VERSION_UPDATE 1/* non-zero means beta version */ -#define HWRM_VERSION_RSVD 48 -#define HWRM_VERSION_STR "1.10.1.48" +#define HWRM_VERSION_RSVD 56 +#define HWRM_VERSION_STR "1.10.1.56"/**************** * hwrm_ver_get *
@@ -2204,16 +2209,18 @@ struct rx_prod_pkt_bd {*/ #define RX_PROD_PKT_BD_FLAGS_EOP_PAD UINT32_C(0x80)/* +* This field has been deprecated. There can be no additional +* BDs for this packet from this ring. +* +* Old definition: * This value is the number of additional buffers in the ring that * describe the buffer space to be consumed for this packet. * If the value is zero, then the packet must fit within the * space described by this BD. If this value is 1 or more, it * indicates how many additional "buffer" BDs are in the ring * immediately following this BD to be used for the same -* network packet. -* -* Even if the packet to be placed does not need all the -* additional buffers, they will be consumed anyway. +* network packet. Even if the packet to be placed does not need +* all the additional buffers, they will be consumed anyway. */ #define RX_PROD_PKT_BD_FLAGS_BUFFERS_MASK UINT32_C(0x300)#define RX_PROD_PKT_BD_FLAGS_BUFFERS_SFT 8
@@ -3585,16 +3592,36 @@ struct rx_pkt_v2_cmpl {* truncation placement is used, this value represents the placed * (truncated) length of the packet. */ -#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_MASK UINT32_C(0x1ff) -#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_SFT 0 +#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_MASK UINT32_C(0x1ff) +#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_SFT 0/* This is data from the CFA as indicated by the meta_format field. */ -#define RX_PKT_V2_CMPL_METADATA1_MASK UINT32_C(0xf000) -#define RX_PKT_V2_CMPL_METADATA1_SFT 12 -/* When meta_format != 0, this value is the VLAN TPID_SEL. */ -#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_MASK UINT32_C(0x7000) -#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_SFT 12 +#define RX_PKT_V2_CMPL_METADATA1_MASK UINT32_C(0xf000) +#define RX_PKT_V2_CMPL_METADATA1_SFT 12/* When meta_format != 0, this value is the VLAN TPID_SEL. */ -#define RX_PKT_V2_CMPL_METADATA1_VALID UINT32_C(0x8000) +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_MASK UINT32_C(0x7000) +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_SFT 12 +/* 0x88a8 */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID88A8 \ + (UINT32_C(0x0) << 12) +/* 0x8100 */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID8100 \ + (UINT32_C(0x1) << 12) +/* 0x9100 */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9100 \ + (UINT32_C(0x2) << 12) +/* 0x9200 */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9200 \ + (UINT32_C(0x3) << 12) +/* 0x9300 */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9300 \ + (UINT32_C(0x4) << 12) +/* Value programmed in CFA VLANTPID register. */ +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG \ + (UINT32_C(0x5) << 12) +#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_LAST \ + RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG +/* When meta_format != 0, this value is the VLAN valid. */ +#define RX_PKT_V2_CMPL_METADATA1_VALID UINT32_C(0x8000)/* * This value is the RSS hash value calculated for the packet * based on the mode bits and key value in the VNIC. When vee_cmpl_mode
@@ -4484,15 +4511,38 @@ struct rx_tpa_start_v2_cmpl {* with. Use this number to correlate the TPA start completion * with the TPA end completion. */ -#define RX_TPA_START_V2_CMPL_AGG_ID_MASK UINT32_C(0xfff) -#define RX_TPA_START_V2_CMPL_AGG_ID_SFT 0 -#define RX_TPA_START_V2_CMPL_METADATA1_MASK UINT32_C(0xf000) -#define RX_TPA_START_V2_CMPL_METADATA1_SFT 12 +#define RX_TPA_START_V2_CMPL_AGG_ID_MASK UINT32_C(0xfff) +#define RX_TPA_START_V2_CMPL_AGG_ID_SFT 0 +#define RX_TPA_START_V2_CMPL_METADATA1_MASK \ + UINT32_C(0xf000) +#define RX_TPA_START_V2_CMPL_METADATA1_SFT 12/* When meta_format != 0, this value is the VLAN TPID_SEL. */ -#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_MASK UINT32_C(0x7000) -#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_SFT 12 +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_MASK \ + UINT32_C(0x7000) +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_SFT 12 +/* 0x88a8 */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID88A8 \ + (UINT32_C(0x0) << 12) +/* 0x8100 */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID8100 \ + (UINT32_C(0x1) << 12) +/* 0x9100 */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9100 \ + (UINT32_C(0x2) << 12) +/* 0x9200 */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9200 \ + (UINT32_C(0x3) << 12) +/* 0x9300 */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9300 \ + (UINT32_C(0x4) << 12) +/* Value programmed in CFA VLANTPID register. */ +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG \ + (UINT32_C(0x5) << 12) +#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_LAST \ + RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG/* When meta_format != 0, this value is the VLAN valid. */ -#define RX_TPA_START_V2_CMPL_METADATA1_VALID UINT32_C(0x8000) +#define RX_TPA_START_V2_CMPL_METADATA1_VALID \ + UINT32_C(0x8000)/* * This value is the RSS hash value calculated for the packet * based on the mode bits and key value in the VNIC.
@@ -8908,6 +8958,13 @@ struct hwrm_func_vf_cfg_input {*/ #define HWRM_FUNC_VF_CFG_INPUT_FLAGS_PPP_PUSH_MODE_ENABLE \ UINT32_C(0x100) +/* +* If this bit is set to 1, the VF driver is requesting FW to disable +* PPP TX PUSH feature on all the TX rings of the VF. This flag is +* ignored if the VF doesn't support PPP tx push feature. +*/ +#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_PPP_PUSH_MODE_DISABLE \ + UINT32_C(0x200)/* The number of RSS/COS contexts requested for the VF. */ uint16_t num_rsscos_ctxs;/* The number of completion rings requested for the VF. */
@@ -9396,10 +9453,10 @@ struct hwrm_func_qcaps_output {#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_TX_PROXY_SRC_INTF_OVERRIDE_SUPPORT \ UINT32_C(0x20)/* -* If 1, the device supports scheduler queues. SQs can be managed -* using RING_SQ_ALLOC/CFG/FREE commands. +* If 1, the device supports scheduler queues. SCHQs can be managed +* using RING_SCHQ_ALLOC/CFG/FREE commands. */ -#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_SQ_SUPPORTED \ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_SCHQ_SUPPORTED \ UINT32_C(0x40)/* * If set to 1, then this function supports the TX push mode that
@@ -9407,8 +9464,8 @@ struct hwrm_func_qcaps_output {*/ #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PPP_PUSH_MODE_SUPPORTED \ UINT32_C(0x80) -/* The maximum number of SQs supported by this device. */ -uint8_t max_sqs; +/* The maximum number of SCHQs supported by this device. */ +uint8_t max_schqs;uint8_t unused_1[2 ];/* * This field is used in Output records to indicate that the output
@@ -10159,6 +10216,15 @@ struct hwrm_func_cfg_input {*/ #define HWRM_FUNC_CFG_INPUT_FLAGS_PPP_PUSH_MODE_ENABLE \ UINT32_C(0x8000000) +/* +* If this bit is set to 1, the PF driver is requesting FW +* to disable PPP TX PUSH feature on all the TX rings specified in +* the num_tx_rings field. This flag is ignored if num_tx_rings +* field is not specified or the function doesn't support PPP tx +* push feature. +*/ +#define HWRM_FUNC_CFG_INPUT_FLAGS_PPP_PUSH_MODE_DISABLE \ + UINT32_C(0x10000000)uint32_t enables;/* * This bit must be '1' for the mtu field to be
@@ -10305,10 +10371,10 @@ struct hwrm_func_cfg_input {#define HWRM_FUNC_CFG_INPUT_ENABLES_HOT_RESET_IF_SUPPORT \ UINT32_C(0x800000)/* -* This bit must be '1' for the sq_id field to be +* This bit must be '1' for the schq_id field to be * configured. */ -#define HWRM_FUNC_CFG_INPUT_ENABLES_SQ_ID \ +#define HWRM_FUNC_CFG_INPUT_ENABLES_SCHQ_ID \ UINT32_C(0x1000000)/* * The maximum transmission unit of the function.
@@ -10574,8 +10640,8 @@ struct hwrm_func_cfg_input {* be reserved for this function on the RX side. */ uint16_t num_mcast_filters; -/* Used by a PF driver to associate a SQ with a VF. */ -uint16_t sq_id; +/* Used by a PF driver to associate a SCHQ with a VF. */ +uint16_t schq_id;uint8_t unused_0[6 ]; } __rte_packed;
@@ -10808,12 +10874,12 @@ struct hwrm_func_qstats_ext_input {uint8_t unused_0[1 ];uint32_t enables;/* -* This bit must be '1' for the sq_id and traffic_class fields to be -* configured. +* This bit must be '1' for the schq_id and traffic_class fields to +* be configured. */ -#define HWRM_FUNC_QSTATS_EXT_INPUT_ENABLES_SQ_ID UINT32_C(0x1) -/* Specifies the SQ for which to gather statistics */ -uint16_t sq_id; +#define HWRM_FUNC_QSTATS_EXT_INPUT_ENABLES_SCHQ_ID UINT32_C(0x1) +/* Specifies the SCHQ for which to gather statistics */ +uint16_t schq_id;/* * Specifies the traffic class for which to gather statistics. Valid * values are 0 through (max_configurable_queues - 1), where
@@ -15275,7 +15341,14 @@ struct hwrm_port_phy_cfg_input {UINT32_C (0x80 )/* * When set to 1, then the HWRM shall enable FEC autonegotitation -* on this port if supported. +* on this port if supported. When enabled, at least one of the +* FEC modes must be advertised by enabling the fec_clause_74_enable, +* fec_clause_91_enable, fec_rs544_1xn_enable, or fec_rs544_2xn_enable +* flag. If none of the FEC mode is currently enabled, the HWRM +* shall choose a default advertisement setting. +* The default advertisement setting can be queried by calling +* hwrm_port_phy_qcfg. Note that the link speed must be +* in autonegotiation mode for FEC autonegotiation to take effect. * When set to 0, then this flag shall be ignored. * If FEC autonegotiation is not supported, then the HWRM shall ignore this * flag.
@@ -15293,7 +15366,8 @@ struct hwrm_port_phy_cfg_input {UINT32_C (0x200 )/* * When set to 1, then the HWRM shall enable FEC CLAUSE 74 (Fire Code) -* on this port if supported. +* on this port if supported, by advertising FEC CLAUSE 74 if +* FEC autonegotiation is enabled or force enabled otherwise. * When set to 0, then this flag shall be ignored. * If FEC CLAUSE 74 is not supported, then the HWRM shall ignore this * flag.
@@ -15302,7 +15376,8 @@ struct hwrm_port_phy_cfg_input {UINT32_C (0x400 )/* * When set to 1, then the HWRM shall disable FEC CLAUSE 74 (Fire Code) -* on this port if supported. +* on this port if supported, by not advertising FEC CLAUSE 74 if +* FEC autonegotiation is enabled or force disabled otherwise. * When set to 0, then this flag shall be ignored. * If FEC CLAUSE 74 is not supported, then the HWRM shall ignore this * flag.
@@ -15311,7 +15386,8 @@ struct hwrm_port_phy_cfg_input {UINT32_C (0x800 )/* * When set to 1, then the HWRM shall enable FEC CLAUSE 91 (Reed Solomon) -* on this port if supported. +* on this port if supported, by advertising FEC CLAUSE 91 if +* FEC autonegotiation is enabled or force enabled otherwise. * When set to 0, then this flag shall be ignored. * If FEC CLAUSE 91 is not supported, then the HWRM shall ignore this * flag.
@@ -15320,7 +15396,8 @@ struct hwrm_port_phy_cfg_input {UINT32_C (0x1000 )/* * When set to 1, then the HWRM shall disable FEC CLAUSE 91 (Reed Solomon) -* on this port if supported. +* on this port if supported, by not advertising FEC CLAUSE 91 if +* FEC autonegotiation is enabled or force disabled otherwise. * When set to 0, then this flag shall be ignored. * If FEC CLAUSE 91 is not supported, then the HWRM shall ignore this * flag.
@@ -15347,6 +15424,46 @@ struct hwrm_port_phy_cfg_input {*/ #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE_LINK_DWN \ UINT32_C(0x4000) +/* +* When set to 1, then the HWRM shall enable FEC RS544_1XN +* on this port if supported, by advertising FEC RS544_1XN if +* FEC autonegotiation is enabled or force enabled otherwise. +* When set to 0, then this flag shall be ignored. +* If FEC RS544_1XN is not supported, then the HWRM shall ignore this +* flag. +*/ +#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_1XN_ENABLE \ + UINT32_C(0x8000) +/* +* When set to 1, then the HWRM shall disable FEC RS544_1XN +* on this port if supported, by not advertising FEC RS544_1XN if +* FEC autonegotiation is enabled or force disabled otherwise. +* When set to 0, then this flag shall be ignored. +* If FEC RS544_1XN is not supported, then the HWRM shall ignore this +* flag. +*/ +#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_1XN_DISABLE \ + UINT32_C(0x10000) +/* +* When set to 1, then the HWRM shall enable FEC RS544_2XN +* on this port if supported, by advertising FEC RS544_2XN if +* FEC autonegotiation is enabled or force enabled otherwise. +* When set to 0, then this flag shall be ignored. +* If FEC RS544_2XN is not supported, then the HWRM shall ignore this +* flag. +*/ +#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_2XN_ENABLE \ + UINT32_C(0x20000) +/* +* When set to 1, then the HWRM shall disable FEC RS544_2XN +* on this port if supported, by not advertising FEC RS544_2XN if +* FEC autonegotiation is enabled or force disabled otherwise. +* When set to 0, then this flag shall be ignored. +* If FEC RS544_2XN is not supported, then the HWRM shall ignore this +* flag. +*/ +#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_2XN_DISABLE \ + UINT32_C(0x40000)uint32_t enables;/* * This bit must be '1' for the auto_mode field to be
@@ -16573,9 +16690,6 @@ struct hwrm_port_phy_qcfg_output {* is set to 1, then all other FEC configuration flags shall be ignored. * When set to 0, then FEC is supported as indicated by other * configuration flags. -* If no cable is attached and the HWRM does not yet know the FEC -* capability, then the HWRM shall set this flag to 1 when reporting -* FEC capability. */ #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_NONE_SUPPORTED \ UINT32_C(0x1)
@@ -16599,7 +16713,9 @@ struct hwrm_port_phy_qcfg_output {#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE74_SUPPORTED \ UINT32_C(0x8)/* -* When set to 1, then FEC CLAUSE 74 (Fire Code) is enabled on this port. +* When set to 1, then FEC CLAUSE 74 (Fire Code) is enabled on this +* port. This means that FEC CLAUSE 74 is either advertised if +* FEC autonegotiation is enabled or FEC CLAUSE 74 is force enabled. * When set to 0, then FEC CLAUSE 74 (Fire Code) is disabled if supported. * This flag should be ignored if FEC CLAUSE 74 is not supported on this port. */
@@ -16612,12 +16728,84 @@ struct hwrm_port_phy_qcfg_output {#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_SUPPORTED \ UINT32_C(0x20)/* -* When set to 1, then FEC CLAUSE 91 (Reed Solomon) is enabled on this port. +* When set to 1, then FEC CLAUSE 91 (Reed Solomon) is enabled on this +* port. This means that FEC CLAUSE 91 is either advertised if +* FEC autonegotiation is enabled or FEC CLAUSE 91 is force enabled. * When set to 0, then FEC CLAUSE 91 (Reed Solomon) is disabled if supported. * This flag should be ignored if FEC CLAUSE 91 is not supported on this port. */ #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_ENABLED \ UINT32_C(0x40) +/* +* When set to 1, then FEC RS544_1XN is supported on this port. +* When set to 0, then FEC RS544_1XN is not supported on this port. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_1XN_SUPPORTED \ + UINT32_C(0x80) +/* +* When set to 1, then RS544_1XN is enabled on this +* port. This means that FEC RS544_1XN is either advertised if +* FEC autonegotiation is enabled or FEC RS544_1XN is force enabled. +* When set to 0, then FEC RS544_1XN is disabled if supported. +* This flag should be ignored if FEC RS544_1XN is not supported on this port. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_1XN_ENABLED \ + UINT32_C(0x100) +/* +* When set to 1, then FEC RS544_2XN is supported on this port. +* When set to 0, then FEC RS544_2XN is not supported on this port. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_2XN_SUPPORTED \ + UINT32_C(0x200) +/* +* When set to 1, then RS544_2XN is enabled on this +* port. This means that FEC RS544_2XN is either advertised if +* FEC autonegotiation is enabled or FEC RS544_2XN is force enabled. +* When set to 0, then FEC RS544_2XN is disabled if supported. +* This flag should be ignored if FEC RS544_2XN is not supported on this port. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_2XN_ENABLED \ + UINT32_C(0x400) +/* +* When set to 1, then FEC CLAUSE 74 (Fire Code) is active on this +* port, either successfully autonegoatiated or forced. +* When set to 0, then FEC CLAUSE 74 (Fire Code) is not active. +* This flag is only valid when link is up on this port. +* At most only one active FEC flags (fec_clause74_active, +* fec_clause91_active, fec_rs544_1xn, fec_rs544_2xn) can be set. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE74_ACTIVE \ + UINT32_C(0x800) +/* +* When set to 1, then FEC CLAUSE 91 (Reed Solomon) is active on this +* port, either successfully autonegoatiated or forced. +* When set to 0, then FEC CLAUSE 91 (Reed Solomon) is not active. +* This flag is only valid when link is up on this port. +* At most only one active FEC flags (fec_clause74_active, +* fec_clause91_active, fec_rs544_1xn, fec_rs544_2xn) can be set. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_ACTIVE \ + UINT32_C(0x1000) +/* +* When set to 1, then FEC RS544_1XN is active on this +* port, either successfully autonegoatiated or forced. +* When set to 0, then FEC RS544_1XN is not active. +* This flag is only valid when link is up on this port. +* At most only one active FEC flags (fec_clause74_active, +* fec_clause91_active, fec_rs544_1xn, fec_rs544_2xn) can be set. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_1XN_ACTIVE \ + UINT32_C(0x2000) +/* +* When set to 1, then FEC RS544_2XN is active on this +* port, either successfully autonegoatiated or forced. +* When set to 0, then FEC RS544_2XN is not active. +* This flag is only valid when link is up on this port. +* At most only one active FEC flags (fec_clause74_active, +* fec_clause91_active, fec_rs544_1xn, fec_rs544_2xn) can be set. +*/ +#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_2XN_ACTIVE \ + UINT32_C(0x4000)/* * This value is indicates the duplex of the current * connection state.
@@ -19079,13 +19267,24 @@ struct hwrm_port_phy_qcaps_output {*/ #define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_SHARED_PHY_CFG_SUPPORTED \ UINT32_C(0x8) +/* +* If set to 1, it indicates that the port counters and extended +* port counters will not reset when the firmware shuts down or +* resets the PHY. These counters will only be reset during power +* cycle or by calling HWRM_PORT_CLR_STATS. +* If set to 0, the state of the counters is unspecified when +* firmware shuts down or resets the PHY. +*/ +#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_CUMULATIVE_COUNTERS_ON_RESET \ + UINT32_C(0x10)/* * Reserved field. The HWRM shall set this field to 0. * An HWRM client shall ignore this field. */ #define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_RSVD1_MASK \ - UINT32_C(0xf0) -#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_RSVD1_SFT 4 + UINT32_C(0xe0) +#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_RSVD1_SFT \ + 5/* Number of front panel ports for this device. */ uint8_t port_cnt;/* Not supported or unknown */
@@ -21251,7 +21450,7 @@ struct hwrm_queue_qportcfg_input {uint8_t unused_0; } __rte_packed; -/* hwrm_queue_qportcfg_output (size:256b/32B) */ +/* hwrm_queue_qportcfg_output (size:1344b/168B) */ struct hwrm_queue_qportcfg_output {/* The specific error status for the command. */ uint16_t error_code;
@@ -21627,6 +21826,28 @@ struct hwrm_queue_qportcfg_output { UINT32_C(0xff)#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LAST \ HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_UNKNOWN +uint8_t unused_0; +/* +* Up to 16 bytes of null padded ASCII string describing this queue. +* The queue name includes a CoS queue index and, in some cases, text +* that distinguishes the queue from other queues in the group. +*/ +char qid0_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid1_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid2_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid3_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid4_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid5_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid6_name[16 ]; +/* Up to 16 bytes of null padded ASCII string describing this queue. */ +char qid7_name[16 ]; +uint8_t unused_1[7 ];/* * This field is used in Output records to indicate that the output * is completely written to RAM. This field should be read as '1'
@@ -26929,10 +27150,10 @@ struct hwrm_ring_alloc_input {#define HWRM_RING_ALLOC_INPUT_ENABLES_RX_BUF_SIZE_VALID \ UINT32_C(0x100)/* -* This bit must be '1' for the sq_id field to be +* This bit must be '1' for the schq_id field to be * configured. */ -#define HWRM_RING_ALLOC_INPUT_ENABLES_SQ_ID \ +#define HWRM_RING_ALLOC_INPUT_ENABLES_SCHQ_ID \ UINT32_C(0x200)/* Ring Type. */ uint8_t ring_type;
@@ -26999,8 +27220,8 @@ struct hwrm_ring_alloc_input {* element of the ring. */ uint8_t page_tbl_depth; -/* Used by a PF driver to associate a SQ with one of its TX rings. */ -uint16_t sq_id; +/* Used by a PF driver to associate a SCHQ with one of its TX rings. */ +uint16_t schq_id;/* * Number of 16B units in the ring. Minimum size for * a ring is 16 16B entries.
@@ -27453,8 +27674,8 @@ struct hwrm_ring_cfg_input {*/ #define HWRM_RING_CFG_INPUT_ENABLES_TX_PROXY_SRC_INTF_OVERRIDE \ UINT32_C(0x4) -/* The sq_id field is valid */ -#define HWRM_RING_CFG_INPUT_ENABLES_SQ_ID \ +/* The schq_id field is valid */ +#define HWRM_RING_CFG_INPUT_ENABLES_SCHQ_ID \ UINT32_C(0x8)/* Update completion ring ID associated with Tx or Rx ring. */ #define HWRM_RING_CFG_INPUT_ENABLES_CMPL_RING_ID_UPDATE \
@@ -27471,12 +27692,12 @@ struct hwrm_ring_cfg_input {*/ uint16_t proxy_fid;/* -* Identifies the new scheduler queue (SQ) to associate with the ring. -* Only valid for Tx rings. +* Identifies the new scheduler queue (SCHQ) to associate with the +* ring. Only valid for Tx rings. * A value of zero indicates that the Tx ring should be associated -* with the default scheduler queue (SQ). +* with the default scheduler queue (SCHQ). */ -uint16_t sq_id; +uint16_t schq_id;/* * This field is valid for TX or Rx rings. This value identifies the * new completion ring ID to associate with the TX or Rx ring.
@@ -27622,12 +27843,12 @@ struct hwrm_ring_qcfg_output {*/ uint16_t proxy_fid;/* -* Identifies the new scheduler queue (SQ) to associate with the ring. -* Only valid for Tx rings. +* Identifies the new scheduler queue (SCHQ) to associate with the +* ring. Only valid for Tx rings. * A value of zero indicates that the Tx ring should be associated with -* the default scheduler queue (SQ). +* the default scheduler queue (SCHQ). */ -uint16_t sq_id; +uint16_t schq_id;/* * This field is used when ring_type is a TX or Rx ring. * This value indicates what completion ring the TX or Rx ring
@@ -28222,13 +28443,13 @@ struct hwrm_ring_grp_free_output {uint8_t valid; } __rte_packed; -/********************** -* hwrm_ring_sq_alloc * -**********************/ +/************************ +* hwrm_ring_schq_alloc * +************************/ -/* hwrm_ring_sq_alloc_input (size:1088b/136B) */ -struct hwrm_ring_sq_alloc_input { +/* hwrm_ring_schq_alloc_input (size:1088b/136B) */ +struct hwrm_ring_schq_alloc_input {/* The HWRM command request type. */ uint16_t req_type;/*
@@ -28262,380 +28483,396 @@ struct hwrm_ring_sq_alloc_input {* This bit must be '1' for the tqm_ring0 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING0 UINT32_C(0x1) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING0 UINT32_C(0x1)/* * This bit must be '1' for the tqm_ring1 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING1 UINT32_C(0x2) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING1 UINT32_C(0x2)/* * This bit must be '1' for the tqm_ring2 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING2 UINT32_C(0x4) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING2 UINT32_C(0x4)/* * This bit must be '1' for the tqm_ring3 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING3 UINT32_C(0x8) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING3 UINT32_C(0x8)/* * This bit must be '1' for the tqm_ring4 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING4 UINT32_C(0x10) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING4 UINT32_C(0x10)/* * This bit must be '1' for the tqm_ring5 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING5 UINT32_C(0x20) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING5 UINT32_C(0x20)/* * This bit must be '1' for the tqm_ring6 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING6 UINT32_C(0x40) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING6 UINT32_C(0x40)/* * This bit must be '1' for the tqm_ring7 fields to be * configured. */ -#define HWRM_RING_SQ_ALLOC_INPUT_ENABLES_TQM_RING7 UINT32_C(0x80) +#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING7 UINT32_C(0x80)/* Reserved for future use. */ uint32_t reserved;/* TQM ring 0 page size and level. */ uint8_t tqm_ring0_pg_size_tqm_ring0_lvl;/* TQM ring 0 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2/* TQM ring 0 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G/* TQM ring 1 page size and level. */ uint8_t tqm_ring1_pg_size_tqm_ring1_lvl;/* TQM ring 1 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2/* TQM ring 1 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G/* TQM ring 2 page size and level. */ uint8_t tqm_ring2_pg_size_tqm_ring2_lvl;/* TQM ring 2 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2/* TQM ring 2 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G/* TQM ring 3 page size and level. */ uint8_t tqm_ring3_pg_size_tqm_ring3_lvl;/* TQM ring 3 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2/* TQM ring 3 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G/* TQM ring 4 page size and level. */ uint8_t tqm_ring4_pg_size_tqm_ring4_lvl;/* TQM ring 4 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2/* TQM ring 4 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G/* TQM ring 5 page size and level. */ uint8_t tqm_ring5_pg_size_tqm_ring5_lvl;/* TQM ring 5 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2/* TQM ring 5 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G/* TQM ring 6 page size and level. */ uint8_t tqm_ring6_pg_size_tqm_ring6_lvl;/* TQM ring 6 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2/* TQM ring 6 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G/* TQM ring 7 page size and level. */ uint8_t tqm_ring7_pg_size_tqm_ring7_lvl;/* TQM ring 7 PBL indirect levels. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_MASK UINT32_C(0xf) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_SFT 0 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_MASK \ + UINT32_C(0xf) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_SFT 0/* PBL pointer is physical start address. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_0 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_0 \ UINT32_C(0x0)/* PBL pointer points to PTE table. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_1 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_1 \ UINT32_C(0x1)/* * PBL pointer points to PDE table with each entry pointing to PTE * tables. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2 \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2 \ UINT32_C(0x2) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2/* TQM ring 7 page size. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_MASK UINT32_C(0xf0) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_SFT 4 +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_MASK \ + UINT32_C(0xf0) +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_SFT 4/* 4KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_4K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_4K \ (UINT32_C(0x0) << 4)/* 8KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8K \ (UINT32_C(0x1) << 4)/* 64KB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_64K \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_64K \ (UINT32_C(0x2) << 4)/* 2MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_2M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_2M \ (UINT32_C(0x3) << 4)/* 8MB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8M \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8M \ (UINT32_C(0x4) << 4)/* 1GB. */ -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G \ +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G \ (UINT32_C(0x5) << 4) -#define HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_LAST \ - HWRM_RING_SQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G +#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_LAST \ + HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G/* TQM ring 0 page directory. */ uint64_t tqm_ring0_page_dir;/* TQM ring 1 page directory. */
@@ -28661,7 +28898,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring0_num_entries;/*
@@ -28673,7 +28910,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring1_num_entries;/*
@@ -28685,7 +28922,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring2_num_entries;/*
@@ -28697,7 +28934,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring3_num_entries;/*
@@ -28709,7 +28946,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring4_num_entries;/*
@@ -28721,7 +28958,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring5_num_entries;/*
@@ -28733,7 +28970,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring6_num_entries;/*
@@ -28745,7 +28982,7 @@ struct hwrm_ring_sq_alloc_input {* * Note that TQM ring sizes cannot be extended while the system is * operational. If a PF driver needs to extend a TQM ring, it needs -* to delete the SQ and then reallocate it. +* to delete the SCHQ and then reallocate it. */ uint32_t tqm_ring7_num_entries;/* Number of bytes that have been allocated for each context entry. */
@@ -28753,8 +28990,8 @@ struct hwrm_ring_sq_alloc_input {uint8_t unused_0[6 ]; } __rte_packed; -/* hwrm_ring_sq_alloc_output (size:128b/16B) */ -struct hwrm_ring_sq_alloc_output { +/* hwrm_ring_schq_alloc_output (size:128b/16B) */ +struct hwrm_ring_schq_alloc_output {/* The specific error status for the command. */ uint16_t error_code;/* The HWRM command request type. */
@@ -28764,11 +29001,11 @@ struct hwrm_ring_sq_alloc_output {/* The length of the response data in number of bytes. */ uint16_t resp_len;/* -* This is an identifier for the SQ to be used in other HWRM commands -* that need to reference this SQ. This value is greater than zero -* (i.e. a sq_id of zero references the default SQ). +* This is an identifier for the SCHQ to be used in other HWRM commands +* that need to reference this SCHQ. This value is greater than zero +* (i.e. a schq_id of zero references the default SCHQ). */ -uint16_t sq_id; +uint16_t schq_id;uint8_t unused_0[5 ];/* * This field is used in Output records to indicate that the output
@@ -28780,13 +29017,13 @@ struct hwrm_ring_sq_alloc_output {uint8_t valid; } __rte_packed; -/******************** -* hwrm_ring_sq_cfg * -********************/ +/********************** +* hwrm_ring_schq_cfg * +**********************/ -/* hwrm_ring_sq_cfg_input (size:768b/96B) */ -struct hwrm_ring_sq_cfg_input { +/* hwrm_ring_schq_cfg_input (size:768b/96B) */ +struct hwrm_ring_schq_cfg_input {/* The HWRM command request type. */ uint16_t req_type;/*
@@ -28816,23 +29053,23 @@ struct hwrm_ring_sq_cfg_input {*/ uint64_t resp_addr;/* -* Identifies the SQ being configured. A sq_id of zero refers to the -* default SQ. +* Identifies the SCHQ being configured. A schq_id of zero refers to +* the default SCHQ. */ -uint16_t sq_id; +uint16_t schq_id;/* * This field is an 8 bit bitmap that indicates which TCs are enabled -* in this SQ. Bit 0 represents traffic class 0 and bit 7 represents +* in this SCHQ. Bit 0 represents traffic class 0 and bit 7 represents * traffic class 7. */ uint8_t tc_enabled;uint8_t unused_0;uint32_t flags;/* The tc_max_bw array and the max_bw parameters are valid */ -#define HWRM_RING_SQ_CFG_INPUT_FLAGS_TC_MAX_BW_ENABLED \ +#define HWRM_RING_SCHQ_CFG_INPUT_FLAGS_TC_MAX_BW_ENABLED \ UINT32_C(0x1)/* The tc_min_bw array is valid */ -#define HWRM_RING_SQ_CFG_INPUT_FLAGS_TC_MIN_BW_ENABLED \ +#define HWRM_RING_SCHQ_CFG_INPUT_FLAGS_TC_MIN_BW_ENABLED \ UINT32_C(0x2)/* Maximum bandwidth of the traffic class, specified in Mbps. */ uint32_t max_bw_tc0;
@@ -28854,68 +29091,68 @@ struct hwrm_ring_sq_cfg_input {* Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc0;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc1;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc2;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc3;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc4;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc5;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc6;/* * Bandwidth reservation for the traffic class, specified in Mbps. * A value of zero signifies that traffic belonging to this class * shares the bandwidth reservation for the same traffic class of -* the default SQ. +* the default SCHQ. */ uint32_t min_bw_tc7;/* * Indicates the max bandwidth for all enabled traffic classes in -* this SQ, specified in Mbps. +* this SCHQ, specified in Mbps. */ uint32_t max_bw;uint8_t unused_1[4 ]; } __rte_packed; -/* hwrm_ring_sq_cfg_output (size:128b/16B) */ -struct hwrm_ring_sq_cfg_output { +/* hwrm_ring_schq_cfg_output (size:128b/16B) */ +struct hwrm_ring_schq_cfg_output {/* The specific error status for the command. */ uint16_t error_code;/* The HWRM command request type. */
@@ -28935,13 +29172,13 @@ struct hwrm_ring_sq_cfg_output {uint8_t valid; } __rte_packed; -/********************* -* hwrm_ring_sq_free * -*********************/ +/*********************** +* hwrm_ring_schq_free * +***********************/ -/* hwrm_ring_sq_free_input (size:192b/24B) */ -struct hwrm_ring_sq_free_input { +/* hwrm_ring_schq_free_input (size:192b/24B) */ +struct hwrm_ring_schq_free_input {/* The HWRM command request type. */ uint16_t req_type;/*
@@ -28970,13 +29207,13 @@ struct hwrm_ring_sq_free_input {* point to a physically contiguous block of memory. */ uint64_t resp_addr; -/* Identifies the SQ being freed. */ -uint16_t sq_id; +/* Identifies the SCHQ being freed. */ +uint16_t schq_id;uint8_t unused_0[6 ]; } __rte_packed; -/* hwrm_ring_sq_free_output (size:128b/16B) */ -struct hwrm_ring_sq_free_output { +/* hwrm_ring_schq_free_output (size:128b/16B) */ +struct hwrm_ring_schq_free_output {/* The specific error status for the command. */ uint16_t error_code;/* The HWRM command request type. */
@@ -38802,7 +39039,9 @@ struct hwrm_tf_global_cfg_set_input {/* unused. */ uint8_t unused0[6 ];/* Data to set */ -uint8_t data[16 ]; +uint8_t data[8 ]; +/* Mask of data to set, 0 indicates no mask */ +uint8_t mask[8 ]; } __rte_packed;/* hwrm_tf_global_cfg_set_output (size:128b/16B) */
@@ -38903,6 +39142,182 @@ struct hwrm_tf_global_cfg_get_output {uint8_t data[16 ]; } __rte_packed; +/********************** +* hwrm_tf_if_tbl_get * +**********************/ + + +/* hwrm_tf_if_tbl_get_input (size:256b/32B) */ +struct hwrm_tf_if_tbl_get_input { +/* The HWRM command request type. */ +uint16_t req_type; +/* +* The completion ring to send the completion event on. This should +* be the NQ ID returned from the `nq_alloc` HWRM command. +*/ +uint16_t cmpl_ring; +/* +* The sequence ID is used by the driver for tracking multiple +* commands. This ID is treated as opaque data by the firmware and +* the value is returned in the `hwrm_resp_hdr` upon completion. +*/ +uint16_t seq_id; +/* +* The target ID of the command: +* * 0x0-0xFFF8 - The function ID +* * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors +* * 0xFFFD - Reserved for user-space HWRM interface +* * 0xFFFF - HWRM +*/ +uint16_t target_id; +/* +* A physical address pointer pointing to a host buffer that the +* command's response data will be written. This can be either a host +* physical address (HPA) or a guest physical address (GPA) and must +* point to a physically contiguous block of memory. +*/ +uint64_t resp_addr; +/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */ +uint32_t fw_session_id; +/* Control flags. */ +uint16_t flags; +/* Indicates the flow direction. */ +#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR UINT32_C(0x1) +/* If this bit set to 0, then it indicates rx flow. */ +#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_RX UINT32_C(0x0) +/* If this bit is set to 1, then it indicates that tx flow. */ +#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX UINT32_C(0x1) +#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_LAST \ + HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX +/* Size of the data to set. */ +uint16_t size; +/* +* Type of the resource, defined globally in the +* hwrm_tf_resc_type enum. +*/ +uint32_t type; +/* Index of the type to retrieve. */ +uint32_t index; +} __rte_packed; + +/* hwrm_tf_if_tbl_get_output (size:256b/32B) */ +struct hwrm_tf_if_tbl_get_output { +/* The specific error status for the command. */ +uint16_t error_code; +/* The HWRM command request type. */ +uint16_t req_type; +/* The sequence ID from the original command. */ +uint16_t seq_id; +/* The length of the response data in number of bytes. */ +uint16_t resp_len; +/* Response code. */ +uint32_t resp_code; +/* Response size. */ +uint16_t size; +/* unused */ +uint16_t unused0; +/* Response data. */ +uint8_t data[8 ]; +/* unused */ +uint8_t unused1[7 ]; +/* +* This field is used in Output records to indicate that the output +* is completely written to RAM. This field should be read as '1' +* to indicate that the output has been completely written. +* When writing a command completion or response to an internal +* processor, the order of writes has to be such that this field +* is written last. +*/ +uint8_t valid; +} __rte_packed; + +/*************************** +* hwrm_tf_if_tbl_type_set * +***************************/ + + +/* hwrm_tf_if_tbl_set_input (size:384b/48B) */ +struct hwrm_tf_if_tbl_set_input { +/* The HWRM command request type. */ +uint16_t req_type; +/* +* The completion ring to send the completion event on. This should +* be the NQ ID returned from the `nq_alloc` HWRM command. +*/ +uint16_t cmpl_ring; +/* +* The sequence ID is used by the driver for tracking multiple +* commands. This ID is treated as opaque data by the firmware and +* the value is returned in the `hwrm_resp_hdr` upon completion. +*/ +uint16_t seq_id; +/* +* The target ID of the command: +* * 0x0-0xFFF8 - The function ID +* * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors +* * 0xFFFD - Reserved for user-space HWRM interface +* * 0xFFFF - HWRM +*/ +uint16_t target_id; +/* +* A physical address pointer pointing to a host buffer that the +* command's response data will be written. This can be either a host +* physical address (HPA) or a guest physical address (GPA) and must +* point to a physically contiguous block of memory. +*/ +uint64_t resp_addr; +/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */ +uint32_t fw_session_id; +/* Control flags. */ +uint16_t flags; +/* Indicates the flow direction. */ +#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR UINT32_C(0x1) +/* If this bit set to 0, then it indicates rx flow. */ +#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_RX UINT32_C(0x0) +/* If this bit is set to 1, then it indicates that tx flow. */ +#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX UINT32_C(0x1) +#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_LAST \ + HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX +/* unused. */ +uint8_t unused0[2 ]; +/* +* Type of the resource, defined globally in the +* hwrm_tf_resc_type enum. +*/ +uint32_t type; +/* Index of the type to set. */ +uint32_t index; +/* Size of the data to set. */ +uint16_t size; +/* unused */ +uint8_t unused1[6 ]; +/* Data to be set. */ +uint8_t data[8 ]; +} __rte_packed; + +/* hwrm_tf_if_tbl_set_output (size:128b/16B) */ +struct hwrm_tf_if_tbl_set_output { +/* The specific error status for the command. */ +uint16_t error_code; +/* The HWRM command request type. */ +uint16_t req_type; +/* The sequence ID from the original command. */ +uint16_t seq_id; +/* The length of the response data in number of bytes. */ +uint16_t resp_len; +/* unused. */ +uint8_t unused0[7 ]; +/* +* This field is used in Output records to indicate that the output +* is completely written to RAM. This field should be read as '1' +* to indicate that the output has been completely written. +* When writing a command completion or response to an internal +* processor, the order of writes has to be such that this field +* is written last. +*/ +uint8_t valid; +} __rte_packed; +/****************************** * hwrm_tunnel_dst_port_query * ******************************/
drivers/net/bnxt/tf_core/tf_msg.c +31 -27
103 lines not on this page · raw message
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 15/25 net/bnxt: remove VLAN pop action for egress flows
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Whitney platform does not support VLAN pop action in the egress direction. Hence the VLAN pop action is removed from the egress action templates.
--- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 42 +++++-------------- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 3 +- 2 files changed, 12 insertions(+), 33 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +11 -31
@@ -1036,7 +1036,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = { }, { .resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE, - .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV6, + .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV4, .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL, .cond_opcode = BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET,
@@ -1434,21 +1434,11 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, - .result_operand = { - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , - (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, + .result_operand = { +BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
@@ -2346,21 +2336,11 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, - .result_operand = { - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , - ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , - (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, + .result_operand = { +BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , +0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +1 -2
@@ -218,8 +218,7 @@ enum bnxt_ulp_mapper_opc {BNXT_ULP_MAPPER_OPC_IF_ACT_BIT_THEN_ACT_PROP_ELSE_CONST =9 ,BNXT_ULP_MAPPER_OPC_IF_ACT_BIT_THEN_CONST_ELSE_CONST =10 ,BNXT_ULP_MAPPER_OPC_IF_COMP_FIELD_THEN_CF_ELSE_CF =11 , -BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST =12 , -BNXT_ULP_MAPPER_OPC_LAST =13 +BNXT_ULP_MAPPER_OPC_LAST =12 }; enum bnxt_ulp_mark_db_opcode {
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 16/25 net/bnxt: increase counter support from 8K to 16K
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
The number of internal stats counter is increased to 16k in both egress and ingress direction.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +2 -2
@@ -91,7 +91,7 @@ ulp_ctx_session_open(struct bnxt *bp,/* Table Types */ resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_FULL_ACT_RECORD ] =8192 ; - resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =8192 ; + resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =16384 ; resources->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4 ] =1023 ;/* ENCAP */
@@ -125,7 +125,7 @@ ulp_ctx_session_open(struct bnxt *bp,/* Table Types */ resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_FULL_ACT_RECORD ] =8192 ; - resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =8192 ; + resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =16384 ; resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4 ] =1023 ;/* ENCAP */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 17/25 net/bnxt: check and set initial counter ID
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
Instead of relying on value of Flow counter ID to determine validity have an explicit boolean flag for the same to check and set.
--- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 8 ++++---- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c +4 -4
@@ -431,8 +431,7 @@ bool ulp_fc_mgr_start_idx_isset(struct bnxt_ulp_context *ctxt, enum tf_dir dir) ulp_fc_info =bnxt_ulp_cntxt_ptr2_fc_info_get (ctxt); -/* Assuming start_idx of 0 is invalid */ -return (ulp_fc_info->shadow_hw_tbl[dir].start_idx !=0 ); +return ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set; }/*
@@ -456,9 +455,10 @@ int32_t ulp_fc_mgr_start_idx_set(struct bnxt_ulp_context *ctxt, enum tf_dir dir,if (!ulp_fc_info)return -EIO ; -/* Assuming that 0 is an invalid counter ID ? */ -if (ulp_fc_info->shadow_hw_tbl[dir].start_idx ==0 ) +if (!ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set) { ulp_fc_info->shadow_hw_tbl[dir].start_idx = start_idx; + ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set = true; + }return 0 ; }
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h +1 -0
@@ -38,6 +38,7 @@ struct hw_fc_mem_info {*/ void *mem_pa;uint32_t start_idx; +bool start_idx_is_set; };struct bnxt_ulp_fc_info {
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 18/25 net/bnxt: enable VXLAN ipv6 encapsulation
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Add code to support vxlan ipv6 tunnel encapsulation. The ipv6 flow traffic class and flow label wild card match can be ignored to support offload on some applications.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 1 + drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 132 ++++++++++++++---- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 +- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_utils.c | 43 ++++-- drivers/net/bnxt/tf_ulp/ulp_utils.h | 7 +- 6 files changed, 147 insertions(+), 43 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +1 -0
@@ -149,6 +149,7 @@ ulp_ctx_session_open(struct bnxt *bp,/* SP */ resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV4 ] =488 ; + resources->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV6 ] =511 ; rc =tf_open_session (&bp->tfp, ¶ms);if (rc) {
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +104 -28
225 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +4 -1
@@ -17,7 +17,10 @@#define BNXT_ULP_ENCAP_IPV4_ID_PROTO 6#define BNXT_ULP_ENCAP_IPV4_DEST_IP 4#define BNXT_ULP_ENCAP_IPV4_SIZE 12 -#define BNXT_ULP_ENCAP_IPV6_SIZE 8 +#define BNXT_ULP_ENCAP_IPV6_VTC_FLOW 4 +#define BNXT_ULP_ENCAP_IPV6_PROTO_TTL 2 +#define BNXT_ULP_ENCAP_IPV6_DO 2 +#define BNXT_ULP_ENCAP_IPV6_SIZE 24#define BNXT_ULP_ENCAP_UDP_SIZE 4#define BNXT_ULP_INVALID_SVIF_VAL -1U
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +1 -1
@@ -1036,7 +1036,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = { }, { .resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE, - .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV4, + .resource_type = TF_TBL_TYPE_ACT_SP_SMAC_IPV6, .resource_sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL, .cond_opcode = BNXT_ULP_COND_OPCODE_COMP_FIELD_IS_SET,
drivers/net/bnxt/tf_ulp/ulp_utils.c +31 -12
66 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_utils.h +6 -1
@@ -9,6 +9,9 @@#include "bnxt.h" #include "ulp_template_db_enum.h" +#define ULP_BUFFER_ALIGN_8_BYTE 8 +#define ULP_BUFFER_ALIGN_16_BYTE 16 +/* * Macros for bitmap sets and gets * These macros can be used if the val are power of 2.
@@ -315,11 +318,13 @@ ulp_operand_read(uint8_t *operand,* dst [out] The destination buffer * src [in] The source buffer dst * size[in] size of the buffer. +* align[in] The alignment is either 8 or 16. */ void ulp_encap_buffer_copy (uint8_t *dst,const uint8_t *src, -uint16_t size); +uint16_t size, +uint16_t align);/* * Check the buffer is empty
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 19/25 net/bnxt: enable NAT action with tagged traffic
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Added support for performing L3 or L4 rewrite for VLAN tagged flows. The outer most DMAC, SMAC and VLAN are used to overwrite when NAT operations are performed.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 14 ++----- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 6 +++ drivers/net/bnxt/tf_ulp/ulp_mapper.c | 21 ++++++++++ drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 40 ++++++++++++++----- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 3 +- 5 files changed, 63 insertions(+), 21 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +4 -10
@@ -721,15 +721,11 @@ bnxt_ulp_deinit(struct bnxt *bp,/* Disable NAT feature */ (void )bnxt_ulp_global_cfg_update (bp,TF_DIR_RX ,TF_TUNNEL_ENCAP ,TF_TUNNEL_ENCAP_NAT , - (BNXT_ULP_NAT_INNER_L2_HEADER_SMAC | -BNXT_ULP_NAT_INNER_L2_HEADER_DMAC ), -0 ); +BNXT_ULP_NAT_OUTER_MOST_FLAGS ,0 ); (void )bnxt_ulp_global_cfg_update (bp,TF_DIR_TX ,TF_TUNNEL_ENCAP ,TF_TUNNEL_ENCAP_NAT , - (BNXT_ULP_NAT_INNER_L2_HEADER_SMAC | -BNXT_ULP_NAT_INNER_L2_HEADER_DMAC ), -0 ); +BNXT_ULP_NAT_OUTER_MOST_FLAGS ,0 );/* Delete the ulp context and tf session and free the ulp context */ ulp_ctx_deinit (bp, session);
@@ -808,8 +804,7 @@ bnxt_ulp_init(struct bnxt *bp,*/ rc =bnxt_ulp_global_cfg_update (bp,TF_DIR_RX ,TF_TUNNEL_ENCAP ,TF_TUNNEL_ENCAP_NAT , - (BNXT_ULP_NAT_INNER_L2_HEADER_SMAC | -BNXT_ULP_NAT_INNER_L2_HEADER_DMAC ),1 ); +BNXT_ULP_NAT_OUTER_MOST_FLAGS ,1 );if (rc) {BNXT_TF_DBG (ERR ,"Failed to set rx global configuration\n" ); goto jump_to_error;
@@ -817,8 +812,7 @@ bnxt_ulp_init(struct bnxt *bp, rc =bnxt_ulp_global_cfg_update (bp,TF_DIR_TX ,TF_TUNNEL_ENCAP ,TF_TUNNEL_ENCAP_NAT , - (BNXT_ULP_NAT_INNER_L2_HEADER_SMAC | -BNXT_ULP_NAT_INNER_L2_HEADER_DMAC ),1 ); +BNXT_ULP_NAT_OUTER_MOST_FLAGS ,1 );if (rc) {BNXT_TF_DBG (ERR ,"Failed to set tx global configuration\n" ); goto jump_to_error;
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +6 -0
@@ -16,7 +16,13 @@/* NAT defines to reuse existing inner L2 SMAC and DMAC */ #define BNXT_ULP_NAT_INNER_L2_HEADER_SMAC 0x2000 +#define BNXT_ULP_NAT_OUTER_MOST_L2_HDR_SMAC 0x6000 +#define BNXT_ULP_NAT_OUTER_MOST_L2_VLAN_TAGS 0xc00#define BNXT_ULP_NAT_INNER_L2_HEADER_DMAC 0x100 +#define BNXT_ULP_NAT_OUTER_MOST_L2_HDR_DMAC 0x300 +#define BNXT_ULP_NAT_OUTER_MOST_FLAGS (BNXT_ULP_NAT_OUTER_MOST_L2_HDR_SMAC |\ + BNXT_ULP_NAT_OUTER_MOST_L2_VLAN_TAGS |\ + BNXT_ULP_NAT_OUTER_MOST_L2_HDR_DMAC)/* defines for the ulp_flags */ #define BNXT_ULP_VF_REP_ENABLED 0x1
drivers/net/bnxt/tf_ulp/ulp_mapper.c +21 -0
@@ -783,6 +783,7 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,uint32_t val_size =0 , field_size =0 ;uint64_t act_bit;uint8_t act_val; +uint64_t hdr_bit;switch (fld->result_opcode) {case BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT :
@@ -1033,6 +1034,26 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,return -EINVAL ; }break ; +case BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST : +if (!ulp_operand_read (fld->result_operand, + (uint8_t *)&hdr_bit,sizeof (uint64_t ))) { +BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); +return -EINVAL ; + } + hdr_bit =tfp_be_to_cpu_64 (hdr_bit); +if (ULP_BITMAP_ISSET (parms->hdr_bitmap->bits, hdr_bit)) { +/* Header bit is set so consider operand_true */ + val = fld->result_operand_true; + }else { +/* Header bit is not set, use the operand false */ + val = fld->result_operand_false; + } +if (!ulp_blob_push (blob, val, fld->field_bit_size)) { +BNXT_TF_DBG (ERR ,"%s failed to add field\n" , + name); +return -EINVAL ; + } +break ;default :BNXT_TF_DBG (ERR ,"invalid result mapper opcode 0x%x\n" , fld->result_opcode);
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +30 -10
@@ -1434,11 +1434,21 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, - .result_operand = { -BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , -0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, + .result_operand = { + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , + (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
@@ -2336,11 +2346,21 @@ struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = { }, { .field_bit_size = 4, - .result_opcode = BNXT_ULP_MAPPER_OPC_SET_TO_CONSTANT, - .result_operand = { -BNXT_ULP_SYM_DECAP_FUNC_THRU_L2 , -0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + .result_opcode = BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST, + .result_operand = { + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>56 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>48 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>40 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>32 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>24 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>16 ) &0xff , + ((uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN >>8 ) &0xff , + (uint64_t )BNXT_ULP_HDR_BIT_T_VXLAN &0xff , + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_true = {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + .result_operand_false = {0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, { .field_bit_size = 12,
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +2 -1
@@ -218,7 +218,8 @@ enum bnxt_ulp_mapper_opc {BNXT_ULP_MAPPER_OPC_IF_ACT_BIT_THEN_ACT_PROP_ELSE_CONST =9 ,BNXT_ULP_MAPPER_OPC_IF_ACT_BIT_THEN_CONST_ELSE_CONST =10 ,BNXT_ULP_MAPPER_OPC_IF_COMP_FIELD_THEN_CF_ELSE_CF =11 , -BNXT_ULP_MAPPER_OPC_LAST =12 +BNXT_ULP_MAPPER_OPC_IF_HDR_BIT_THEN_CONST_ELSE_CONST =12 , +BNXT_ULP_MAPPER_OPC_LAST =13 }; enum bnxt_ulp_mark_db_opcode {
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 20/25 net/bnxt: fix out of bound access in bit handling
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Fix out of bounds access in action bit handling.
The act_val is changed to be array to resolve out of bound access issue.
--- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_mapper.c +5 -6
@@ -782,7 +782,7 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,uint64_t regval;uint32_t val_size =0 , field_size =0 ;uint64_t act_bit; -uint8_t act_val; +uint8_t act_val[16 ];uint64_t hdr_bit;switch (fld->result_opcode) {
@@ -824,19 +824,18 @@ ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,return -EINVAL ; } act_bit =tfp_be_to_cpu_64 (act_bit); +memset (act_val,0 ,sizeof (act_val));if (ULP_BITMAP_ISSET (parms->act_bitmap->bits, act_bit)) - act_val =1 ; -else - act_val =0 ; + act_val[0 ] =1 ;if (fld->field_bit_size >ULP_BYTE_2_BITS (sizeof (act_val))) {BNXT_TF_DBG (ERR ,"%s field size is incorrect\n" , name);return -EINVAL ; } -if (!ulp_blob_push (blob, &act_val, fld->field_bit_size)) { +if (!ulp_blob_push (blob, act_val, fld->field_bit_size)) {BNXT_TF_DBG (ERR ,"%s push field failed\n" , name);return -EINVAL ; } - val = &act_val; + val = act_val;break ;case BNXT_ULP_MAPPER_OPC_SET_TO_ENCAP_ACT_PROP_SZ : if (!ulp_operand_read(fld->result_operand,
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 21/25 net/bnxt: provide switch info if VFR are configured
In reply to Ajit KhapardeFrom: Sriharsha Basavapatna <[email protected]>
Some applications need switch_info of the device to be returned as a part of eth_dev_info_get(). The offload logic in such applications could use this info. Pass this info to the when VF representors are configured.
--- drivers/net/bnxt/bnxt_ethdev.c | 8 ++++++++ drivers/net/bnxt/bnxt_reps.c | 5 +++++ drivers/net/bnxt/bnxt_reps.h | 7 +++++++ 3 files changed, 20 insertions(+)
drivers/net/bnxt/bnxt_ethdev.c +8 -0
@@ -908,6 +908,14 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, dev_info->tx_desc_lim.nb_min =BNXT_MIN_RING_DESC ; dev_info->tx_desc_lim.nb_max =BNXT_MAX_TX_RING_DESC ; +if (BNXT_PF (bp) ||BNXT_VF_IS_TRUSTED (bp)) { + dev_info->switch_info.name = eth_dev->device->name; + dev_info->switch_info.domain_id = bp->switch_domain_id; + dev_info->switch_info.port_id = +BNXT_PF (bp) ?BNXT_SWITCH_PORT_ID_PF : +BNXT_SWITCH_PORT_ID_TRUSTED_VF ; + } +/* *INDENT-ON* */ /*
drivers/net/bnxt/bnxt_reps.c +5 -0
@@ -500,6 +500,11 @@ int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev, dev_info->tx_offload_capa =BNXT_DEV_TX_OFFLOAD_SUPPORT ; dev_info->flow_type_rss_offloads =BNXT_ETH_RSS_SUPPORT ; + dev_info->switch_info.name = eth_dev->device->name; + dev_info->switch_info.domain_id = rep_bp->switch_domain_id; + dev_info->switch_info.port_id = + rep_bp->vf_id &BNXT_SWITCH_PORT_ID_VF_MASK ; +return 0 ; }
drivers/net/bnxt/bnxt_reps.h +7 -0
@@ -12,6 +12,13 @@#define BNXT_MAX_CFA_CODE 65536#define BNXT_VF_IDX_INVALID 0xffff +/* Switchdev Port ID Mapping (Per switch domain id). +* Lower 15 bits map the VFs (VF_ID). Upper bit maps the PF. +*/ +#define BNXT_SWITCH_PORT_ID_PF 0x8000 +#define BNXT_SWITCH_PORT_ID_TRUSTED_VF 0x0 +#define BNXT_SWITCH_PORT_ID_VF_MASK 0x7FFF +uint16_t bnxt_vfr_recv (uint16_t port_id,uint16_t queue_id,struct rte_mbuf *mbuf);int bnxt_vf_representor_init (struct rte_eth_dev *eth_dev,void *params);
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 22/25 net/bnxt: fix bugs in representor data path
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
1.Representor Rx ring producer index was not getting reset in the ring full case. Fix it by incrementing only in success case.
2.Instead of calling the mbuf specific routine to free the mbuf when representor ring is full rte_free was being called leading to 'invalid memory' errors being logged.
3. Do not account the pkt meant for the representor in the parent Rx ring's array that is returned to the application.
--- drivers/net/bnxt/bnxt_reps.c | 6 ++++-- drivers/net/bnxt/bnxt_rxr.c | 27 +++++++++++++-------------- 2 files changed, 17 insertions(+), 16 deletions(-)
drivers/net/bnxt/bnxt_reps.c +4 -2
@@ -55,15 +55,17 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf) mask = rep_rxr->rx_ring_struct->ring_mask;/* Put this mbuf on the RxQ of the Representor */ - prod_rx_buf = &rep_rxr->rx_buf_ring[rep_rxr->rx_prod++ & mask]; + prod_rx_buf = &rep_rxr->rx_buf_ring[rep_rxr->rx_prod & mask];if (!*prod_rx_buf) { *prod_rx_buf = mbuf; vfr_bp->rx_bytes[que] += mbuf->pkt_len; vfr_bp->rx_pkts[que]++; + rep_rxr->rx_prod++; }else { +/* Representor Rx ring full, drop pkt */ vfr_bp->rx_drop_bytes[que] += mbuf->pkt_len; vfr_bp->rx_drop_pkts[que]++; -rte_pktmbuf_free (mbuf);/* Representor Rx ring full, drop pkt */ +rte_pktmbuf_free (mbuf); }return 0 ;
drivers/net/bnxt/bnxt_rxr.c +13 -14
@@ -795,6 +795,19 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, goto rx; } rxr->rx_prod = prod; + +if (BNXT_TRUFLOW_EN (bp) && (BNXT_VF_IS_TRUSTED (bp) ||BNXT_PF (bp)) && + vfr_flag) { +bnxt_vfr_recv (mark_id, rxq->queue_id, mbuf); +/* Now return an error so that nb_rx_pkts is not +* incremented. +* This packet was meant to be given to the representor. +* So no need to account the packet and give it to +* parent Rx burst function. +*/ + rc = -ENODEV ; + goto next_rx; + }/* * All MBUFs are allocated with the same size under DPDK, * no optimization for rx_copy_thresh
@@ -802,20 +815,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, rx: *rx_pkt = mbuf; -if (BNXT_TRUFLOW_EN (bp) && - (BNXT_VF_IS_TRUSTED (bp) ||BNXT_PF (bp)) && - vfr_flag) { -if (!bnxt_vfr_recv (mark_id, rxq->queue_id, mbuf)) { -/* Now return an error so that nb_rx_pkts is not -* incremented. -* This packet was meant to be given to the representor. -* So no need to account the packet and give it to -* parent Rx burst function. -*/ - rc = -ENODEV ; - } - } - next_rx: *raw_cons = tmp_raw_cons;
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 23/25 net/bnxt: add locks in flow database
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
Added support for mutex protection for the flow database to prevent simultaneous access to flow database and protect flow creation and deletion.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 33 +++++++++++++++++++++++++++ drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 7 ++++++ drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 13 ++++++++++- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 20 +++++++++++++++- 4 files changed, 71 insertions(+), 2 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +33 -0
@@ -727,6 +727,9 @@ bnxt_ulp_deinit(struct bnxt *bp,TF_TUNNEL_ENCAP_NAT , BNXT_ULP_NAT_OUTER_MOST_FLAGS, 0); +/* free the flow db lock */ +pthread_mutex_destroy (&bp->ulp_ctx->cfg_data->flow_db_lock); +/* Delete the ulp context and tf session and free the ulp context */ ulp_ctx_deinit (bp, session);BNXT_TF_DBG (DEBUG ,"ulp ctx has been deinitialized\n" );
@@ -750,6 +753,12 @@ bnxt_ulp_init(struct bnxt *bp, goto jump_to_error; } + rc =pthread_mutex_init (&bp->ulp_ctx->cfg_data->flow_db_lock,NULL ); +if (rc) { +BNXT_TF_DBG (ERR ,"Unable to initialize flow db lock\n" ); + goto jump_to_error; + } +/* Initialize ulp dparms with values devargs passed */ rc =ulp_dparms_init (bp, bp->ulp_ctx);if (rc) {
@@ -1235,3 +1244,27 @@ bnxt_ulp_cntxt_ptr2_ulp_vfr_info_get(struct bnxt_ulp_context *ulp_ctx,return &ulp_ctx->cfg_data->vfr_rule_info[port_id]; } + +/* Function to acquire the flow database lock from the ulp context. */ +int32_t +bnxt_ulp_cntxt_acquire_fdb_lock (struct bnxt_ulp_context *ulp_ctx) +{ +if (!ulp_ctx || !ulp_ctx->cfg_data) +return -1 ; + +if (pthread_mutex_lock (&ulp_ctx->cfg_data->flow_db_lock)) { +BNXT_TF_DBG (ERR ,"unable to acquire fdb lock\n" ); +return -1 ; + } +return 0 ; +} + +/* Function to release the flow database lock from the ulp context. */ +void +bnxt_ulp_cntxt_release_fdb_lock (struct bnxt_ulp_context *ulp_ctx) +{ +if (!ulp_ctx || !ulp_ctx->cfg_data) +return ; + +pthread_mutex_unlock (&ulp_ctx->cfg_data->flow_db_lock); +}
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +7 -0
@@ -47,6 +47,7 @@ struct bnxt_ulp_data {uint32_t dev_id;/* Hardware device id */ uint32_t ref_cnt;struct bnxt_ulp_flow_db *flow_db; +pthread_mutex_t flow_db_lock;void *mapper_data;struct bnxt_ulp_port_db *port_db;struct bnxt_ulp_fc_info *fc_info;
@@ -196,4 +197,10 @@ struct bnxt_ulp_vfr_rule_info* bnxt_ulp_cntxt_ptr2_ulp_vfr_info_get(struct bnxt_ulp_context *ulp_ctx, uint32_t port_id); +int32_t +bnxt_ulp_cntxt_acquire_fdb_lock (struct bnxt_ulp_context *ulp_ctx); + +void +bnxt_ulp_cntxt_release_fdb_lock (struct bnxt_ulp_context *ulp_ctx); +#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +12 -1
@@ -793,10 +793,17 @@ int32_t ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,BNXT_TF_DBG (ERR ,"Flow database not found\n" );return -EINVAL ; } +if (bnxt_ulp_cntxt_acquire_fdb_lock (ulp_ctx)) { +BNXT_TF_DBG (ERR ,"Flow db lock acquire failed\n" ); +return -EINVAL ; + } + flow_tbl = &flow_db->flow_tbl[idx];while (!ulp_flow_db_next_entry_get (flow_tbl, &fid))ulp_mapper_resources_free (ulp_ctx, fid, idx); +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx); +return 0 ; }
@@ -826,13 +833,17 @@ ulp_flow_db_function_flow_flush(struct bnxt_ulp_context *ulp_ctx,BNXT_TF_DBG (ERR ,"Flow database not found\n" );return -EINVAL ; } +if (bnxt_ulp_cntxt_acquire_fdb_lock (ulp_ctx)) { +BNXT_TF_DBG (ERR ,"Flow db lock acquire failed\n" ); +return -EINVAL ; + } flow_tbl = &flow_db->flow_tbl[BNXT_ULP_REGULAR_FLOW_TABLE ];while (!ulp_flow_db_next_entry_get (flow_tbl, &flow_id)) {if (flow_db->func_id_tbl[flow_id] == func_id)ulp_mapper_resources_free (ulp_ctx, flow_id,BNXT_ULP_REGULAR_FLOW_TABLE ); } - +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx);return 0 ; }
drivers/net/bnxt/tf_ulp/ulp_mapper.c +19 -1
@@ -2668,12 +2668,21 @@ int32_t ulp_mapper_flow_destroy(struct bnxt_ulp_context *ulp_ctx, uint32_t fid, enum bnxt_ulp_flow_db_tables flow_tbl_type) { + int32_t rc; +if (!ulp_ctx) {BNXT_TF_DBG (ERR ,"Invalid parms, unable to free flow\n" );return -EINVAL ; } +if (bnxt_ulp_cntxt_acquire_fdb_lock (ulp_ctx)) { +BNXT_TF_DBG (ERR ,"Flow db lock acquire failed\n" ); +return -EINVAL ; + } + + rc =ulp_mapper_resources_free (ulp_ctx, fid, flow_tbl_type); +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx); +return rc; -return ulp_mapper_resources_free (ulp_ctx, fid, flow_tbl_type); }/* Function to handle the default global templates that are allocated during
@@ -2838,6 +2847,12 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,return -EINVAL ; } +/* Protect flow creation */ +if (bnxt_ulp_cntxt_acquire_fdb_lock (ulp_ctx)) { +BNXT_TF_DBG (ERR ,"Flow db lock acquire failed\n" ); +return -EINVAL ; + } +/* Allocate a Flow ID for attaching all resources for the flow to. * Once allocated, all errors have to walk the list of resources and * free each of them.
@@ -2848,6 +2863,7 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx, &parms.fid);if (rc) {BNXT_TF_DBG (ERR ,"Unable to allocate flow table entry\n" ); +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx);return rc; }
@@ -2871,10 +2887,12 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx, } *flowid = parms.fid; +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx);return rc; flow_error: +bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx);/* Free all resources that were allocated during flow creation */ trc =ulp_mapper_flow_destroy (ulp_ctx, parms.fid,BNXT_ULP_REGULAR_FLOW_TABLE );
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 24/25 net/bnxt: fix to check VNIC in shutdown path
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
Add a couple of NULL pointer checks in bnxt_free_all_filters() and bnxt_free_vnics() respectively to guard against certain error injection/recovery scenarios where it was found that the application was crashing with the bp->vnic_info pointer being NULL.
--- drivers/net/bnxt/bnxt_filter.c | 14 +++++++++----- drivers/net/bnxt/bnxt_vnic.c | 3 +++ 2 files changed, 12 insertions(+), 5 deletions(-)
drivers/net/bnxt/bnxt_filter.c +9 -5
@@ -81,6 +81,15 @@ void bnxt_free_all_filters(struct bnxt *bp)struct bnxt_filter_info *filter, *temp_filter;unsigned int i; +for (i =0 ; i < bp->pf->max_vfs; i++) { + STAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) { +bnxt_hwrm_clear_l2_filter (bp, filter); + } + } + +if (bp->vnic_info ==NULL ) +return ; +for (i =0 ; i < bp->nr_vnics; i++) { vnic = &bp->vnic_info[i]; filter =STAILQ_FIRST (&vnic->filter);
@@ -95,11 +104,6 @@ void bnxt_free_all_filters(struct bnxt *bp)STAILQ_INIT (&vnic->filter); } -for (i =0 ; i < bp->pf->max_vfs; i++) { - STAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) { -bnxt_hwrm_clear_l2_filter (bp, filter); - } - } }void bnxt_free_filter_mem (struct bnxt *bp)
drivers/net/bnxt/bnxt_vnic.c +3 -0
@@ -78,6 +78,9 @@ void bnxt_free_all_vnics(struct bnxt *bp)struct bnxt_vnic_info *vnic;unsigned int i; +if (bp->vnic_info ==NULL ) +return ; +for (i =0 ; i < bp->max_vnics; i++) { vnic = &bp->vnic_info[i];STAILQ_INSERT_TAIL (&bp->free_vnic_list, vnic, next);
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 25/25 net/bnxt: add separate mutex for FW health check
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
def_cp_lock was added to sync race between dev_configure and int_handler. It should not be used to synchronize scheduling of FW health check between dev_start and async event handler as well, use a separate mutex for the same.
--- drivers/net/bnxt/bnxt.h | 1 + drivers/net/bnxt/bnxt_ethdev.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-)
drivers/net/bnxt/bnxt.h +1 -0
@@ -712,6 +712,7 @@ struct bnxt {rte_iova_t hwrm_short_cmd_req_dma_addr;rte_spinlock_t hwrm_lock;pthread_mutex_t def_cp_lock; +pthread_mutex_t health_check_lock;uint16_t max_req_len;uint16_t max_resp_len;uint16_t hwrm_max_ext_req_len;
drivers/net/bnxt/bnxt_ethdev.c +12 -4
@@ -1252,9 +1252,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) eth_dev->rx_pkt_burst =bnxt_receive_function (eth_dev); eth_dev->tx_pkt_burst =bnxt_transmit_function (eth_dev); -pthread_mutex_lock (&bp->def_cp_lock);bnxt_schedule_fw_health_check (bp); -pthread_mutex_unlock (&bp->def_cp_lock);return 0 ;
@@ -4675,17 +4673,22 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp) {uint32_t polling_freq; +pthread_mutex_lock (&bp->health_check_lock); +if (!bnxt_is_recovery_enabled (bp)) -return ; + goto done;if (bp->flags &BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED ) -return ; + goto done; polling_freq = bp->recovery_info->driver_polling_freq;rte_eal_alarm_set (US_PER_MS * polling_freq, bnxt_check_fw_health, (void *)bp); bp->flags |=BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED ; + +done: +pthread_mutex_unlock (&bp->health_check_lock); }static void bnxt_cancel_fw_health_check (struct bnxt *bp)
@@ -5473,6 +5476,10 @@ bnxt_init_locks(struct bnxt *bp) err =pthread_mutex_init (&bp->def_cp_lock,NULL );if (err)PMD_DRV_LOG (ERR ,"Unable to initialize def_cp_lock\n" ); + + err =pthread_mutex_init (&bp->health_check_lock,NULL ); +if (err) +PMD_DRV_LOG (ERR ,"Unable to initialize health_check_lock\n" );return err; }
@@ -5884,6 +5891,7 @@ bnxt_uninit_locks(struct bnxt *bp) {pthread_mutex_destroy (&bp->flow_lock);pthread_mutex_destroy (&bp->def_cp_lock); +pthread_mutex_destroy (&bp->health_check_lock);if (bp->rep_info) {pthread_mutex_destroy (&bp->rep_info->vfr_lock);pthread_mutex_destroy (&bp->rep_info->vfr_start_lock);
Signature · 1 line
2.21.1 (Apple Git-122.3)
Ajit Khaparde
AppliedQuoted 6 lines · Ajit Khaparde
Some fixes and enhancements in the PMD and TruFlow layers.
v1->v2:
- rebased to latest
- updated commit messages
Applied to dpdk-next-net-brcm.
Quoted 75 lines
Kishore Padmanabha (14):
net/bnxt: fix port stop process and cleanup resources net/bnxt: fix the drop action flow to support count net/bnxt: reject flow offload with invalid MAC net/bnxt: reduce debug log messages
net/bnxt: fix coexistence of ipv4 and ipv6 ingress rules net/bnxt: modify default flow rule creation net/bnxt: fix the function id used in flow flush net/bnxt: refactor VFR port clean up
net/bnxt: remove VLAN pop action for egress flows net/bnxt: increase counter support from 8K to 16K net/bnxt: enable VXLAN ipv6 encapsulation net/bnxt: enable NAT action with tagged traffic net/bnxt: fix out of bound access in bit handling net/bnxt: add locks in flow databaseMike Baucom (1):
net/bnxt: free the EM index on failureRandy Schacher (1):
net/bnxt: use direct HWRM message for interface tableShahaji Bhosle (2):
net/bnxt: add null pointer check for resource manager net/bnxt: update resource settingsSomnath Kotur (6):
net/bnxt: fix crash in VFR queue select net/bnxt: fix VFR cleanup during init failure net/bnxt: check and set initial counter ID net/bnxt: fix bugs in representor data path net/bnxt: fix to check VNIC in shutdown path net/bnxt: add separate mutex for FW health checkSriharsha Basavapatna (1):
net/bnxt: provide switch info if VFR are configureddrivers/net/bnxt/bnxt.h | 13 +- drivers/net/bnxt/bnxt_ethdev.c | 101 +- drivers/net/bnxt/bnxt_filter.c | 14 +- drivers/net/bnxt/bnxt_hwrm.c | 13 +- drivers/net/bnxt/bnxt_reps.c | 162 +- drivers/net/bnxt/bnxt_reps.h | 8 + drivers/net/bnxt/bnxt_rxr.c | 27 +- drivers/net/bnxt/bnxt_vnic.c | 3 + drivers/net/bnxt/hsi_struct_def_dpdk.h | 935 ++- drivers/net/bnxt/tf_core/tf_em_internal.c | 5 +- drivers/net/bnxt/tf_core/tf_msg.c | 58 +- drivers/net/bnxt/tf_core/tf_rm.c | 14 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 569 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 34 +- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 56 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 131 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 8 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 1 + drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 17 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 4 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 52 +- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 6 - drivers/net/bnxt/tf_ulp/ulp_port_db.c | 41 + drivers/net/bnxt/tf_ulp/ulp_port_db.h | 13 + drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 153 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 +- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 295 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 5531 +++++++++++------ .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 66 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 767 ++- drivers/net/bnxt/tf_ulp/ulp_utils.c | 43 +- drivers/net/bnxt/tf_ulp/ulp_utils.h | 7 +- 32 files changed, 5836 insertions(+), 3316 deletions(-)--
2.21.1 (Apple Git-122.3)
Quoted 48 lines · Ajit Khaparde
Quoted 6 lines · Ajit Khaparde
Some fixes and enhancements in the PMD and TruFlow layers.
v1->v2:
- rebased to latest
- updated commit messagesApplied to dpdk-next-net-brcm.
Quoted 38 lines
Kishore Padmanabha (14):
net/bnxt: fix port stop process and cleanup resources net/bnxt: fix the drop action flow to support count net/bnxt: reject flow offload with invalid MAC net/bnxt: reduce debug log messages
net/bnxt: fix coexistence of ipv4 and ipv6 ingress rules net/bnxt: modify default flow rule creation net/bnxt: fix the function id used in flow flush net/bnxt: refactor VFR port clean up
net/bnxt: remove VLAN pop action for egress flows net/bnxt: increase counter support from 8K to 16K net/bnxt: enable VXLAN ipv6 encapsulation net/bnxt: enable NAT action with tagged traffic net/bnxt: fix out of bound access in bit handling net/bnxt: add locks in flow databaseMike Baucom (1):
net/bnxt: free the EM index on failureRandy Schacher (1):
net/bnxt: use direct HWRM message for interface tableShahaji Bhosle (2):
net/bnxt: add null pointer check for resource manager net/bnxt: update resource settingsSomnath Kotur (6):
net/bnxt: fix crash in VFR queue select net/bnxt: fix VFR cleanup during init failure net/bnxt: check and set initial counter ID net/bnxt: fix bugs in representor data path net/bnxt: fix to check VNIC in shutdown path net/bnxt: add separate mutex for FW health checkSriharsha Basavapatna (1):
net/bnxt: provide switch info if VFR are configured
Hi Ajit,
I assume the backporting of the majority of the patchset explicitly not requested, since two of them has stable tag but rest don't, but I would like to confirm.
And I suggest backporting fixes as much as possible, since missing some fixes may cause conflict for future fixes and prevent backporting them.
Quoted 51 lines · Ferruh Yigit
Quoted 48 lines · Ajit Khaparde
Quoted 6 lines · Ajit Khaparde
Some fixes and enhancements in the PMD and TruFlow layers.
v1->v2:
- rebased to latest
- updated commit messagesApplied to dpdk-next-net-brcm.
Quoted 38 lines
Kishore Padmanabha (14):
net/bnxt: fix port stop process and cleanup resources net/bnxt: fix the drop action flow to support count net/bnxt: reject flow offload with invalid MAC net/bnxt: reduce debug log messages
net/bnxt: fix coexistence of ipv4 and ipv6 ingress rules net/bnxt: modify default flow rule creation net/bnxt: fix the function id used in flow flush net/bnxt: refactor VFR port clean up
net/bnxt: remove VLAN pop action for egress flows net/bnxt: increase counter support from 8K to 16K net/bnxt: enable VXLAN ipv6 encapsulation net/bnxt: enable NAT action with tagged traffic net/bnxt: fix out of bound access in bit handling net/bnxt: add locks in flow databaseMike Baucom (1):
net/bnxt: free the EM index on failureRandy Schacher (1):
net/bnxt: use direct HWRM message for interface tableShahaji Bhosle (2):
net/bnxt: add null pointer check for resource manager net/bnxt: update resource settingsSomnath Kotur (6):
net/bnxt: fix crash in VFR queue select net/bnxt: fix VFR cleanup during init failure net/bnxt: check and set initial counter ID net/bnxt: fix bugs in representor data path net/bnxt: fix to check VNIC in shutdown path net/bnxt: add separate mutex for FW health checkSriharsha Basavapatna (1):
net/bnxt: provide switch info if VFR are configured
Quoted 8 lines
Hi Ajit,
I assume the backporting of the majority of the patchset explicitly not requested, since two of them has stable tag but rest don't, but I would like to confirm.
And I suggest backporting fixes as much as possible, since missing some fixes may cause conflict for future fixes and prevent backporting them.
Hi Ferruh,
Most of the fixes are actually for changes made in 20.08
Since it is not an LTS, I think not really porting them should not be a problem. But if there is any patch which needs to go into earlier LTS releases, I will add it to the list of backports.
Thanks for checking.
Ajit
Quoted 2 lines
Quoted 58 lines · Ajit Khaparde
Quoted 57 lines · Ferruh Yigit
Quoted 48 lines · Ajit Khaparde
Quoted 6 lines · Ajit Khaparde
Some fixes and enhancements in the PMD and TruFlow layers.
v1->v2:
- rebased to latest
- updated commit messagesApplied to dpdk-next-net-brcm.
Quoted 38 lines
Kishore Padmanabha (14):
net/bnxt: fix port stop process and cleanup resources net/bnxt: fix the drop action flow to support count net/bnxt: reject flow offload with invalid MAC net/bnxt: reduce debug log messages
net/bnxt: fix coexistence of ipv4 and ipv6 ingress rules net/bnxt: modify default flow rule creation net/bnxt: fix the function id used in flow flush net/bnxt: refactor VFR port clean up
net/bnxt: remove VLAN pop action for egress flows net/bnxt: increase counter support from 8K to 16K net/bnxt: enable VXLAN ipv6 encapsulation net/bnxt: enable NAT action with tagged traffic net/bnxt: fix out of bound access in bit handling net/bnxt: add locks in flow databaseMike Baucom (1):
net/bnxt: free the EM index on failureRandy Schacher (1):
net/bnxt: use direct HWRM message for interface tableShahaji Bhosle (2):
net/bnxt: add null pointer check for resource manager net/bnxt: update resource settingsSomnath Kotur (6):
net/bnxt: fix crash in VFR queue select net/bnxt: fix VFR cleanup during init failure net/bnxt: check and set initial counter ID net/bnxt: fix bugs in representor data path net/bnxt: fix to check VNIC in shutdown path net/bnxt: add separate mutex for FW health checkSriharsha Basavapatna (1):
net/bnxt: provide switch info if VFR are configuredHi Ajit,
I assume the backporting of the majority of the patchset explicitly not requested, since two of them has stable tag but rest don't, but I would like to confirm.
Quoted 8 lines
Quoted 2 lines
And I suggest backporting fixes as much as possible, since missing some fixes may cause conflict for future fixes and prevent backporting them.
Hi Ferruh,
Most of the fixes are actually for changes made in 20.08
Since it is not an LTS, I think not really porting them should not be a problem. But if there is any patch which needs to go into earlier LTS releases, I will add it to the list of backports.
This is not just for LTS, if somehow we have 20.08.1, they will matter.
Also this is good for documenting the actual intention of the author related backporting the patches.
As far as I can see there is not explicit request to "not" backport them, so I will add the missing tags while merging.