sync Truflow support with latest release
Subsystems (2)
v2 cover sync Truflow support with latest release
Version 2 fixes:
- misspellings
- whitespace issues
- signed off issues
Kishore Padmanabha (1):
net/bnxt: fix multi-root card support
Randy Schacher (9):
net/bnxt: remove deprecated features net/bnxt: update bnxt hsi structure
net/bnxt: update copyright date and cleanup whitespace net/bnxt: update Truflow core
net/bnxt: update ULP shared session support net/bnxt: add support for RSS action and Queue action net/bnxt: add ulp support for rte meter net/bnxt: update PTP support on Thor net/bnxt: add ulp support for ecpri
Shuanglin Wang (1):
net/bnxt: Avoid submitting hwrm rss request when rss mode disabled
drivers/net/bnxt/bnxt.h | 77 +- drivers/net/bnxt/bnxt_cpr.c | 2 +- drivers/net/bnxt/bnxt_cpr.h | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 211 +- drivers/net/bnxt/bnxt_filter.c | 2 +- drivers/net/bnxt/bnxt_filter.h | 6 +- drivers/net/bnxt/bnxt_flow.c | 75 +- drivers/net/bnxt/bnxt_hwrm.c | 272 +- drivers/net/bnxt/bnxt_hwrm.h | 40 +- drivers/net/bnxt/bnxt_irq.c | 2 +- drivers/net/bnxt/bnxt_irq.h | 3 +- drivers/net/bnxt/bnxt_nvm_defs.h | 3 +- drivers/net/bnxt/bnxt_reps.c | 4 +- drivers/net/bnxt/bnxt_reps.h | 2 +- drivers/net/bnxt/bnxt_ring.c | 7 +- drivers/net/bnxt/bnxt_ring.h | 3 +- drivers/net/bnxt/bnxt_rxq.c | 159 +- drivers/net/bnxt/bnxt_rxq.h | 2 +- drivers/net/bnxt/bnxt_rxr.c | 15 +- drivers/net/bnxt/bnxt_rxr.h | 3 +- drivers/net/bnxt/bnxt_rxtx_vec_avx2.c | 2 +- drivers/net/bnxt/bnxt_rxtx_vec_common.h | 2 +- drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 2 +- drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 +- drivers/net/bnxt/bnxt_stats.c | 2 +- drivers/net/bnxt/bnxt_stats.h | 2 +- drivers/net/bnxt/bnxt_txq.c | 3 +- drivers/net/bnxt/bnxt_txq.h | 2 +- drivers/net/bnxt/bnxt_txr.c | 95 +- drivers/net/bnxt/bnxt_txr.h | 4 +- drivers/net/bnxt/bnxt_util.c | 2 +- drivers/net/bnxt/bnxt_util.h | 3 +- drivers/net/bnxt/bnxt_vnic.c | 974 +- drivers/net/bnxt/bnxt_vnic.h | 80 +- drivers/net/bnxt/hsi_struct_def_dpdk.h | 5723 ++- drivers/net/bnxt/meson.build | 5 +- drivers/net/bnxt/rte_pmd_bnxt.c | 2 +- drivers/net/bnxt/rte_pmd_bnxt.h | 2 +- drivers/net/bnxt/tf_core/bitalloc.c | 3 +- drivers/net/bnxt/tf_core/bitalloc.h | 3 +- drivers/net/bnxt/tf_core/cfa_resource_types.h | 5 +- drivers/net/bnxt/tf_core/cfa_tcam_mgr.c | 2116 + drivers/net/bnxt/tf_core/cfa_tcam_mgr.h | 523 + .../net/bnxt/tf_core/cfa_tcam_mgr_device.h | 101 + .../net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c | 201 + .../net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h | 28 + drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c | 921 + drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h | 20 + drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c | 926 + drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h | 20 + drivers/net/bnxt/tf_core/cfa_tcam_mgr_sbmp.h | 126 + .../net/bnxt/tf_core/cfa_tcam_mgr_session.c | 377 + .../net/bnxt/tf_core/cfa_tcam_mgr_session.h | 54 + drivers/net/bnxt/tf_core/dpool.c | 3 +- drivers/net/bnxt/tf_core/dpool.h | 3 +- drivers/net/bnxt/tf_core/ll.c | 2 +- drivers/net/bnxt/tf_core/ll.h | 2 +- drivers/net/bnxt/tf_core/lookup3.h | 1 - drivers/net/bnxt/tf_core/meson.build | 38 +- drivers/net/bnxt/tf_core/rand.c | 2 +- drivers/net/bnxt/tf_core/rand.h | 3 +- drivers/net/bnxt/tf_core/stack.c | 2 +- drivers/net/bnxt/tf_core/stack.h | 3 +- drivers/net/bnxt/tf_core/tf_common.h | 3 +- drivers/net/bnxt/tf_core/tf_core.c | 56 +- drivers/net/bnxt/tf_core/tf_core.h | 189 +- drivers/net/bnxt/tf_core/tf_device.c | 53 +- drivers/net/bnxt/tf_core/tf_device.h | 9 +- drivers/net/bnxt/tf_core/tf_device_p4.c | 24 +- drivers/net/bnxt/tf_core/tf_device_p4.h | 3 +- drivers/net/bnxt/tf_core/tf_device_p58.c | 94 +- drivers/net/bnxt/tf_core/tf_device_p58.h | 2 +- drivers/net/bnxt/tf_core/tf_em.h | 3 +- drivers/net/bnxt/tf_core/tf_em_common.c | 10 +- drivers/net/bnxt/tf_core/tf_em_common.h | 4 +- .../net/bnxt/tf_core/tf_em_hash_internal.c | 2 +- drivers/net/bnxt/tf_core/tf_em_host.c | 3 +- drivers/net/bnxt/tf_core/tf_em_internal.c | 13 +- drivers/net/bnxt/tf_core/tf_ext_flow_handle.h | 4 +- drivers/net/bnxt/tf_core/tf_global_cfg.c | 2 +- drivers/net/bnxt/tf_core/tf_global_cfg.h | 3 +- drivers/net/bnxt/tf_core/tf_hash.c | 2 +- drivers/net/bnxt/tf_core/tf_hash.h | 3 +- drivers/net/bnxt/tf_core/tf_identifier.c | 111 +- drivers/net/bnxt/tf_core/tf_identifier.h | 7 +- drivers/net/bnxt/tf_core/tf_if_tbl.c | 59 +- drivers/net/bnxt/tf_core/tf_if_tbl.h | 11 +- drivers/net/bnxt/tf_core/tf_msg.c | 217 +- drivers/net/bnxt/tf_core/tf_msg.h | 38 +- drivers/net/bnxt/tf_core/tf_msg_common.h | 3 +- drivers/net/bnxt/tf_core/tf_project.h | 3 +- drivers/net/bnxt/tf_core/tf_resources.h | 3 +- drivers/net/bnxt/tf_core/tf_rm.c | 135 +- drivers/net/bnxt/tf_core/tf_rm.h | 6 +- drivers/net/bnxt/tf_core/tf_session.c | 121 +- drivers/net/bnxt/tf_core/tf_session.h | 80 +- .../net/bnxt/tf_core/tf_shadow_identifier.c | 190 - .../net/bnxt/tf_core/tf_shadow_identifier.h | 229 - drivers/net/bnxt/tf_core/tf_shadow_tcam.c | 837 - drivers/net/bnxt/tf_core/tf_shadow_tcam.h | 195 - drivers/net/bnxt/tf_core/tf_sram_mgr.c | 117 +- drivers/net/bnxt/tf_core/tf_sram_mgr.h | 23 +- drivers/net/bnxt/tf_core/tf_tbl.c | 8 +- drivers/net/bnxt/tf_core/tf_tbl.h | 4 +- drivers/net/bnxt/tf_core/tf_tbl_sram.c | 25 +- drivers/net/bnxt/tf_core/tf_tbl_sram.h | 6 +- drivers/net/bnxt/tf_core/tf_tcam.c | 451 +- drivers/net/bnxt/tf_core/tf_tcam.h | 41 +- drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c | 286 + drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h | 49 + drivers/net/bnxt/tf_core/tf_tcam_shared.c | 1146 +- drivers/net/bnxt/tf_core/tf_tcam_shared.h | 4 +- drivers/net/bnxt/tf_core/tf_util.c | 5 +- drivers/net/bnxt/tf_core/tf_util.h | 3 +- drivers/net/bnxt/tf_core/tfp.c | 2 +- drivers/net/bnxt/tf_core/tfp.h | 4 +- drivers/net/bnxt/tf_ulp/bnxt_tf_common.h | 3 +- drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c | 251 +- drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h | 37 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 850 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 121 +- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 280 +- drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c | 909 + .../bnxt/tf_ulp/generic_templates/meson.build | 18 +- .../generic_templates/ulp_template_db_act.c | 7000 +++- .../generic_templates/ulp_template_db_class.c | 33556 +++++++++++----- .../generic_templates/ulp_template_db_enum.h | 4366 +- .../generic_templates/ulp_template_db_field.h | 689 +- .../generic_templates/ulp_template_db_tbl.c | 16055 ++++++-- .../ulp_template_db_thor_act.c | 8714 ++-- .../ulp_template_db_thor_class.c | 10746 +++-- .../ulp_template_db_wh_plus_act.c | 1157 +- .../ulp_template_db_wh_plus_class.c | 288 +- drivers/net/bnxt/tf_ulp/meson.build | 26 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 16 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 26 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 8 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 29 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 14 +- drivers/net/bnxt/tf_ulp/ulp_gen_hash.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_gen_hash.h | 3 +- drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c | 37 +- drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h | 5 +- drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 131 +- drivers/net/bnxt/tf_ulp/ulp_ha_mgr.h | 6 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 726 +- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 4 +- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h | 3 +- drivers/net/bnxt/tf_ulp/ulp_matcher.c | 14 +- drivers/net/bnxt/tf_ulp/ulp_matcher.h | 3 +- drivers/net/bnxt/tf_ulp/ulp_port_db.c | 64 +- drivers/net/bnxt/tf_ulp/ulp_port_db.h | 35 +- drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 30 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 512 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 46 +- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 25 +- drivers/net/bnxt/tf_ulp/ulp_tun.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_tun.h | 3 +- drivers/net/bnxt/tf_ulp/ulp_utils.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_utils.h | 3 +- lib/cmdline/cmdline_parse_string.h | 2 +- lib/cmdline/cmdline_private.h | 2 +- 163 files changed, 79573 insertions(+), 25429 deletions(-) create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_sbmp.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.c create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_identifier.c delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_identifier.h delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tcam.c delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tcam.h create mode 100644 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c create mode 100644 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c
Signature · 1 line
2.25.1
PATCH v2 1/11 net/bnxt: remove deprecated features
- Deprecate shadow identifier
- Deprecate shadow tcam
--- drivers/net/bnxt/bnxt_hwrm.c | 53 -- drivers/net/bnxt/bnxt_hwrm.h | 10 - drivers/net/bnxt/tf_core/meson.build | 2 - drivers/net/bnxt/tf_core/tf_core.c | 2 - drivers/net/bnxt/tf_core/tf_core.h | 91 +- drivers/net/bnxt/tf_core/tf_device.c | 35 - drivers/net/bnxt/tf_core/tf_device.h | 6 - drivers/net/bnxt/tf_core/tf_device_p4.c | 10 - drivers/net/bnxt/tf_core/tf_device_p58.c | 10 - drivers/net/bnxt/tf_core/tf_identifier.c | 108 --- drivers/net/bnxt/tf_core/tf_identifier.h | 4 - drivers/net/bnxt/tf_core/tf_if_tbl.h | 8 - drivers/net/bnxt/tf_core/tf_session.c | 9 +- drivers/net/bnxt/tf_core/tf_session.h | 18 +- .../net/bnxt/tf_core/tf_shadow_identifier.c | 190 ---- .../net/bnxt/tf_core/tf_shadow_identifier.h | 229 ----- drivers/net/bnxt/tf_core/tf_shadow_tcam.c | 837 ------------------ drivers/net/bnxt/tf_core/tf_shadow_tcam.h | 195 ---- drivers/net/bnxt/tf_core/tf_tcam.c | 243 ----- drivers/net/bnxt/tf_core/tf_tcam.h | 38 +- drivers/net/bnxt/tf_core/tf_util.c | 2 - drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 3 - 22 files changed, 8 insertions(+), 2095 deletions(-) delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_identifier.c delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_identifier.h delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tcam.c delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tcam.h
drivers/net/bnxt/bnxt_hwrm.c +0 -53
@@ -407,59 +407,6 @@ int bnxt_hwrm_tf_message_direct(struct bnxt *bp,return rc; } -int bnxt_hwrm_tf_message_tunneled (struct bnxt *bp, -bool use_kong_mb, -uint16_t tf_type, -uint16_t tf_subtype, -uint32_t *tf_response_code, -void *msg, -uint32_t msg_len, -void *response, -uint32_t response_len) -{ -int rc =0 ; -struct hwrm_cfa_tflib_input req = { .req_type =0 }; -struct hwrm_cfa_tflib_output *resp = bp->hwrm_cmd_resp_addr; -bool mailbox =BNXT_USE_CHIMP_MB ; - -if (msg_len >sizeof (req.tf_req)) -return -ENOMEM ; - -if (use_kong_mb) - mailbox =BNXT_USE_KONG (bp); - -HWRM_PREP (&req,HWRM_TF , mailbox); -/* Build request using the user supplied request payload. -* TLV request size is checked at build time against HWRM -* request max size, thus no checking required. -*/ - req.tf_type = tf_type; - req.tf_subtype = tf_subtype; -memcpy (req.tf_req, msg, msg_len); - - rc =bnxt_hwrm_send_message (bp, &req,sizeof (req), mailbox); -HWRM_CHECK_RESULT (); - -/* Copy the resp to user provided response buffer */ -if (response !=NULL ) -/* Post process response data. We need to copy only -* the 'payload' as the HWRM data structure really is -* HWRM header + msg header + payload and the TFLIB -* only provided a payload place holder. -*/ -if (response_len !=0 ) { -memcpy (response, - resp->tf_resp, - response_len); - } - -/* Extract the internal tflib response code */ - *tf_response_code = resp->tf_resp_code; -HWRM_UNLOCK (); - -return rc; -} -int bnxt_hwrm_cfa_l2_clear_rx_mask (struct bnxt *bp,struct bnxt_vnic_info *vnic) {int rc =0 ;
drivers/net/bnxt/bnxt_hwrm.h +0 -10
@@ -79,16 +79,6 @@ struct hwrm_func_qstats_output; bp->rx_cos_queue[x].profile = \ resp->queue_id##x##_service_profile -int bnxt_hwrm_tf_message_tunneled (struct bnxt *bp, -bool use_kong_mb, -uint16_t tf_type, -uint16_t tf_subtype, -uint32_t *tf_response_code, -void *msg, -uint32_t msg_len, -void *response, -uint32_t response_len); - int bnxt_hwrm_tf_message_direct(struct bnxt *bp, bool use_kong_mb, uint16_t msg_type,
drivers/net/bnxt/tf_core/meson.build +0 -2
@@ -30,9 +30,7 @@ sources += files( 'tf_identifier.c', 'tf_if_tbl.c', 'tf_session.c', - 'tf_shadow_tcam.c', 'tf_tcam.c', 'tf_tcam_shared.c', - 'tf_shadow_identifier.c', 'tf_hash.c', 'tf_device_p58.c')
drivers/net/bnxt/tf_core/tf_core.c +0 -2
@@ -917,7 +917,6 @@ tf_free_tcam_entry(struct tf *tfp,return 0 ; } -#ifdef TF_TCAM_SHARED int tf_move_tcam_shared_entries (struct tf *tfp,struct tf_move_tcam_shared_entries_parms *parms)
@@ -1019,7 +1018,6 @@ tf_clear_tcam_shared_entries(struct tf *tfp,return 0 ; } -#endif /* TF_TCAM_SHARED */ int tf_alloc_tbl_entry(struct tf *tfp,
drivers/net/bnxt/tf_core/tf_core.h +4 -87
178 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device.c +0 -35
@@ -9,10 +9,8 @@#include "tfp.h" #include "tf_em.h" #include "tf_rm.h" -#ifdef TF_TCAM_SHARED #include "tf_tcam_shared.h" #include "tf_tbl_sram.h" -#endif /* TF_TCAM_SHARED */ struct tf ;
@@ -67,9 +65,6 @@ tf_dev_reservation_check(uint16_t count,* [in] tfp * Pointer to TF handle * -* [in] shadow_copy -* Flag controlling shadow copy DB creation -* * [in] resources * Pointer to resource allocation information *
@@ -82,7 +77,6 @@ tf_dev_reservation_check(uint16_t count,*/ static int tf_dev_bind_p4 (struct tf *tfp, -bool shadow_copy,struct tf_session_resources *resources,struct tf_dev_info *dev_handle,enum tf_wc_num_slice wc_num_slices)
@@ -115,7 +109,6 @@ tf_dev_bind_p4(struct tf *tfp,if (rsv_cnt) { ident_cfg.num_elements =TF_IDENT_TYPE_MAX ; ident_cfg.cfg = tf_ident_p4; - ident_cfg.shadow_copy = shadow_copy; ident_cfg.resources = resources; rc =tf_ident_bind (tfp, &ident_cfg);if (rc) {
@@ -150,14 +143,9 @@ tf_dev_bind_p4(struct tf *tfp,if (rsv_cnt) { tcam_cfg.num_elements =TF_TCAM_TBL_TYPE_MAX ; tcam_cfg.cfg = tf_tcam_p4; - tcam_cfg.shadow_copy = shadow_copy; tcam_cfg.resources = resources; tcam_cfg.wc_num_slices = wc_num_slices; -#ifdef TF_TCAM_SHARED rc =tf_tcam_shared_bind (tfp, &tcam_cfg); -#else /* !TF_TCAM_SHARED */ - rc =tf_tcam_bind (tfp, &tcam_cfg); -#endif if (rc) {TFP_DRV_LOG (ERR ,"TCAM initialization failure\n" );
@@ -223,7 +211,6 @@ tf_dev_bind_p4(struct tf *tfp,*/ if_tbl_cfg.num_elements =TF_IF_TBL_TYPE_MAX ; if_tbl_cfg.cfg = tf_if_tbl_p4; - if_tbl_cfg.shadow_copy = shadow_copy; rc =tf_if_tbl_bind (tfp, &if_tbl_cfg);if (rc) { TFP_DRV_LOG(ERR,
@@ -287,11 +274,7 @@ tf_dev_unbind_p4(struct tf *tfp)* In case of residuals TCAMs are cleaned up first as to * invalidate the pipeline in a clean manner. */ -#ifdef TF_TCAM_SHARED rc =tf_tcam_shared_unbind (tfp); -#else /* !TF_TCAM_SHARED */ - rc =tf_tcam_unbind (tfp); -#endif /* TF_TCAM_SHARED */ if (rc) {TFP_DRV_LOG (INFO ,"Device unbind failed, TCAM\n" );
@@ -354,9 +337,6 @@ tf_dev_unbind_p4(struct tf *tfp)* [in] tfp * Pointer to TF handle * -* [in] shadow_copy -* Flag controlling shadow copy DB creation -* * [in] resources * Pointer to resource allocation information *
@@ -369,7 +349,6 @@ tf_dev_unbind_p4(struct tf *tfp)*/ static int tf_dev_bind_p58 (struct tf *tfp, -bool shadow_copy,struct tf_session_resources *resources,struct tf_dev_info *dev_handle,enum tf_wc_num_slice wc_num_slices)
@@ -400,7 +379,6 @@ tf_dev_bind_p58(struct tf *tfp,if (rsv_cnt) { ident_cfg.num_elements =TF_IDENT_TYPE_MAX ; ident_cfg.cfg = tf_ident_p58; - ident_cfg.shadow_copy = shadow_copy; ident_cfg.resources = resources; rc =tf_ident_bind (tfp, &ident_cfg);if (rc) {
@@ -443,14 +421,9 @@ tf_dev_bind_p58(struct tf *tfp,if (rsv_cnt) { tcam_cfg.num_elements =TF_TCAM_TBL_TYPE_MAX ; tcam_cfg.cfg = tf_tcam_p58; - tcam_cfg.shadow_copy = shadow_copy; tcam_cfg.resources = resources; tcam_cfg.wc_num_slices = wc_num_slices; -#ifdef TF_TCAM_SHARED rc =tf_tcam_shared_bind (tfp, &tcam_cfg); -#else /* !TF_TCAM_SHARED */ - rc =tf_tcam_bind (tfp, &tcam_cfg); -#endif if (rc) {TFP_DRV_LOG (ERR ,"TCAM initialization failure\n" );
@@ -495,7 +468,6 @@ tf_dev_bind_p58(struct tf *tfp,*/ if_tbl_cfg.num_elements =TF_IF_TBL_TYPE_MAX ; if_tbl_cfg.cfg = tf_if_tbl_p58; - if_tbl_cfg.shadow_copy = shadow_copy; rc =tf_if_tbl_bind (tfp, &if_tbl_cfg);if (rc) { TFP_DRV_LOG(ERR,
@@ -560,11 +532,7 @@ tf_dev_unbind_p58(struct tf *tfp)* In case of residuals TCAMs are cleaned up first as to * invalidate the pipeline in a clean manner. */ -#ifdef TF_TCAM_SHARED rc =tf_tcam_shared_unbind (tfp); -#else /* !TF_TCAM_SHARED */ - rc =tf_tcam_unbind (tfp); -#endif /* TF_TCAM_SHARED */ if (rc) {TFP_DRV_LOG (INFO ,"Device unbind failed, TCAM\n" );
@@ -629,7 +597,6 @@ tf_dev_unbind_p58(struct tf *tfp)int tf_dev_bind(struct tf *tfp __rte_unused,enum tf_device_type type, -bool shadow_copy,struct tf_session_resources *resources,uint16_t wc_num_slices,struct tf_dev_info *dev_handle)
@@ -639,14 +606,12 @@ tf_dev_bind(struct tf *tfp __rte_unused,case TF_DEVICE_TYPE_SR : dev_handle->type = type;return tf_dev_bind_p4 (tfp, - shadow_copy, resources, dev_handle, wc_num_slices);case TF_DEVICE_TYPE_THOR : dev_handle->type = type;return tf_dev_bind_p58 (tfp, - shadow_copy, resources, dev_handle, wc_num_slices);
drivers/net/bnxt/tf_core/tf_device.h +0 -6
@@ -11,9 +11,7 @@#include "tf_identifier.h" #include "tf_tbl.h" #include "tf_tcam.h" -#ifdef TF_TCAM_SHARED #include "tf_tcam_shared.h" -#endif #include "tf_if_tbl.h" #include "tf_global_cfg.h"
@@ -86,7 +84,6 @@ struct tf_hcapi_resource_map {*/ int tf_dev_bind (struct tf *tfp,enum tf_device_type type, -bool shadow_copy,struct tf_session_resources *resources,uint16_t wc_num_slices,struct tf_dev_info *dev_handle);
@@ -705,7 +702,6 @@ struct tf_dev_ops {int (*tf_dev_get_tcam)(struct tf *tfp,struct tf_tcam_get_parms *parms); -#ifdef TF_TCAM_SHARED /** * Move TCAM shared entries *
@@ -738,8 +734,6 @@ struct tf_dev_ops {int (*tf_dev_clear_tcam)(struct tf *tfp,struct tf_clear_tcam_shared_entries_parms *parms); -#endif /* TF_TCAM_SHARED */ -/** * Retrieves the tcam resource info. *
drivers/net/bnxt/tf_core/tf_device_p4.c +0 -10
@@ -10,9 +10,7 @@#include "tf_identifier.h" #include "tf_tbl.h" #include "tf_tcam.h" -#ifdef TF_TCAM_SHARED #include "tf_tcam_shared.h" -#endif /* TF_TCAM_SHARED */ #include "tf_em.h" #include "tf_if_tbl.h" #include "tfp.h"
@@ -540,20 +538,12 @@ const struct tf_dev_ops tf_dev_ops_p4 = { .tf_dev_get_bulk_sram_tbl = NULL, .tf_dev_get_shared_tbl_increment = tf_dev_p4_get_shared_tbl_increment, .tf_dev_get_tbl_resc_info = tf_tbl_get_resc_info, -#ifdef TF_TCAM_SHARED .tf_dev_alloc_tcam = tf_tcam_shared_alloc, .tf_dev_free_tcam = tf_tcam_shared_free, .tf_dev_set_tcam = tf_tcam_shared_set, .tf_dev_get_tcam = tf_tcam_shared_get, .tf_dev_move_tcam = tf_tcam_shared_move_p4, .tf_dev_clear_tcam = tf_tcam_shared_clear, -#else /* !TF_TCAM_SHARED */ - .tf_dev_alloc_tcam = tf_tcam_alloc, - .tf_dev_free_tcam = tf_tcam_free, - .tf_dev_set_tcam = tf_tcam_set, - .tf_dev_get_tcam = tf_tcam_get, -#endif - .tf_dev_alloc_search_tcam = tf_tcam_alloc_search, .tf_dev_get_tcam_resc_info = tf_tcam_get_resc_info, .tf_dev_insert_int_em_entry = tf_em_insert_int_entry, .tf_dev_delete_int_em_entry = tf_em_delete_int_entry,
drivers/net/bnxt/tf_core/tf_device_p58.c +0 -10
@@ -10,9 +10,7 @@#include "tf_identifier.h" #include "tf_tbl.h" #include "tf_tcam.h" -#ifdef TF_TCAM_SHARED #include "tf_tcam_shared.h" -#endif /* TF_TCAM_SHARED */ #include "tf_em.h" #include "tf_if_tbl.h" #include "tfp.h"
@@ -848,20 +846,12 @@ const struct tf_dev_ops tf_dev_ops_p58 = { .tf_dev_get_bulk_sram_tbl = tf_tbl_sram_bulk_get, .tf_dev_get_shared_tbl_increment = tf_dev_p58_get_shared_tbl_increment, .tf_dev_get_tbl_resc_info = tf_tbl_get_resc_info, -#ifdef TF_TCAM_SHARED .tf_dev_alloc_tcam = tf_tcam_shared_alloc, .tf_dev_free_tcam = tf_tcam_shared_free, .tf_dev_set_tcam = tf_tcam_shared_set, .tf_dev_get_tcam = tf_tcam_shared_get, .tf_dev_move_tcam = tf_tcam_shared_move_p58, .tf_dev_clear_tcam = tf_tcam_shared_clear, -#else /* !TF_TCAM_SHARED */ - .tf_dev_alloc_tcam = tf_tcam_alloc, - .tf_dev_free_tcam = tf_tcam_free, - .tf_dev_set_tcam = tf_tcam_set, - .tf_dev_get_tcam = tf_tcam_get, -#endif - .tf_dev_alloc_search_tcam = tf_tcam_alloc_search, .tf_dev_get_tcam_resc_info = tf_tcam_get_resc_info, .tf_dev_insert_int_em_entry = tf_em_hash_insert_int_entry, .tf_dev_delete_int_em_entry = tf_em_hash_delete_int_entry,
drivers/net/bnxt/tf_core/tf_identifier.c +0 -108
189 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_identifier.h +0 -4
@@ -22,10 +22,6 @@ struct tf_ident_cfg_parms {* [in] Identifier configuration array */ struct tf_rm_element_cfg *cfg; -/** -* [in] Boolean controlling the request shadow copy. -*/ -bool shadow_copy;/** * [in] Session resource allocations */
drivers/net/bnxt/tf_core/tf_if_tbl.h +0 -8
@@ -84,14 +84,6 @@ struct tf_if_tbl_cfg_parms {* Table Type element configuration array */ struct tf_if_tbl_cfg *cfg; -/** -* Shadow table type configuration array -*/ -struct tf_shadow_if_tbl_cfg *shadow_cfg; -/** -* Boolean controlling the request shadow copy. -*/ -bool shadow_copy; };/**
drivers/net/bnxt/tf_core/tf_session.c +1 -8
@@ -141,8 +141,6 @@ tf_session_create(struct tf *tfp,/* Return the allocated session id */ session_id->id = session->session_id.id; - session->shadow_copy = parms->open_cfg->shadow_copy; -/* Init session client list */ ll_init (&session->client_ll);
@@ -200,7 +198,6 @@ tf_session_create(struct tf *tfp, rc =tf_dev_bind (tfp, parms->open_cfg->device_type, - session->shadow_copy, &parms->open_cfg->resources, parms->open_cfg->wc_num_slices, &session->dev);
@@ -360,7 +357,7 @@ tf_session_client_create(struct tf *tfp,* - (-EINVAL) on failure. * - (-ENOTFOUND) error, client not owned by the session. * - (-ENOTSUPP) error, unable to destroy client as its the last -* client. Please use the tf_session_close(). +* client. Please use the tf_session_close(). */ static int tf_session_client_destroy(struct tf *tfp,
@@ -992,8 +989,6 @@ tf_session_set_db(struct tf *tfp,return rc; } -#ifdef TF_TCAM_SHARED -int tf_session_get_tcam_shared_db (struct tf *tfp,void **tcam_shared_db_handle)
@@ -1070,8 +1065,6 @@ tf_session_set_sram_db(struct tf *tfp,return rc; } -#endif /* TF_TCAM_SHARED */ -int tf_session_get_global_db (struct tf *tfp,void **global_handle)
drivers/net/bnxt/tf_core/tf_session.h +1 -17
@@ -48,8 +48,7 @@* * Shared memory containing private TruFlow session information. * Through this structure the session can keep track of resource -* allocations and (if so configured) any shadow copy of flow -* information. It also holds info about Session Clients. +* allocations. It also holds info about Session Clients. * * Memory is assigned to the Truflow instance by way of * tf_open_session. Memory is allocated and owned by i.e. ULP.
@@ -86,19 +85,6 @@ struct tf_session {*/ bool shared_session_creator; -/** -* Boolean controlling the use and availability of shadow -* copy. Shadow copy will allow the TruFlow Core to keep track -* of resource content on the firmware side without having to -* query firmware. Additional private session core_data will -* be allocated if this boolean is set to 'true', default -* 'false'. -* -* Size of memory depends on the NVM Resource settings for the -* control channel. -*/ -bool shadow_copy; -/** * Session Reference Count. To keep track of functions per * session the ref_count is updated. There is also a
@@ -159,12 +145,10 @@ struct tf_session {*/ void *em_pool[TF_DIR_MAX ]; -#ifdef TF_TCAM_SHARED /** * tcam db reference for the session */ void *tcam_shared_db_handle; -#endif /* TF_TCAM_SHARED */ /** * SRAM db reference for the session
drivers/net/bnxt/tf_core/tf_shadow_identifier.c deleted +0 -190
190 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_shadow_identifier.h deleted +0 -229
229 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_shadow_tcam.c deleted +0 -837
837 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_shadow_tcam.h deleted +0 -195
195 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tcam.c +0 -243
318 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tcam.h +2 -36
@@ -27,14 +27,6 @@ struct tf_tcam_cfg_parms {* TCAM configuration array */ struct tf_rm_element_cfg *cfg; -/** -* Shadow table type configuration array -*/ -struct tf_shadow_tcam_cfg *shadow_cfg; -/** -* Boolean controlling the request shadow copy. -*/ -bool shadow_copy;/** * Session resource allocations */
@@ -91,11 +83,6 @@ struct tf_tcam_free_parms {* [in] Index to free */ uint16_t idx; -/** -* [out] Reference count after free, only valid if session has been -* created with shadow_copy. -*/ -uint16_t ref_cnt; };/**
@@ -322,10 +309,8 @@ int tf_tcam_alloc(struct tf *tfp, struct tf_tcam_alloc_parms *parms);/** -* Free's the requested table type and returns it to the DB. If shadow -* DB is enabled its searched first and if found the element refcount -* is decremented. If refcount goes to 0 then its returned to the -* table type DB. +* Free's the requested table type and returns it to the DB. +* If refcount goes to 0 then its returned to the table type DB. * * [in] tfp * Pointer to TF handle, used for HCAPI communication
@@ -340,25 +325,6 @@ int tf_tcam_alloc(struct tf *tfp,int tf_tcam_free (struct tf *tfp,struct tf_tcam_free_parms *parms); -/** -* Supported if Shadow DB is configured. Searches the Shadow DB for -* any matching element. If found the refcount in the shadow DB is -* updated accordingly. If not found a new element is allocated and -* installed into the shadow DB. -* -* [in] tfp -* Pointer to TF handle, used for HCAPI communication -* -* [in] parms -* Pointer to parameters -* -* Returns -* - (0) if successful. -* - (-EINVAL) on failure. -*/ -int tf_tcam_alloc_search (struct tf *tfp, -struct tf_tcam_alloc_search_parms *parms); -/** * Configures the requested element by sending a firmware request which * then installs it into the device internal structures.
drivers/net/bnxt/tf_core/tf_util.c +0 -2
@@ -59,12 +59,10 @@ tf_tcam_tbl_2_str(enum tf_tcam_tbl_type tcam_type)return "sp_tcam" ;case TF_TCAM_TBL_TYPE_CT_RULE_TCAM :return "ct_rule_tcam" ; -#ifdef TF_TCAM_SHARED case TF_TCAM_TBL_TYPE_WC_TCAM_HIGH :return "wc_tcam_hi" ;case TF_TCAM_TBL_TYPE_WC_TCAM_LOW :return "wc_tcam_lo" ; -#endif default :return "Invalid tcam table type" ; }
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +0 -3
@@ -461,7 +461,6 @@ ulp_ctx_shared_session_open(struct bnxt *bp,return rc; } - parms.shadow_copy = true; parms.bp = bp;if (app_id ==0 ) parms.wc_num_slices =TF_WC_TCAM_2_SLICE_PER_ROW ;
@@ -550,8 +549,6 @@ ulp_ctx_session_open(struct bnxt *bp,return rc; } - params.shadow_copy = true; - rc =bnxt_ulp_cntxt_app_id_get (bp->ulp_ctx, &app_id);if (rc) {BNXT_TF_DBG (ERR ,"Unable to get the app id from ulp.\n" );
Signature · 1 line
2.25.1
PATCH v2 2/11 net/bnxt: update bnxt hsi structure
In reply to Randy SchacherSync hsi structure to latest revision
--- drivers/net/bnxt/hsi_struct_def_dpdk.h | 5723 +++++++++++++++++++++--- 1 file changed, 5128 insertions(+), 595 deletions(-)
drivers/net/bnxt/hsi_struct_def_dpdk.h +5128 -595
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright (c) 2014-2022 Broadcom Inc. +* Copyright (c) 2014-2023 Broadcom Inc. * All rights reserved. * * DO NOT MODIFY!!! This file is automatically generated.
@@ -442,6 +442,8 @@ struct cmd_nums {#define HWRM_PORT_DSC_DUMP UINT32_C(0xd9)#define HWRM_PORT_EP_TX_QCFG UINT32_C(0xda)#define HWRM_PORT_EP_TX_CFG UINT32_C(0xdb) +#define HWRM_PORT_CFG UINT32_C(0xdc) +#define HWRM_PORT_QCFG UINT32_C(0xdd)#define HWRM_TEMP_MONITOR_QUERY UINT32_C(0xe0)#define HWRM_REG_POWER_QUERY UINT32_C(0xe1)#define HWRM_CORE_FREQUENCY_QUERY UINT32_C(0xe2)
@@ -480,9 +482,7 @@ struct cmd_nums {#define HWRM_CFA_FLOW_FREE UINT32_C(0x104)/* Experimental */ #define HWRM_CFA_FLOW_FLUSH UINT32_C(0x105) -/* Experimental */ #define HWRM_CFA_FLOW_STATS UINT32_C(0x106) -/* Experimental */ #define HWRM_CFA_FLOW_INFO UINT32_C(0x107)/* Experimental */ #define HWRM_CFA_DECAP_FILTER_ALLOC UINT32_C(0x108)
@@ -678,6 +678,17 @@ struct cmd_nums {#define HWRM_FUNC_DBR_PACING_BROADCAST_EVENT UINT32_C(0x1a7)/* The is the new API to query backing store capabilities. */ #define HWRM_FUNC_BACKING_STORE_QCAPS_V2 UINT32_C(0x1a8) +/* To query doorbell pacing NQ id list configuration. */ +#define HWRM_FUNC_DBR_PACING_NQLIST_QUERY UINT32_C(0x1a9) +/* +* To notify the firmware that recovery cycle has been +* completed by host function drivers. +*/ +#define HWRM_FUNC_DBR_RECOVERY_COMPLETED UINT32_C(0x1aa) +/* Configures SyncE configurations. */ +#define HWRM_FUNC_SYNCE_CFG UINT32_C(0x1ab) +/* Queries SyncE configurations. */ +#define HWRM_FUNC_SYNCE_QCFG UINT32_C(0x1ac)/* Experimental */ #define HWRM_SELFTEST_QLIST UINT32_C(0x200)/* Experimental */
@@ -747,6 +758,8 @@ struct cmd_nums {* to run. */ #define HWRM_MFG_SELFTEST_EXEC UINT32_C(0x217) +/* Queries the generic stats */ +#define HWRM_STAT_GENERIC_QSTATS UINT32_C(0x218)/* Experimental */ #define HWRM_TF UINT32_C(0x2bc)/* Experimental */
@@ -774,6 +787,10 @@ struct cmd_nums {/* Experimental */ #define HWRM_TF_SESSION_RESC_INFO UINT32_C(0x2d0)/* Experimental */ +#define HWRM_TF_SESSION_HOTUP_STATE_SET UINT32_C(0x2d1) +/* Experimental */ +#define HWRM_TF_SESSION_HOTUP_STATE_GET UINT32_C(0x2d2) +/* Experimental */ #define HWRM_TF_TBL_TYPE_GET UINT32_C(0x2da)/* Experimental */ #define HWRM_TF_TBL_TYPE_SET UINT32_C(0x2db)
@@ -819,6 +836,54 @@ struct cmd_nums {#define HWRM_TF_IF_TBL_SET UINT32_C(0x2fe)/* Experimental */ #define HWRM_TF_IF_TBL_GET UINT32_C(0x2ff) +/* TruFlow command to check firmware table scope capabilities. */ +#define HWRM_TFC_TBL_SCOPE_QCAPS UINT32_C(0x380) +/* TruFlow command to allocate a table scope ID and create the pools. */ +#define HWRM_TFC_TBL_SCOPE_ID_ALLOC UINT32_C(0x381) +/* TruFlow command to configure the table scope memory. */ +#define HWRM_TFC_TBL_SCOPE_CONFIG UINT32_C(0x382) +/* TruFlow command to deconfigure a table scope memory. */ +#define HWRM_TFC_TBL_SCOPE_DECONFIG UINT32_C(0x383) +/* TruFlow command to add a FID to a table scope. */ +#define HWRM_TFC_TBL_SCOPE_FID_ADD UINT32_C(0x384) +/* TruFlow command to remove a FID from a table scope. */ +#define HWRM_TFC_TBL_SCOPE_FID_REM UINT32_C(0x385) +/* TruFlow command to allocate a table scope pool. */ +#define HWRM_TFC_TBL_SCOPE_POOL_ALLOC UINT32_C(0x386) +/* TruFlow command to free a table scope pool. */ +#define HWRM_TFC_TBL_SCOPE_POOL_FREE UINT32_C(0x387) +/* Experimental */ +#define HWRM_TFC_SESSION_ID_ALLOC UINT32_C(0x388) +/* Experimental */ +#define HWRM_TFC_SESSION_FID_ADD UINT32_C(0x389) +/* Experimental */ +#define HWRM_TFC_SESSION_FID_REM UINT32_C(0x38a) +/* Experimental */ +#define HWRM_TFC_IDENT_ALLOC UINT32_C(0x38b) +/* Experimental */ +#define HWRM_TFC_IDENT_FREE UINT32_C(0x38c) +/* TruFlow command to allocate an index table entry */ +#define HWRM_TFC_IDX_TBL_ALLOC UINT32_C(0x38d) +/* TruFlow command to allocate and set an index table entry */ +#define HWRM_TFC_IDX_TBL_ALLOC_SET UINT32_C(0x38e) +/* TruFlow command to set an index table entry */ +#define HWRM_TFC_IDX_TBL_SET UINT32_C(0x38f) +/* TruFlow command to get an index table entry */ +#define HWRM_TFC_IDX_TBL_GET UINT32_C(0x390) +/* TruFlow command to free an index table entry */ +#define HWRM_TFC_IDX_TBL_FREE UINT32_C(0x391) +/* TruFlow command to allocate resources for a global id. */ +#define HWRM_TFC_GLOBAL_ID_ALLOC UINT32_C(0x392) +/* TruFlow command to set TCAM entry. */ +#define HWRM_TFC_TCAM_SET UINT32_C(0x393) +/* TruFlow command to get TCAM entry. */ +#define HWRM_TFC_TCAM_GET UINT32_C(0x394) +/* TruFlow command to allocate a TCAM entry. */ +#define HWRM_TFC_TCAM_ALLOC UINT32_C(0x395) +/* TruFlow command allocate and set TCAM entry. */ +#define HWRM_TFC_TCAM_ALLOC_SET UINT32_C(0x396) +/* TruFlow command to free a TCAM entry. */ +#define HWRM_TFC_TCAM_FREE UINT32_C(0x397)/* Experimental */ #define HWRM_SV UINT32_C(0x400)/* Experimental */
@@ -1089,8 +1154,8 @@ struct hwrm_err_output {#define HWRM_VERSION_MINOR 10#define HWRM_VERSION_UPDATE 2/* non-zero means beta version */ -#define HWRM_VERSION_RSVD 83 -#define HWRM_VERSION_STR "1.10.2.83" +#define HWRM_VERSION_RSVD 138 +#define HWRM_VERSION_STR "1.10.2.138"/**************** * hwrm_ver_get *
@@ -1345,6 +1410,7 @@ struct hwrm_ver_get_output {* If set to 1, firmware is capable to support flow aging. * If set to 0, firmware is not capable to support flow aging. * By default, this flag should be 0 for older version of core firmware. +* (deprecated) */ #define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_FLOW_AGING_SUPPORTED \ UINT32_C(0x200)
@@ -1353,6 +1419,7 @@ struct hwrm_ver_get_output {* Meter drop counters and EEM counters. * If set to 0, firmware is not capable to support advanced flow counters. * By default, this flag should be 0 for older version of core firmware. +* (deprecated) */ #define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_ADV_FLOW_COUNTERS_SUPPORTED \ UINT32_C(0x400)
@@ -1362,6 +1429,7 @@ struct hwrm_ver_get_output {* If set to 0, firmware is not capable to support the use of the * CFA EEM feature. * By default, this flag should be 0 for older version of core firmware. +* (deprecated) */ #define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_EEM_SUPPORTED \ UINT32_C(0x800)
@@ -1996,7 +2064,7 @@ struct cfa_bds_event_collect_cmd_data_msg {uint64_t host_address; } __rte_packed; -/* ce_bds_add_data_msg (size:512b/64B) */ +/* ce_bds_add_data_msg (size:576b/72B) */ struct ce_bds_add_data_msg {uint32_t version_algorithm_kid_opcode;/*
@@ -2050,26 +2118,14 @@ struct ce_bds_add_data_msg { (UINT32_C(0x1) << 28)#define CE_BDS_ADD_DATA_MSG__LAST \ CE_BDS_ADD_DATA_MSG__TLS1_3 -uint8_t cmd_type_ctx_kind; -/* -* Command Type in the TLS header. HW will provide registers that -* converts the 3b encoded command type to 8b of actual command -* type in the TLS Header. This field is initialized/updated by -* this "KTLS crypto add" mid-path command. -*/ -#define CE_BDS_ADD_DATA_MSG_CMD_TYPE_MASK UINT32_C(0x7) -#define CE_BDS_ADD_DATA_MSG_CMD_TYPE_SFT 0 -/* Application */ -#define CE_BDS_ADD_DATA_MSG_CMD_TYPE_APP UINT32_C(0x0) -#define CE_BDS_ADD_DATA_MSG_CMD_TYPE_LAST \ - CE_BDS_ADD_DATA_MSG_CMD_TYPE_APP +uint8_t ctx_kind;/* This field selects the context kind for the request. */ -#define CE_BDS_ADD_DATA_MSG_CTX_KIND_MASK UINT32_C(0xf8) -#define CE_BDS_ADD_DATA_MSG_CTX_KIND_SFT 3 +#define CE_BDS_ADD_DATA_MSG_CTX_KIND_MASK UINT32_C(0x1f) +#define CE_BDS_ADD_DATA_MSG_CTX_KIND_SFT 0/* Crypto key transmit context */ -#define CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_TX (UINT32_C(0x11) << 3) +#define CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_TX UINT32_C(0x11)/* Crypto key receive context */ -#define CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_RX (UINT32_C(0x12) << 3) +#define CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_RX UINT32_C(0x12)#define CE_BDS_ADD_DATA_MSG_CTX_KIND_LAST \ CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_RXuint8_t unused0[3 ];
@@ -2083,8 +2139,8 @@ struct ce_bds_add_data_msg {* is zero padded to 12B and then xor'ed with the 4B of salt to generate * the 12B of IV. This value is initialized by this mid-path command. */ -uint32_t salt; -uint32_t unused1; +uint8_t salt[4 ]; +uint8_t unused1[4 ];/* * This field keeps track of the TCP sequence number that is expected as * the first byte in the next TCP packet. This field is calculated by HW
@@ -2111,16 +2167,21 @@ struct ce_bds_add_data_msg {* the field after that for every record processed as it parses the TCP * packet. */ -uint32_t record_seq_num[2 ]; +uint64_t record_seq_num;/* * Key used for encrypting or decrypting TLS records. The Key is * exchanged during the hand-shake protocol by the client-server and * provided to HW through this mid-path BD. */ -uint32_t session_key[8 ]; +uint8_t session_key[32 ]; +/* +* Additional IV that is exchanged as part of sessions setup between +* the two end points. This field is used for TLS1.3 only. +*/ +uint8_t addl_iv[8 ]; } __rte_packed; -/* ce_bds_delete_data_msg (size:64b/8B) */ +/* ce_bds_delete_data_msg (size:32b/4B) */ struct ce_bds_delete_data_msg {uint32_t kid_opcode_ctx_kind;/*
@@ -2160,7 +2221,6 @@ struct ce_bds_delete_data_msg {#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_QUIC_RX (UINT32_C(0x15) << 24)#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_LAST \ CE_BDS_DELETE_DATA_MSG_CTX_KIND_QUIC_RX -uint32_t unused0; } __rte_packed;/* ce_bds_resync_resp_ack_msg (size:128b/16B) */
@@ -2213,7 +2273,7 @@ struct ce_bds_resync_resp_ack_msg {* it has found since sending the resync request, update the context and * resume decrypting records. */ -uint32_t resync_record_seq_num[2 ]; +uint64_t resync_record_seq_num; } __rte_packed;/* ce_bds_resync_resp_nack_msg (size:64b/8B) */
@@ -2288,6 +2348,19 @@ struct crypto_presync_bd_cmd {*/ #define CRYPTO_PRESYNC_BD_CMD_FLAGS_UPDATE_IN_ORDER_VAR \ UINT32_C(0x1) +/* +* When packet with an authentication TAG is lost in the network, +* During retransmission Device driver will post the entire record for +* the hardware to recalculate the TAG. Hardware is set to retransmit +* only portions of the record, it does so by looking at the Header +* TCP Sequence Number and Start TCP Sequence Number. However, there +* is a case where the header packet gets dropped in the stack for ex +* BPF packet filter and it is impossible for the Hardware to +* determine if this is a case of full replay for only the TAG +* generation. +*/ +#define CRYPTO_PRESYNC_BD_CMD_FLAGS_FULL_REPLAY_RETRAN \ + UINT32_C(0x2)uint8_t unused0;uint16_t unused1;/*
@@ -2331,7 +2404,7 @@ struct crypto_presync_bd_cmd {* the first TLS header. When subsequent TLS Headers are detected, the * value is extracted from packet. */ -uint32_t explicit_nonce[2 ]; +uint8_t explicit_nonce[8 ];/* * This is sequence number for the TLS record in a particular session. In * TLS1.2, record sequence number is part of the Associated Data (AD) in
@@ -2343,7 +2416,110 @@ struct crypto_presync_bd_cmd {* delivering more retransmission instruction will also update this * field. */ -uint32_t record_seq_num[2 ]; +uint64_t record_seq_num; +} __rte_packed; + +/* ce_bds_quic_add_data_msg (size:832b/104B) */ +struct ce_bds_quic_add_data_msg { +uint32_t ver_algo_kid_opcode; +/* +* This value selects the operation for the mid-path command for the +* crypto blocks. +*/ +#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_MASK UINT32_C(0xf) +#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_SFT 0 +/* +* This is the add command. Using this opcode, Host Driver can add +* information required for QUIC processing. The information is +* updated in the CFCK context. +*/ +#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_ADD UINT32_C(0x1) +#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_LAST \ + CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_ADD +/* +* This field is the Crypto Context ID. The KID is used to store +* information used by the associated QUIC offloaded connection. +*/ +#define CE_BDS_QUIC_ADD_DATA_MSG_KID_MASK \ + UINT32_C(0xfffff0) +#define CE_BDS_QUIC_ADD_DATA_MSG_KID_SFT 4 +/* Algorithm used for encryption and decryption. */ +#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_MASK \ + UINT32_C(0xf000000) +#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_SFT 24 +/* AES_GCM_128 Algorithm. */ +#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_AES_GCM_128 \ + (UINT32_C(0x1) << 24) +/* AES_GCM_256 Algorithm. */ +#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_AES_GCM_256 \ + (UINT32_C(0x2) << 24) +/* Chacha20 Algorithm. */ +#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_CHACHA20 \ + (UINT32_C(0x3) << 24) +#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_LAST \ + CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_CHACHA20 +/* Version number of QUIC connection. */ +#define CE_BDS_QUIC_ADD_DATA_MSG_VERSION_MASK \ + UINT32_C(0xf0000000) +#define CE_BDS_QUIC_ADD_DATA_MSG_VERSION_SFT 28 +/* TLS1.2 Version */ +#define CE_BDS_QUIC_ADD_DATA_MSG__TLS1_2 \ + (UINT32_C(0x0) << 28) +/* TLS1.3 Version */ +#define CE_BDS_QUIC_ADD_DATA_MSG__TLS1_3 \ + (UINT32_C(0x1) << 28) +/* DTLS1.2 Version */ +#define CE_BDS_QUIC_ADD_DATA_MSG__DTLS1_2 \ + (UINT32_C(0x2) << 28) +/* DTLS1.2 for RoCE Version */ +#define CE_BDS_QUIC_ADD_DATA_MSG__DTLS1_2_ROCE \ + (UINT32_C(0x3) << 28) +/* QUIC Version */ +#define CE_BDS_QUIC_ADD_DATA_MSG__QUIC \ + (UINT32_C(0x4) << 28) +#define CE_BDS_QUIC_ADD_DATA_MSG__LAST \ + CE_BDS_QUIC_ADD_DATA_MSG__QUIC +uint32_t ctx_kind_dcid_width_key_phase; +/* Key phase. */ +#define CE_BDS_QUIC_ADD_DATA_MSG_KEY_PHASE UINT32_C(0x1) +/* Destination connection ID width. */ +#define CE_BDS_QUIC_ADD_DATA_MSG_DCID_WIDTH_MASK UINT32_C(0x3e) +#define CE_BDS_QUIC_ADD_DATA_MSG_DCID_WIDTH_SFT 1 +/* This field selects the context kind for the request. */ +#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_MASK UINT32_C(0x7c0) +#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_SFT 6 +/* QUIC key transmit context */ +#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_QUIC_TX \ + (UINT32_C(0x14) << 6) +/* QUIC key receive context */ +#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_QUIC_RX \ + (UINT32_C(0x15) << 6) +#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_LAST \ + CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_QUIC_RX +uint32_t unused_0[2 ]; +/* +* Least-significant 64 bits (of 96) of additional IV that is +* exchanged as part of sessions setup between the two end +* points for QUIC operations. +*/ +uint64_t quic_iv_lo; +/* +* Most-significant 32 bits (of 96) of additional IV that is +* exchanged as part of sessions setup between the two end +* points for QUIC operations. +*/ +uint32_t quic_iv_hi; +uint32_t unused_1; +/* +* Key used for encrypting or decrypting records. The Key is exchanged +* as part of sessions setup between the two end points through this +* mid-path BD. +*/ +uint32_t session_key[8 ]; +/* Header protection key. */ +uint32_t hp_key[8 ]; +/* Packet number associated with the QUIC connection. */ +uint64_t pkt_number; } __rte_packed;/* bd_base (size:64b/8B) */
@@ -3665,7 +3841,7 @@ struct cfa_dma128b_data_msg {/* ce_cmpls_cmp_data_msg (size:128b/16B) */ struct ce_cmpls_cmp_data_msg { -uint16_t status_subtype_type; +uint16_t client_subtype_type;/* * This field indicates the exact type of the completion. By * convention, the LSB identifies the length of the record in 16B
@@ -3678,82 +3854,82 @@ struct ce_cmpls_cmp_data_msg {#define CE_CMPLS_CMP_DATA_MSG_TYPE_MID_PATH_SHORT UINT32_C(0x1e)#define CE_CMPLS_CMP_DATA_MSG_TYPE_LAST \ CE_CMPLS_CMP_DATA_MSG_TYPE_MID_PATH_SHORT +#define CE_CMPLS_CMP_DATA_MSG_UNUSED0_MASK UINT32_C(0xc0) +#define CE_CMPLS_CMP_DATA_MSG_UNUSED0_SFT 6/* * This value indicates the CE sub-type operation that is being * completed. */ -#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_MASK UINT32_C(0x3c0) -#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_SFT 6 +#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_MASK UINT32_C(0xf00) +#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_SFT 8/* Completion Response for a Solicited Command. */ -#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_SOLICITED (UINT32_C(0x0) << 6) +#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_SOLICITED (UINT32_C(0x0) << 8)/* Error Completion (Unsolicited). */ -#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_ERR (UINT32_C(0x1) << 6) +#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_ERR (UINT32_C(0x1) << 8)/* Re-Sync Completion (Unsolicited) */ -#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_RESYNC (UINT32_C(0x2) << 6) +#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_RESYNC (UINT32_C(0x2) << 8)#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_LAST \ CE_CMPLS_CMP_DATA_MSG_SUBTYPE_RESYNC +/* +* This field represents the Mid-Path client that generated the +* completion. +*/ +#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_MASK UINT32_C(0xf000) +#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_SFT 12 +/* TX crypto engine block. */ +#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_TCE \ + (UINT32_C(0x0) << 12) +/* RX crypto engine block. */ +#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_RCE \ + (UINT32_C(0x1) << 12) +#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_LAST \ + CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_RCE +uint16_t status;/* This value indicates the status for the command. */ -#define CE_CMPLS_CMP_DATA_MSG_STATUS_MASK UINT32_C(0x3c00) -#define CE_CMPLS_CMP_DATA_MSG_STATUS_SFT 10 +#define CE_CMPLS_CMP_DATA_MSG_STATUS_MASK UINT32_C(0xf) +#define CE_CMPLS_CMP_DATA_MSG_STATUS_SFT 0/* Completed without error. */ -#define CE_CMPLS_CMP_DATA_MSG_STATUS_OK \ - (UINT32_C(0x0) << 10) +#define CE_CMPLS_CMP_DATA_MSG_STATUS_OK UINT32_C(0x0)/* CFCK load error. */ -#define CE_CMPLS_CMP_DATA_MSG_STATUS_CTX_LD_ERR \ - (UINT32_C(0x1) << 10) +#define CE_CMPLS_CMP_DATA_MSG_STATUS_CTX_LD_ERR UINT32_C(0x1)/* FID check error. */ -#define CE_CMPLS_CMP_DATA_MSG_STATUS_FID_CHK_ERR \ - (UINT32_C(0x2) << 10) +#define CE_CMPLS_CMP_DATA_MSG_STATUS_FID_CHK_ERR UINT32_C(0x2)/* Context kind / MP version mismatch error. */ -#define CE_CMPLS_CMP_DATA_MSG_STATUS_CTX_VER_ERR \ - (UINT32_C(0x3) << 10) +#define CE_CMPLS_CMP_DATA_MSG_STATUS_CTX_VER_ERR UINT32_C(0x3)/* Unsupported Destination Connection ID Length. */ -#define CE_CMPLS_CMP_DATA_MSG_STATUS_DST_ID_ERR \ - (UINT32_C(0x4) << 10) +#define CE_CMPLS_CMP_DATA_MSG_STATUS_DST_ID_ERR UINT32_C(0x4)/* * Invalid MP Command [anything other than ADD or DELETE * triggers this for QUIC]. */ -#define CE_CMPLS_CMP_DATA_MSG_STATUS_MP_CMD_ERR \ - (UINT32_C(0x5) << 10) +#define CE_CMPLS_CMP_DATA_MSG_STATUS_MP_CMD_ERR UINT32_C(0x5)#define CE_CMPLS_CMP_DATA_MSG_STATUS_LAST \ CE_CMPLS_CMP_DATA_MSG_STATUS_MP_CMD_ERR -uint8_t unused0; -uint8_t mp_clients; -#define CE_CMPLS_CMP_DATA_MSG_UNUSED1_MASK UINT32_C(0xf) -#define CE_CMPLS_CMP_DATA_MSG_UNUSED1_SFT 0 -/* -* This field represents the Mid-Path client that generated the -* completion. -*/ -#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENTS_MASK UINT32_C(0xf0) -#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENTS_SFT 4 -/* TX crypto engine block. */ -#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENTS_TCE (UINT32_C(0x0) << 4) -/* RX crypto engine block. */ -#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENTS_RCE (UINT32_C(0x1) << 4) -#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENTS_LAST \ - CE_CMPLS_CMP_DATA_MSG_MP_CLIENTS_RCE +#define CE_CMPLS_CMP_DATA_MSG_UNUSED1_MASK UINT32_C(0xfff0) +#define CE_CMPLS_CMP_DATA_MSG_UNUSED1_SFT 4/* * This is a copy of the opaque field from the mid path BD of this * command. */ uint32_t opaque; -/* */ -uint32_t kid_v; +uint32_t v;/* * This value is written by the NIC such that it will be different * for each pass through the completion queue. The even passes will * write 1. The odd passes will write 0. */ -#define CE_CMPLS_CMP_DATA_MSG_V UINT32_C(0x1) +#define CE_CMPLS_CMP_DATA_MSG_V UINT32_C(0x1) +#define CE_CMPLS_CMP_DATA_MSG_UNUSED2_MASK UINT32_C(0xfffffffe) +#define CE_CMPLS_CMP_DATA_MSG_UNUSED2_SFT 1 +uint32_t kid;/* * This field is the Crypto Context ID. The KID is used to store * information used by the associated kTLS offloaded connection. */ -#define CE_CMPLS_CMP_DATA_MSG_KID_MASK UINT32_C(0x1ffffe) -#define CE_CMPLS_CMP_DATA_MSG_KID_SFT 1 -uint32_t unused2; +#define CE_CMPLS_CMP_DATA_MSG_KID_MASK UINT32_C(0xfffff) +#define CE_CMPLS_CMP_DATA_MSG_KID_SFT 0 +#define CE_CMPLS_CMP_DATA_MSG_UNUSED3_MASK UINT32_C(0xfff00000) +#define CE_CMPLS_CMP_DATA_MSG_UNUSED3_SFT 20 } __rte_packed;/* cmpl_base (size:128b/16B) */
@@ -3783,16 +3959,11 @@ struct cmpl_base {* Completion of coalesced TX packet. Length = 16B */ #define CMPL_BASE_TYPE_TX_L2_COAL UINT32_C(0x2) -/* -* TX L2 PTP completion: -* Completion of PTP TX packet. Length = 32B -*/ -#define CMPL_BASE_TYPE_TX_L2_PTP UINT32_C(0x3)/* * TX L2 Packet Timestamp completion: * Completion of an L2 Packet Timestamp Packet. Length = 16B */ -#define CMPL_BASE_TYPE_TX_L2_PTP_TS UINT32_C(0x4) +#define CMPL_BASE_TYPE_TX_L2_PKT_TS UINT32_C(0x4)/* * RX L2 TPA Start V2 Completion: * Completion of and L2 RX packet. Length = 32B
@@ -4173,47 +4344,79 @@ struct tx_cmpl_coal {#define TX_CMPL_COAL_SQ_CONS_IDX_SFT 0 } __rte_packed; -/* tx_cmpl_ptp (size:128b/16B) */ -struct tx_cmpl_ptp { -uint16_t flags_type; +/* tx_cmpl_packet_timestamp (size:128b/16B) */ +struct tx_cmpl_packet_timestamp { +uint16_t ts_sub_ns_flags_type;/* -* This field indicates the exact type of the completion. -* By convention, the LSB identifies the length of the -* record in 16B units. Even values indicate 16B -* records. Odd values indicate 32B -* records. +* This field indicates the exact type of the completion. By +* convention, the LSB identifies the length of the record in 16B +* units. Even values indicate 16B records. Odd values indicate +* 32B records. */ -#define TX_CMPL_PTP_TYPE_MASK UINT32_C(0x3f) -#define TX_CMPL_PTP_TYPE_SFT 0 +#define TX_CMPL_PACKET_TIMESTAMP_TYPE_MASK UINT32_C(0x3f) +#define TX_CMPL_PACKET_TIMESTAMP_TYPE_SFT 0/* -* TX L2 PTP completion: -* Completion of TX packet. Length = 32B +* TX L2 Packet Timestamp completion: +* Completion of an L2 Packet Timestamp Packet. Length = 16B */ -#define TX_CMPL_PTP_TYPE_TX_L2_PTP UINT32_C(0x2) -#define TX_CMPL_PTP_TYPE_LAST TX_CMPL_PTP_TYPE_TX_L2_PTP -#define TX_CMPL_PTP_FLAGS_MASK UINT32_C(0xffc0) -#define TX_CMPL_PTP_FLAGS_SFT 6 +#define TX_CMPL_PACKET_TIMESTAMP_TYPE_TX_L2_PKT_TS UINT32_C(0x4) +#define TX_CMPL_PACKET_TIMESTAMP_TYPE_LAST \ + TX_CMPL_PACKET_TIMESTAMP_TYPE_TX_L2_PKT_TS +#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_MASK UINT32_C(0xfc0) +#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_SFT 6/* -* When this bit is '1', it indicates a packet that has an -* error of some type. Type of error is indicated in -* error_flags. +* When this bit is '1', it indicates a packet that has an error +* of some type. Type of error is indicated in error_flags. */ -#define TX_CMPL_PTP_FLAGS_ERROR UINT32_C(0x40) +#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_ERROR UINT32_C(0x40)/* -* When this bit is '1', it indicates that the packet completed -* was transmitted using the push acceleration data provided -* by the driver. When this bit is '0', it indicates that the -* packet had not push acceleration data written or was executed -* as a normal packet even though push data was provided. +* This field indicates the TX packet timestamp type that is +* represented by a TX Packet Timestamp Completion. Note that +* this field is invalid if the timestamp_invalid_error flag +* is set. */ -#define TX_CMPL_PTP_FLAGS_PUSH UINT32_C(0x80) -/* unused1 is 16 b */ -uint16_t unused_0; +#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE UINT32_C(0x80) +/* The packet timestamp came from PM. */ +#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_TS_PM \ + (UINT32_C(0x0) << 7) +/* The packet timestamp came from PA. */ +#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_TS_PA \ + (UINT32_C(0x1) << 7) +#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_LAST \ + TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_TS_PA +/* +* This flag indicates that the timestamp should have come from PM, +* but came instead from PA because all PM timestamp resources were +* in use. This can occur in the following circumstances: +* 1. The BD specified ts_2cmpl_auto and the packet was a PTP packet +* but PA could not request a PM timestamp +* 2. The BD specified ts_2cmpl_pm, but PA could not request a PM +* timestamp +*/ +#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_FALLBACK UINT32_C(0x100) +/* +* For 2-step PTP timestamps, bits[3:0] of this field represent the +* sub-nanosecond portion of the packet timestamp, returned from PM +* for 2-step PTP timestamps. For PA timestamps, this field also +* represents the sub-nanosecond portion of the packet timestamp; +* however, due to synchronization uncertainties, the accuracy of +* PA timestamps is limited to approximately +/- 4 ns. Therefore +* this field is of dubious value for PA timestamps. +*/ +#define TX_CMPL_PACKET_TIMESTAMP_TS_SUB_NS_MASK UINT32_C(0xf000) +#define TX_CMPL_PACKET_TIMESTAMP_TS_SUB_NS_SFT 12 +/* +* This is bits [47:32] of the nanoseconds portion of the packet +* timestamp, returned from PM for 2-step PTP timestamps or from +* PA for PA timestamps. This field is in units of 2^32 ns. +*/ +uint16_t ts_ns_mid;/* * This is a copy of the opaque field from the first TX BD of this -* transmitted packet. Note that, if the packet was described by a short -* CSO or short CSO inline BD, then the 16-bit opaque field from the -* short CSO BD will appear in the bottom 16 bits of this field. +* transmitted packet. Note that, if the packet was described by a +* short CSO or short CSO inline BD, then the 16-bit opaque field +* from the short CSO BD will appear in the bottom 16 bits of this +* field. */ uint32_t opaque;uint16_t errors_v;
@@ -4222,95 +4425,103 @@ struct tx_cmpl_ptp {* for each pass through the completion queue. The even passes * will write 1. The odd passes will write 0. */ -#define TX_CMPL_PTP_V UINT32_C(0x1) -#define TX_CMPL_PTP_ERRORS_MASK UINT32_C(0xfffe) -#define TX_CMPL_PTP_ERRORS_SFT 1 +#define TX_CMPL_PACKET_TIMESTAMP_V \ + UINT32_C(0x1) +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_MASK \ + UINT32_C(0xfffe) +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_SFT 1/* -* This error indicates that there was some sort of problem -* with the BDs for the packet. +* This field was previously used to indicate fatal errors, which +* now result in aborting and bringing down the ring. This field +* is deprecated. */ -#define TX_CMPL_PTP_ERRORS_BUFFER_ERROR_MASK UINT32_C(0xe) -#define TX_CMPL_PTP_ERRORS_BUFFER_ERROR_SFT 1 -/* No error */ -#define TX_CMPL_PTP_ERRORS_BUFFER_ERROR_NO_ERROR \ +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_MASK \ + UINT32_C(0xe) +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_SFT 1 +/* No error. */ +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_NO_ERROR \ (UINT32_C(0x0) << 1) -/* -* Bad Format: -* BDs were not formatted correctly. -*/ -#define TX_CMPL_PTP_ERRORS_BUFFER_ERROR_BAD_FMT \ +/* Deprecated. */ +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_BAD_FMT \ (UINT32_C(0x2) << 1) -#define TX_CMPL_PTP_ERRORS_BUFFER_ERROR_LAST \ - TX_CMPL_PTP_ERRORS_BUFFER_ERROR_BAD_FMT +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_LAST \ + TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_BAD_FMT/* -* When this bit is '1', it indicates that the length of -* the packet was zero. No packet was transmitted. +* This error is fatal and results in aborting and bringing down the +* ring, thus is deprecated. */ -#define TX_CMPL_PTP_ERRORS_ZERO_LENGTH_PKT UINT32_C(0x10) -/* -* When this bit is '1', it indicates that the packet -* was longer than the programmed limit in TDI. No -* packet was transmitted. -*/ -#define TX_CMPL_PTP_ERRORS_EXCESSIVE_BD_LENGTH UINT32_C(0x20) +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_ZERO_LENGTH_PKT \ + UINT32_C(0x10)/* -* When this bit is '1', it indicates that one or more of the -* BDs associated with this packet generated a PCI error. -* This probably means the address was not valid. +* This error is fatal and results in aborting and bringing down the +* ring, thus is deprecated. */ -#define TX_CMPL_PTP_ERRORS_DMA_ERROR UINT32_C(0x40) +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_EXCESSIVE_BD_LENGTH \ + UINT32_C(0x20)/* -* When this bit is '1', it indicates that the packet was longer -* than indicated by the hint. No packet was transmitted. +* When this bit is '1', it indicates that one or more of the BDs +* associated with this packet generated a PCI error when accessing +* header/payload data from host memory. It most likely indicates +* that the address was not valid. Note that this bit has no meaning +* for the timestamp completion and will always be '0'. */ -#define TX_CMPL_PTP_ERRORS_HINT_TOO_SHORT UINT32_C(0x80) +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_DMA_ERROR \ + UINT32_C(0x40)/* -* When this bit is '1', it indicates that the packet was -* dropped due to Poison TLP error on one or more of the -* TLPs in the PXP completion. +* This error is fatal and results in aborting and bringing down the +* ring, thus is deprecated. */ -#define TX_CMPL_PTP_ERRORS_POISON_TLP_ERROR UINT32_C(0x100) +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_HINT_TOO_SHORT \ + UINT32_C(0x80)/* -* When this bit is '1', it indicates that the packet was dropped due -* to a transient internal error in TDC. The packet or LSO can be -* retried and may transmit successfully on a subsequent attempt. +* When this bit is '1', it indicates that the packet was dropped +* due to Poison TLP error on one or more of the TLPs in one or more +* of the associated PXP completion(s) when accessing header/payload +* data from host memory. Note that this bit has no meaning for the +* timestamp completion, and will always be '0'. */ -#define TX_CMPL_PTP_ERRORS_INTERNAL_ERROR UINT32_C(0x200) +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_POISON_TLP_ERROR \ + UINT32_C(0x100)/* -* When this bit is '1', it was not possible to collect a a timestamp -* for a PTP completion, in which case the timestamp_hi and -* timestamp_lo fields are invalid. When this bit is '0' for a PTP -* completion, the timestamp_hi and timestamp_lo fields are valid. -* RJRN will copy the value of this bit into the field of the same -* name in all TX completions, regardless of whether such -* completions are PTP completions or other TX completions. +* When this bit is '1', it indicates that the packet was dropped +* due to a transient internal error in TDC. The packet or LSO can +* be retried and may transmit successfully on a subsequent attempt. +* Note that this bit has no meaning for the timestamp completion +* and will always be '0'. */ -#define TX_CMPL_PTP_ERRORS_TIMESTAMP_INVALID_ERROR UINT32_C(0x400) -/* unused2 is 16 b */ -uint16_t unused_1; +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_INTERNAL_ERROR \ + UINT32_C(0x200)/* -* This is timestamp value (lower 32bits) read from PM for the PTP -* timestamp enabled packet. -*/ -uint32_t timestamp_lo; -} __rte_packed; - -/* tx_cmpl_ptp_hi (size:128b/16B) */ -struct tx_cmpl_ptp_hi { +* When this bit is '1', it was not possible to collect a timestamp +* for a timestamp completion, in which case the ts_ns and ts_sub_ns +* fields are invalid. When this bit is '0' in a timestamp +* completion record, the ts_sub_ns, ts_ns_lo, and ts_ns_mid fields +* are valid. Note that this bit has meaning only for the timestamp +* completion. For types other than the timestamp completion, this +* bit will always be '0'. +*/ +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_TIMESTAMP_INVALID_ERROR \ + UINT32_C(0x400)/* -* This is timestamp value (lower 32bits) read from PM for the PTP -* timestamp enabled packet. +* When this bit is '1', it indicates that a Timed Transmit +* SO-TXTIME packet violated the max_ttx_overtime constraint i.e., +* the time the packet was processed for transmission in TWE was +* later than the time given by (TimedTx_BD.tx_time + +* max_ttx_overtime) and as result, the packet was dropped. +* Note that max_ttx_overtime is a global configuration in TWE. +* Note that this bit has no meaning in a timestamp completion, +* and will always be '0'. */ -uint16_t timestamp_hi[3 ]; -uint16_t reserved16; -uint64_t v2; +#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_TTX_OVERTIME_ERROR \ + UINT32_C(0x800) +/* unused2 is 16 b */ +uint16_t unused_2;/* -* This value is written by the NIC such that it will be different for -* each pass through the completion queue. -* The even passes will write 1. -* The odd passes will write 0. +* This is bits [31:0] of the nanoseconds portion of the packet +* timestamp, returned from PM for 2-step PTP timestamp or from +* PA for PA timestamps. This field is in units of ns. */ -#define TX_CMPL_PTP_HI_V2 UINT32_C(0x1) +uint32_t ts_ns_lo; } __rte_packed;/* rx_pkt_cmpl (size:128b/16B) */
@@ -9314,9 +9525,31 @@ struct hwrm_async_event_cmpl {*/ #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DOORBELL_PACING_THRESHOLD \ UINT32_C(0x46) +/* +* An event from firmware indicating that the RSS capabilities have +* changed. +*/ +#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RSS_CHANGE \ + UINT32_C(0x47) +/* +* An event from firmware indicating that list of nq ids used for +* doorbell pacing DBQ event notification has been updated. The driver +* needs to take appropriate action and retrieve the new list when this +* event is received from the firmware. +*/ +#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DOORBELL_PACING_NQ_UPDATE \ + UINT32_C(0x48) +/* +* An event from firmware indicating that hardware ran into an error +* while trying to read the host based doorbell copy region. The driver +* needs to take the appropriate action and maintain the corresponding +* doorbell copy region. +*/ +#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HW_DOORBELL_RECOVERY_READ_ERROR \ + UINT32_C(0x49)/* Maximum Registrable event id. */ #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_MAX_RGTR_EVENT_ID \ - UINT32_C(0x47) + UINT32_C(0x4a)/* * A trace log message. This contains firmware trace logs string * embedded in the asynchronous message. This is an experimental
@@ -11828,6 +12061,195 @@ struct hwrm_async_event_cmpl_doorbell_pacing_threshold {uint32_t event_data1; } __rte_packed; +/* hwrm_async_event_cmpl_rss_change (size:128b/16B) */ +struct hwrm_async_event_cmpl_rss_change { +uint16_t type; +/* +* This field indicates the exact type of the completion. +* By convention, the LSB identifies the length of the +* record in 16B units. Even values indicate 16B +* records. Odd values indicate 32B +* records. +*/ +#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_MASK \ + UINT32_C(0x3f) +#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_SFT 0 +/* HWRM Asynchronous Event Information */ +#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_HWRM_ASYNC_EVENT \ + UINT32_C(0x2e) +#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_LAST \ + HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_HWRM_ASYNC_EVENT +/* Identifiers of events. */ +uint16_t event_id; +/* +* This async notification message is used to inform the driver +* that the RSS capabilities have changed. The driver will need +* to query hwrm_vnic_qcaps. +*/ +#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_EVENT_ID_RSS_CHANGE \ + UINT32_C(0x47) +#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_EVENT_ID_LAST \ + HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_EVENT_ID_RSS_CHANGE +/* Event specific data. */ +uint32_t event_data2; +uint8_t opaque_v; +/* +* This value is written by the NIC such that it will be different +* for each pass through the completion queue. The even passes +* will write 1. The odd passes will write 0. +*/ +#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_V UINT32_C(0x1) +/* opaque is 7 b */ +#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_OPAQUE_MASK UINT32_C(0xfe) +#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_OPAQUE_SFT 1 +/* 8-lsb timestamp (100-msec resolution) */ +uint8_t timestamp_lo; +/* 16-lsb timestamp (100-msec resolution) */ +uint16_t timestamp_hi; +/* Event specific data */ +uint32_t event_data1; +} __rte_packed; + +/* hwrm_async_event_cmpl_doorbell_pacing_nq_update (size:128b/16B) */ +struct hwrm_async_event_cmpl_doorbell_pacing_nq_update { +uint16_t type; +/* +* This field indicates the exact type of the completion. +* By convention, the LSB identifies the length of the +* record in 16B units. Even values indicate 16B +* records. Odd values indicate 32B +* records. +*/ +#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_MASK \ + UINT32_C(0x3f) +#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_SFT \ + 0 +/* HWRM Asynchronous Event Information */ +#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_HWRM_ASYNC_EVENT \ + UINT32_C(0x2e) +#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_LAST \ + HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_HWRM_ASYNC_EVENT +/* Identifiers of events. */ +uint16_t event_id; +/* +* An event from firmware indicating that list of nq ids used for +* doorbell pacing DBQ event notification has been updated. The driver +* needs to take appropriate action and retrieve the new list when this +* event is received from the firmware. +*/ +#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_EVENT_ID_DOORBELL_PACING_NQ_UPDATE \ + UINT32_C(0x48) +#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_EVENT_ID_LAST \ + HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_EVENT_ID_DOORBELL_PACING_NQ_UPDATE +/* Event specific data. */ +uint32_t event_data2; +uint8_t opaque_v; +/* +* This value is written by the NIC such that it will be different +* for each pass through the completion queue. The even passes +* will write 1. The odd passes will write 0. +*/ +#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_V \ + UINT32_C(0x1) +/* opaque is 7 b */ +#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_OPAQUE_MASK \ + UINT32_C(0xfe) +#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_OPAQUE_SFT 1 +/* 8-lsb timestamp (100-msec resolution) */ +uint8_t timestamp_lo; +/* 16-lsb timestamp (100-msec resolution) */ +uint16_t timestamp_hi; +/* Event specific data */ +uint32_t event_data1; +} __rte_packed; + +/* hwrm_async_event_cmpl_hw_doorbell_recovery_read_error (size:128b/16B) */ +struct hwrm_async_event_cmpl_hw_doorbell_recovery_read_error { +uint16_t type; +/* +* This field indicates the exact type of the completion. +* By convention, the LSB identifies the length of the +* record in 16B units. Even values indicate 16B +* records. Odd values indicate 32B +* records. +*/ +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_MASK \ + UINT32_C(0x3f) +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_SFT \ + 0 +/* HWRM Asynchronous Event Information */ +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_HWRM_ASYNC_EVENT \ + UINT32_C(0x2e) +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_LAST \ + HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_HWRM_ASYNC_EVENT +/* Identifiers of events. */ +uint16_t event_id; +/* +* This async notification message is used to inform the driver +* that hardware ran into an error while trying to read the host +* based doorbell copy region. The driver will take the appropriate +* action to maintain the corresponding functions doorbell copy +* region in the correct format. +*/ +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_ID_HW_DOORBELL_RECOVERY_READ_ERROR \ + UINT32_C(0x49) +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_ID_LAST \ + HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_ID_HW_DOORBELL_RECOVERY_READ_ERROR +/* Event specific data. */ +uint32_t event_data2; +uint8_t opaque_v; +/* +* This value is written by the NIC such that it will be different +* for each pass through the completion queue. The even passes +* will write 1. The odd passes will write 0. +*/ +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_V \ + UINT32_C(0x1) +/* opaque is 7 b */ +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_OPAQUE_MASK \ + UINT32_C(0xfe) +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_OPAQUE_SFT \ + 1 +/* 8-lsb timestamp (100-msec resolution) */ +uint8_t timestamp_lo; +/* 16-lsb timestamp (100-msec resolution) */ +uint16_t timestamp_hi; +/* Event specific data */ +uint32_t event_data1; +/* +* Indicates that there is an error while reading the doorbell copy +* regions. +*/ +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_MASK \ + UINT32_C(0xf) +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_SFT \ + 0 +/* +* If set to 1, indicates that there is an error while reading the +* SQ doorbell copy region for this function. +*/ +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_SQ_ERR \ + UINT32_C(0x1) +/* +* If set to 1, indicates that there is an error while reading the +* RQ doorbell copy region for this function. +*/ +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_RQ_ERR \ + UINT32_C(0x2) +/* +* If set to 1, indicates that there is an error while reading the +* SRQ doorbell copy region for this function. +*/ +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_SRQ_ERR \ + UINT32_C(0x4) +/* +* If set to 1, indicates that there is an error while reading the +* CQ doorbell copy region for this function. +*/ +#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_CQ_ERR \ + UINT32_C(0x8) +} __rte_packed; +/* hwrm_async_event_cmpl_fw_trace_msg (size:128b/16B) */ struct hwrm_async_event_cmpl_fw_trace_msg {uint16_t type;
@@ -12385,6 +12807,14 @@ struct hwrm_async_event_cmpl_error_report_doorbell_drop_threshold { UINT32_C(0x4)#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_LAST \ HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_DOORBELL_DROP_THRESHOLD +/* +* The epoch value to be sent from firmware to the driver to track +* a doorbell recovery cycle. +*/ +#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_EPOCH_MASK \ + UINT32_C(0xffffff00) +#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_EPOCH_SFT \ + 8 } __rte_packed;/* hwrm_async_event_cmpl_error_report_thermal (size:128b/16B) */
@@ -12516,8 +12946,8 @@ struct metadata_base_msg {#define METADATA_BASE_MSG_MD_TYPE_NONE UINT32_C(0x0)/* * This setting is used when packets are coming in-order. Depending on -* the state of the receive context, the meta-data will carry different -* information. +* the state of the receive context, the meta-data will carry +* different information. */ #define METADATA_BASE_MSG_MD_TYPE_TLS_INSYNC UINT32_C(0x1)/*
@@ -12525,12 +12955,21 @@ struct metadata_base_msg {* record that it is requesting a resync on in the meta data. */ #define METADATA_BASE_MSG_MD_TYPE_TLS_RESYNC UINT32_C(0x2) +/* This setting is used for QUIC packets. */ +#define METADATA_BASE_MSG_MD_TYPE_QUIC UINT32_C(0x3) +/* +* This setting is used for crypto packets with an unsupported +* protocol. +*/ +#define METADATA_BASE_MSG_MD_TYPE_ILLEGAL UINT32_C(0x1f)#define METADATA_BASE_MSG_MD_TYPE_LAST \ - METADATA_BASE_MSG_MD_TYPE_TLS_RESYNC + METADATA_BASE_MSG_MD_TYPE_ILLEGAL/* -* This field indicates where the next metadata block starts. It is -* counted in 16B units. A value of zero indicates that there is no -* metadata. +* This field indicates where the next metadata block starts, relative +* to the current metadata block. It is the offset to the next metadata +* header, counted in 16B units. A value of zero indicates that there is +* no additional metadata, and that the current metadata block is the +* last one. */ #define METADATA_BASE_MSG_LINK_MASK UINT32_C(0x1e0)#define METADATA_BASE_MSG_LINK_SFT 5
@@ -12544,11 +12983,12 @@ struct tls_metadata_base_msg {/* This field classifies the data present in the meta-data. */ #define TLS_METADATA_BASE_MSG_MD_TYPE_MASK \ UINT32_C(0x1f) -#define TLS_METADATA_BASE_MSG_MD_TYPE_SFT 0 +#define TLS_METADATA_BASE_MSG_MD_TYPE_SFT \ + 0/* -* This setting is used when packets are coming in-order. Depending on -* the state of the receive context, the meta-data will carry different -* information. +* This setting is used when packets are coming in-order. Depending +* on the state of the receive context, the meta-data will carry +* different information. */ #define TLS_METADATA_BASE_MSG_MD_TYPE_TLS_INSYNC \ UINT32_C(0x1)
@@ -12567,11 +13007,13 @@ struct tls_metadata_base_msg {*/ #define TLS_METADATA_BASE_MSG_LINK_MASK \ UINT32_C(0x1e0) -#define TLS_METADATA_BASE_MSG_LINK_SFT 5 +#define TLS_METADATA_BASE_MSG_LINK_SFT \ + 5/* These are flags present in the metadata. */ #define TLS_METADATA_BASE_MSG_FLAGS_MASK \ UINT32_C(0x1fffe00) -#define TLS_METADATA_BASE_MSG_FLAGS_SFT 9 +#define TLS_METADATA_BASE_MSG_FLAGS_SFT \ + 9/* * A value of 1 implies that the packet was decrypted by HW. Otherwise * the packet is passed on as it came in on the wire.
@@ -12584,7 +13026,8 @@ struct tls_metadata_base_msg {*/ #define TLS_METADATA_BASE_MSG_FLAGS_GHASH_MASK \ UINT32_C(0xc00) -#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_SFT 10 +#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_SFT \ + 10/* * This enumeration states that the ghash is not valid in the * meta-data.
@@ -12610,12 +13053,13 @@ struct tls_metadata_base_msg {/* This field indicates the status of tag authentication. */ #define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_MASK \ UINT32_C(0x3000) -#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_SFT 12 +#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_SFT \ + 12/* -* This enumeration is set when there is no tags present in the -* packet. +* This enumeration is set when HW was not able to authenticate a +* TAG. */ -#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_NONE \ +#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED \ (UINT32_C(0x0) << 12)/* * This enumeration states that there is at least one tag in the
@@ -12638,13 +13082,61 @@ struct tls_metadata_base_msg {*/ #define TLS_METADATA_BASE_MSG_FLAGS_HEADER_FLDS_VALID \ UINT32_C(0x4000) +/* +* A value of 1 indicates that the packet experienced a context load +* error. In this case, the packet is sent to the host without the +* header or payload decrypted and the context is not updated. +*/ +#define TLS_METADATA_BASE_MSG_FLAGS_CTX_LOAD_ERR \ + UINT32_C(0x8000) +/* This field indicates the packet operation state. */ +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_MASK \ + UINT32_C(0x70000) +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_SFT \ + 16 +/* Packet is in order. */ +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_IN_ORDER \ + (UINT32_C(0x0) << 16) +/* Packet is out of order, no header loss. */ +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_OUT_OF_ORDER \ + (UINT32_C(0x1) << 16) +/* Packet is header search (out of order with header loss). */ +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_HEADER_SEARCH \ + (UINT32_C(0x2) << 16) +/* Packet is resync (resync record ongoing). */ +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC \ + (UINT32_C(0x3) << 16) +/* +* Packet is resync wait (resync record completes, waiting for +* result). +*/ +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT \ + (UINT32_C(0x4) << 16) +/* +* Packet is resync wait for partial tag (waiting for resync record +* tag). +*/ +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT_PARTIAL \ + (UINT32_C(0x5) << 16) +/* Packet is resync success (got resync record success). */ +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS \ + (UINT32_C(0x6) << 16) +/* +* Packet is resync success wait (got midpath ACK, waiting for +* resync record success). +*/ +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT \ + (UINT32_C(0x7) << 16) +#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_LAST \ + TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT/* * This value indicates the lower 7-bit of the Crypto Key ID * associated with this operation. */ #define TLS_METADATA_BASE_MSG_KID_LO_MASK \ UINT32_C(0xfe000000) -#define TLS_METADATA_BASE_MSG_KID_LO_SFT 25 +#define TLS_METADATA_BASE_MSG_KID_LO_SFT \ + 25uint16_t kid_hi;/* * This value indicates the upper 13-bit of the Crypto Key ID
@@ -12661,11 +13153,12 @@ struct tls_metadata_insync_msg {/* This field classifies the data present in the meta-data. */ #define TLS_METADATA_INSYNC_MSG_MD_TYPE_MASK \ UINT32_C(0x1f) -#define TLS_METADATA_INSYNC_MSG_MD_TYPE_SFT 0 +#define TLS_METADATA_INSYNC_MSG_MD_TYPE_SFT \ + 0/* * This setting is used when packets are coming in-order. Depending on -* the state of the receive context, the meta-data will carry different -* information. +* the state of the receive context, the meta-data will carry +* different information. */ #define TLS_METADATA_INSYNC_MSG_MD_TYPE_TLS_INSYNC \ UINT32_C(0x1)
@@ -12678,11 +13171,13 @@ struct tls_metadata_insync_msg {*/ #define TLS_METADATA_INSYNC_MSG_LINK_MASK \ UINT32_C(0x1e0) -#define TLS_METADATA_INSYNC_MSG_LINK_SFT 5 +#define TLS_METADATA_INSYNC_MSG_LINK_SFT \ + 5/* These are flags present in the metadata. */ #define TLS_METADATA_INSYNC_MSG_FLAGS_MASK \ UINT32_C(0x1fffe00) -#define TLS_METADATA_INSYNC_MSG_FLAGS_SFT 9 +#define TLS_METADATA_INSYNC_MSG_FLAGS_SFT \ + 9/* * A value of 1 implies that the packet was decrypted by HW. Otherwise * the packet is passed on as it came in on the wire.
@@ -12695,7 +13190,8 @@ struct tls_metadata_insync_msg {*/ #define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_MASK \ UINT32_C(0xc00) -#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_SFT 10 +#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_SFT \ + 10/* * This enumeration states that the ghash is not valid in the * meta-data.
@@ -12721,12 +13217,13 @@ struct tls_metadata_insync_msg {/* This field indicates the status of tag authentication. */ #define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_MASK \ UINT32_C(0x3000) -#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_SFT 12 +#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_SFT \ + 12/* -* This enumeration is set when there is no tags present in the -* packet. +* This enumeration is set when HW was not able to authenticate a +* TAG. */ -#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_NONE \ +#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED \ (UINT32_C(0x0) << 12)/* * This enumeration states that there is at least one tag in the
@@ -12749,13 +13246,61 @@ struct tls_metadata_insync_msg {*/ #define TLS_METADATA_INSYNC_MSG_FLAGS_HEADER_FLDS_VALID \ UINT32_C(0x4000) +/* +* A value of 1 indicates that the packet experienced a context load +* error. In this case, the packet is sent to the host without the +* header or payload decrypted and the context is not updated. +*/ +#define TLS_METADATA_INSYNC_MSG_FLAGS_CTX_LOAD_ERR \ + UINT32_C(0x8000) +/* This field indicates the packet operation state. */ +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_MASK \ + UINT32_C(0x70000) +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_SFT \ + 16 +/* Packet is in order. */ +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_IN_ORDER \ + (UINT32_C(0x0) << 16) +/* Packet is out of order, no header loss. */ +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_OUT_OF_ORDER \ + (UINT32_C(0x1) << 16) +/* Packet is header search (out of order with header loss). */ +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_HEADER_SEARCH \ + (UINT32_C(0x2) << 16) +/* Packet is resync (resync record ongoing). */ +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC \ + (UINT32_C(0x3) << 16) +/* +* Packet is resync wait (resync record completes, waiting for +* result). +*/ +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT \ + (UINT32_C(0x4) << 16) +/* +* Packet is resync wait for partial tag (waiting for resync record +* tag). +*/ +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT_PARTIAL \ + (UINT32_C(0x5) << 16) +/* Packet is resync success (got resync record success). */ +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS \ + (UINT32_C(0x6) << 16) +/* +* Packet is resync success wait (got midpath ACK, waiting for +* resync record success). +*/ +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT \ + (UINT32_C(0x7) << 16) +#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_LAST \ + TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT/* * This value indicates the lower 7-bit of the Crypto Key ID * associated with this operation. */ #define TLS_METADATA_INSYNC_MSG_KID_LO_MASK \ UINT32_C(0xfe000000) -#define TLS_METADATA_INSYNC_MSG_KID_LO_SFT 25 +#define TLS_METADATA_INSYNC_MSG_KID_LO_SFT \ + 25uint16_t kid_hi;/* * This value indicates the upper 13-bit of the Crypto Key ID
@@ -12764,14 +13309,14 @@ struct tls_metadata_insync_msg {#define TLS_METADATA_INSYNC_MSG_KID_HI_MASK UINT32_C(0x1fff)#define TLS_METADATA_INSYNC_MSG_KID_HI_SFT 0/* -* This field is only valid when md_type is set to tls_insync. This field -* indicates the offset within the current TCP packet where the TLS header -* starts. If there are multiple TLS headers in the packet, this provides -* the offset of the last TLS header. +* This field is only valid when md_type is set to tls_insync. This +* field indicates the offset within the current TCP packet where the +* TLS header starts. If there are multiple TLS headers in the packet, +* this provides the offset of the last TLS header. * -* The field is calculated by subtracting TCP sequence number of the first -* byte of the TCP payload of the packet from the TCP sequence number of -* the last TLS header in the packet. +* The field is calculated by subtracting TCP sequence number of the +* first byte of the TCP payload of the packet from the TCP sequence +* number of the last TLS header in the packet. */ uint16_t tls_header_offset;/*
@@ -12787,7 +13332,7 @@ struct tls_metadata_insync_msg {* not decrypt every packet and authenticate the record. Partial GHASH is * only sent out with packet having the TAG field. */ -uint64_t partial_ghash; +uint8_t partial_ghash[8 ]; } __rte_packed;/* tls_metadata_resync_msg (size:256b/32B) */
@@ -12796,7 +13341,8 @@ struct tls_metadata_resync_msg {/* This field classifies the data present in the meta-data. */ #define TLS_METADATA_RESYNC_MSG_MD_TYPE_MASK \ UINT32_C(0x1f) -#define TLS_METADATA_RESYNC_MSG_MD_TYPE_SFT 0 +#define TLS_METADATA_RESYNC_MSG_MD_TYPE_SFT \ + 0/* * With this setting HW passes the TCP sequence number of the TLS * record that it is requesting a resync on in the meta data.
@@ -12812,11 +13358,13 @@ struct tls_metadata_resync_msg {*/ #define TLS_METADATA_RESYNC_MSG_LINK_MASK \ UINT32_C(0x1e0) -#define TLS_METADATA_RESYNC_MSG_LINK_SFT 5 +#define TLS_METADATA_RESYNC_MSG_LINK_SFT \ + 5/* These are flags present in the metadata. */ #define TLS_METADATA_RESYNC_MSG_FLAGS_MASK \ UINT32_C(0x1fffe00) -#define TLS_METADATA_RESYNC_MSG_FLAGS_SFT 9 +#define TLS_METADATA_RESYNC_MSG_FLAGS_SFT \ + 9/* * A value of 1 implies that the packet was decrypted by HW. Otherwise * the packet is passed on as it came in on the wire.
@@ -12829,7 +13377,8 @@ struct tls_metadata_resync_msg {*/ #define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_MASK \ UINT32_C(0xc00) -#define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_SFT 10 +#define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_SFT \ + 10/* * This enumeration states that the ghash is not valid in the * meta-data.
@@ -12841,28 +13390,77 @@ struct tls_metadata_resync_msg {/* This field indicates the status of tag authentication. */ #define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_MASK \ UINT32_C(0x3000) -#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_SFT 12 +#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_SFT \ + 12/* -* This enumeration is set when there is no tags present in the -* packet. +* This enumeration is set when HW was not able to authenticate a +* TAG. */ -#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_NONE \ +#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED \ (UINT32_C(0x0) << 12)#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_LAST \ - TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_NONE + TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED/* * A value of 1 indicates that this packet contains a record that * starts in the packet and extends beyond the packet. */ #define TLS_METADATA_RESYNC_MSG_FLAGS_HEADER_FLDS_VALID \ UINT32_C(0x4000) +/* +* A value of 1 indicates that the packet experienced a context load +* error. In this case, the packet is sent to the host without the +* header or payload decrypted and the context is not updated. +*/ +#define TLS_METADATA_RESYNC_MSG_FLAGS_CTX_LOAD_ERR \ + UINT32_C(0x8000) +/* This field indicates the packet operation state. */ +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_MASK \ + UINT32_C(0x70000) +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_SFT \ + 16 +/* Packet is in order. */ +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_IN_ORDER \ + (UINT32_C(0x0) << 16) +/* Packet is out of order, no header loss. */ +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_OUT_OF_ORDER \ + (UINT32_C(0x1) << 16) +/* Packet is header search (out of order with header loss). */ +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_HEADER_SEARCH \ + (UINT32_C(0x2) << 16) +/* Packet is resync (resync record ongoing). */ +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC \ + (UINT32_C(0x3) << 16) +/* +* Packet is resync wait (resync record completes, waiting for +* result). +*/ +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT \ + (UINT32_C(0x4) << 16) +/* +* Packet is resync wait for partial tag (waiting for resync record +* tag). +*/ +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT_PARTIAL \ + (UINT32_C(0x5) << 16) +/* Packet is resync success (got resync record success). */ +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS \ + (UINT32_C(0x6) << 16) +/* +* Packet is resync success wait (got midpath ACK, waiting for +* resync record success). +*/ +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT \ + (UINT32_C(0x7) << 16) +#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_LAST \ + TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT/* * This value indicates the lower 7-bit of the Crypto Key ID * associated with this operation. */ #define TLS_METADATA_RESYNC_MSG_KID_LO_MASK \ UINT32_C(0xfe000000) -#define TLS_METADATA_RESYNC_MSG_KID_LO_SFT 25 +#define TLS_METADATA_RESYNC_MSG_KID_LO_SFT \ + 25uint16_t kid_hi;/* * This value indicates the upper 13-bit of the Crypto Key ID
@@ -13221,7 +13819,7 @@ struct hwrm_func_vf_free_output {********************/ -/* hwrm_func_vf_cfg_input (size:448b/56B) */ +/* hwrm_func_vf_cfg_input (size:512b/64B) */ struct hwrm_func_vf_cfg_input {/* The HWRM command request type. */ uint16_t req_type;
@@ -13384,7 +13982,7 @@ struct hwrm_func_vf_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of TX rings) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_VF_CFG_INPUT_FLAGS_TX_ASSETS_TEST \
@@ -13393,7 +13991,7 @@ struct hwrm_func_vf_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of RX rings) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_VF_CFG_INPUT_FLAGS_RX_ASSETS_TEST \
@@ -13402,7 +14000,7 @@ struct hwrm_func_vf_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of CMPL rings) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_VF_CFG_INPUT_FLAGS_CMPL_ASSETS_TEST \
@@ -13411,7 +14009,7 @@ struct hwrm_func_vf_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of RSS ctx) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_VF_CFG_INPUT_FLAGS_RSSCOS_CTX_ASSETS_TEST \
@@ -13420,7 +14018,7 @@ struct hwrm_func_vf_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of ring groups) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_VF_CFG_INPUT_FLAGS_RING_GRP_ASSETS_TEST \
@@ -13429,7 +14027,7 @@ struct hwrm_func_vf_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of stat ctx) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_VF_CFG_INPUT_FLAGS_STAT_CTX_ASSETS_TEST \
@@ -13438,7 +14036,7 @@ struct hwrm_func_vf_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of VNICs) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_VF_CFG_INPUT_FLAGS_VNIC_ASSETS_TEST \
@@ -13447,7 +14045,7 @@ struct hwrm_func_vf_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of L2 ctx) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_VF_CFG_INPUT_FLAGS_L2_CTX_ASSETS_TEST \
@@ -13486,9 +14084,10 @@ struct hwrm_func_vf_cfg_input {/* The number of HW ring groups requested for the VF. */ uint16_t num_hw_ring_grps;/* Number of Tx Key Contexts requested. */ -uint16_t num_tx_key_ctxs; +uint32_t num_tx_key_ctxs;/* Number of Rx Key Contexts requested. */ -uint16_t num_rx_key_ctxs; +uint32_t num_rx_key_ctxs; +uint8_t unused[4 ]; } __rte_packed;/* hwrm_func_vf_cfg_output (size:128b/16B) */
@@ -13558,7 +14157,7 @@ struct hwrm_func_qcaps_input {uint8_t unused_0[6 ]; } __rte_packed; -/* hwrm_func_qcaps_output (size:768b/96B) */ +/* hwrm_func_qcaps_output (size:896b/112B) */ struct hwrm_func_qcaps_output {/* The specific error status for the command. */ uint16_t error_code;
@@ -14176,6 +14775,74 @@ struct hwrm_func_qcaps_output {/* When this bit is '1', it indicates that HW and FW support QUIC. */ #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_QUIC_SUPPORTED \ UINT32_C(0x2) +/* +* When this bit is '1', it indicates that KDNet mode is +* supported on the port for this function. This bit is +* never set for a VF. +*/ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_KDNET_SUPPORTED \ + UINT32_C(0x4) +/* +* When this bit is '1', it indicates the FW is capable of +* supporting Enhanced Doorbell Pacing. +*/ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_DBR_PACING_EXT_SUPPORTED \ + UINT32_C(0x8) +/* +* When this bit is '1', it indicates that FW is capable of +* supporting software based doorbell drop recovery. +*/ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SW_DBR_DROP_RECOVERY_SUPPORTED \ + UINT32_C(0x10) +/* +* When this bit is '1', it indicates the FW supports collection +* and query of the generic statistics. +*/ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_GENERIC_STATS_SUPPORTED \ + UINT32_C(0x20) +/* +* When this bit is '1', it indicates that the HW is capable of +* supporting UDP GSO on the function. +*/ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_UDP_GSO_SUPPORTED \ + UINT32_C(0x40) +/* +* When this bit is '1', it indicates that SyncE feature is +* supported. +*/ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SYNCE_SUPPORTED \ + UINT32_C(0x80) +/* +* When this bit is '1', it indicates the FW is capable of +* supporting doorbell pacing version 0. As doorbell pacing +* notification from hardware for Thor2 is completely different +* from Thor1, this flag is used to differentiate the doorbell +* pacing notification between Thor1 and Thor2. Thor1 uses +* dbr_pacing_supported and dbr_pacing_ext_supported flags for +* doorbell pacing whereas Thor2 uses dbr_pacing_v0_supported flag. +* These flags will never be set at the same time for Thor2. +* Based on this flag, host drivers assume doorbell pacing is needed +* for Thor2. +*/ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_DBR_PACING_V0_SUPPORTED \ + UINT32_C(0x100) +/* +* When this bit is '1', it indicates that the HW supports +* two-completion TX packet timestamp feature, a second completion +* carrying packet TX timestamp in addition to the standard +* completion returned for packets. Host driver should not use +* HWRM port timestamp query (HWRM_PORT_TS_QUERY) command for +* TX timestamp read when two-completion timestamp feature is +* supported. +*/ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_TX_PKT_TS_CMPL_SUPPORTED \ + UINT32_C(0x200) +/* +* When this bit is '1', it indicates that the hardware based +* link aggregation group (L2 and RoCE) feature is supported. +*/ +#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_HW_LAG_SUPPORTED \ + UINT32_C(0x400)uint16_t tunnel_disable_flag;/* * When this bit is '1', it indicates that the VXLAN parsing
@@ -14225,7 +14892,16 @@ struct hwrm_func_qcaps_output {*/ #define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_PPPOE \ UINT32_C(0x80) -uint8_t unused_1; +uint8_t unused_1[2 ]; +/* +* This value uniquely identifies the hardware NIC used by the +* function. The value returned will be the same for all functions. +* A value of 00-00-00-00-00-00-00-00 indicates no device serial number +* is currently configured. This is the same value that is returned by +* PCIe Capability Device Serial Number. +*/ +uint8_t device_serial_number[8 ]; +uint8_t unused_2[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'
@@ -14283,7 +14959,7 @@ struct hwrm_func_qcfg_input {uint8_t unused_0[6 ]; } __rte_packed; -/* hwrm_func_qcfg_output (size:896b/112B) */ +/* hwrm_func_qcfg_output (size:1024b/128B) */ struct hwrm_func_qcfg_output {/* The specific error status for the command. */ uint16_t error_code;
@@ -14787,7 +15463,36 @@ struct hwrm_func_qcfg_output {*/ #define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_PRIMATE_ENABLED \ UINT32_C(0x10) -uint8_t unused_2[3 ]; +/* +* Configured doorbell page size for this function. +* This field is valid for PF only. +*/ +uint8_t db_page_size; +/* DB page size is 4KB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_4KB UINT32_C(0x0) +/* DB page size is 8KB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_8KB UINT32_C(0x1) +/* DB page size is 16KB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_16KB UINT32_C(0x2) +/* DB page size is 32KB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_32KB UINT32_C(0x3) +/* DB page size is 64KB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_64KB UINT32_C(0x4) +/* DB page size is 128KB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_128KB UINT32_C(0x5) +/* DB page size is 256KB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_256KB UINT32_C(0x6) +/* DB page size is 512KB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_512KB UINT32_C(0x7) +/* DB page size is 1MB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_1MB UINT32_C(0x8) +/* DB page size is 2MB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_2MB UINT32_C(0x9) +/* DB page size is 4MB. */ +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_4MB UINT32_C(0xa) +#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_LAST \ + HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_4MB +uint8_t unused_2[2 ];/* * Minimum guaranteed bandwidth for the network partition made up * of the caller physical function and all its child virtual
@@ -14874,11 +15579,36 @@ struct hwrm_func_qcfg_output {* value is used if ring MTU is not specified. */ uint16_t host_mtu; +uint8_t unused_3[2 ]; +uint8_t unused_4[2 ]; +/* +* KDNet mode for the port for this function. If a VF, KDNet +* mode is always disabled. +*/ +uint8_t port_kdnet_mode; +/* KDNet mode is not enabled on the port for this function. */ +#define HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_DISABLED UINT32_C(0x0) +/* KDNet mode is enabled on the port for this function. */ +#define HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_ENABLED UINT32_C(0x1) +#define HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_LAST \ + HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_ENABLED +/* +* If KDNet mode is enabled, the PCI function number of the +* KDNet partition. +*/ +uint8_t kdnet_pcie_function; +/* +* Function ID of the KDNET function on this port. If the +* KDNET partition does not exist and the FW supports this +* feature, 0xffff will be returned. +*/ +uint16_t port_kdnet_fid; +uint8_t unused_5[2 ];/* Number of Tx Key Contexts allocated. */ -uint16_t alloc_tx_key_ctxs; +uint32_t alloc_tx_key_ctxs;/* Number of Rx Key Contexts allocated. */ -uint16_t alloc_rx_key_ctxs; -uint8_t unused_3[5 ]; +uint32_t alloc_rx_key_ctxs; +uint8_t unused_6[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'
@@ -14894,7 +15624,7 @@ struct hwrm_func_qcfg_output {*****************/ -/* hwrm_func_cfg_input (size:896b/112B) */ +/* hwrm_func_cfg_input (size:1024b/128B) */ struct hwrm_func_cfg_input {/* The HWRM command request type. */ uint16_t req_type;
@@ -15002,7 +15732,7 @@ struct hwrm_func_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of TX rings) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_CFG_INPUT_FLAGS_TX_ASSETS_TEST \
@@ -15011,7 +15741,7 @@ struct hwrm_func_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of RX rings) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_CFG_INPUT_FLAGS_RX_ASSETS_TEST \
@@ -15020,7 +15750,7 @@ struct hwrm_func_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of CMPL rings) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_CFG_INPUT_FLAGS_CMPL_ASSETS_TEST \
@@ -15029,7 +15759,7 @@ struct hwrm_func_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of RSS ctx) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_CFG_INPUT_FLAGS_RSSCOS_CTX_ASSETS_TEST \
@@ -15038,7 +15768,7 @@ struct hwrm_func_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of ring groups) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_CFG_INPUT_FLAGS_RING_GRP_ASSETS_TEST \
@@ -15047,7 +15777,7 @@ struct hwrm_func_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of stat ctx) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_CFG_INPUT_FLAGS_STAT_CTX_ASSETS_TEST \
@@ -15056,7 +15786,7 @@ struct hwrm_func_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of VNICs) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_CFG_INPUT_FLAGS_VNIC_ASSETS_TEST \
@@ -15065,7 +15795,7 @@ struct hwrm_func_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of L2 ctx) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_CFG_INPUT_FLAGS_L2_CTX_ASSETS_TEST \
@@ -15091,7 +15821,7 @@ struct hwrm_func_cfg_input {* This bit requests that the firmware test to see if all the assets * requested in this command (i.e. number of NQ rings) are available. * The firmware will return an error if the requested assets are -* not available. The firwmare will NOT reserve the assets if they +* not available. The firmware will NOT reserve the assets if they * are available. */ #define HWRM_FUNC_CFG_INPUT_FLAGS_NQ_ASSETS_TEST \
@@ -15158,6 +15888,15 @@ struct hwrm_func_cfg_input {*/ #define HWRM_FUNC_CFG_INPUT_FLAGS_BD_METADATA_DISABLE \ UINT32_C(0x40000000) +/* +* If this bit is set to 1, the driver is requesting FW to see if +* all the assets requested in this command (i.e. number of KTLS/ +* QUIC key contexts) are available. The firmware will return an +* error if the requested assets are not available. The firmware +* will NOT reserve the assets if they are available. +*/ +#define HWRM_FUNC_CFG_INPUT_FLAGS_KEY_CTX_ASSETS_TEST \ + UINT32_C(0x80000000)uint32_t enables;/* * This bit must be '1' for the admin_mtu field to be
@@ -15803,11 +16542,71 @@ struct hwrm_func_cfg_input {* ring that is assigned to a function has a valid mtu. */ uint16_t host_mtu; +uint8_t unused_0[4 ]; +uint32_t enables2; +/* +* This bit must be '1' for the kdnet_mode field to be +* configured. +*/ +#define HWRM_FUNC_CFG_INPUT_ENABLES2_KDNET UINT32_C(0x1) +/* +* This bit must be '1' for the db_page_size field to be +* configured. Legacy controller core FW may silently ignore +* the db_page_size programming request through this command. +*/ +#define HWRM_FUNC_CFG_INPUT_ENABLES2_DB_PAGE_SIZE UINT32_C(0x2) +/* +* KDNet mode for the port for this function. If NPAR is +* also configured on this port, it takes precedence. KDNet +* mode is ignored for a VF. +*/ +uint8_t port_kdnet_mode; +/* KDNet mode is not enabled. */ +#define HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_DISABLED UINT32_C(0x0) +/* KDNet mode enabled. */ +#define HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_ENABLED UINT32_C(0x1) +#define HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_LAST \ + HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_ENABLED +/* +* This field can be used by the PF driver to configure the doorbell +* page size. L2 driver can use different pages to ring the doorbell +* for L2 push operation. The doorbell page size should be configured +* to match the native CPU page size for proper RoCE and L2 doorbell +* operations. This value supersedes the older method of configuring +* the doorbell page size by the RoCE driver using the command queue +* method. The default is 4K. +*/ +uint8_t db_page_size; +/* DB page size is 4KB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_4KB UINT32_C(0x0) +/* DB page size is 8KB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_8KB UINT32_C(0x1) +/* DB page size is 16KB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_16KB UINT32_C(0x2) +/* DB page size is 32KB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_32KB UINT32_C(0x3) +/* DB page size is 64KB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_64KB UINT32_C(0x4) +/* DB page size is 128KB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_128KB UINT32_C(0x5) +/* DB page size is 256KB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_256KB UINT32_C(0x6) +/* DB page size is 512KB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_512KB UINT32_C(0x7) +/* DB page size is 1MB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_1MB UINT32_C(0x8) +/* DB page size is 2MB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_2MB UINT32_C(0x9) +/* DB page size is 4MB. */ +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_4MB UINT32_C(0xa) +#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_LAST \ + HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_4MB +uint8_t unused_1[2 ];/* Number of Tx Key Contexts requested. */ -uint16_t num_tx_key_ctxs; +uint32_t num_tx_key_ctxs;/* Number of Rx Key Contexts requested. */ -uint16_t num_rx_key_ctxs; -uint8_t unused_0[4 ]; +uint32_t num_rx_key_ctxs; +uint8_t unused_2[4 ]; } __rte_packed;/* hwrm_func_cfg_output (size:128b/16B) */
@@ -15900,24 +16699,27 @@ struct hwrm_func_qstats_input {* A privileged PF can query for other function's statistics. */ uint16_t fid; -/* This flags indicates the type of statistics request. */ uint8_t flags; -/* This value is not used to avoid backward compatibility issues. */ -#define HWRM_FUNC_QSTATS_INPUT_FLAGS_UNUSED UINT32_C(0x0)/* -* flags should be set to 1 when request is for only RoCE statistics. -* This will be honored only if the caller_fid is a privileged PF. -* In all other cases FID and caller_fid should be the same. +* This bit should be set to 1 when request is for only RoCE +* statistics. This will be honored only if the caller_fid is +* a privileged PF. In all other cases FID and caller_fid should +* be the same. */ -#define HWRM_FUNC_QSTATS_INPUT_FLAGS_ROCE_ONLY UINT32_C(0x1) +#define HWRM_FUNC_QSTATS_INPUT_FLAGS_ROCE_ONLY UINT32_C(0x1)/* -* flags should be set to 2 when request is for the counter mask, +* This bit should be set to 1 when request is for the counter mask, * representing the width of each of the stats counters, rather * than counters themselves. */ -#define HWRM_FUNC_QSTATS_INPUT_FLAGS_COUNTER_MASK UINT32_C(0x2) -#define HWRM_FUNC_QSTATS_INPUT_FLAGS_LAST \ - HWRM_FUNC_QSTATS_INPUT_FLAGS_COUNTER_MASK +#define HWRM_FUNC_QSTATS_INPUT_FLAGS_COUNTER_MASK UINT32_C(0x2) +/* +* This bit should be set to 1 when request is for only L2 +* statistics. This will be honored only if the caller_fid is +* a privileged PF. In all other cases FID and caller_fid should +* be the same. +*/ +#define HWRM_FUNC_QSTATS_INPUT_FLAGS_L2_ONLY UINT32_C(0x4)uint8_t unused_0[5 ]; } __rte_packed;
@@ -15992,7 +16794,18 @@ struct hwrm_func_qstats_output {uint64_t rx_agg_events;/* Number of aborted aggregations on the function. */ uint64_t rx_agg_aborts; -uint8_t unused_0[7 ]; +/* +* This field is the sequence of the statistics of a function being +* cleared. Firmware starts the sequence from zero. It increments +* the sequence number every time the statistics of the function +* are cleared, which can be triggered by a clear statistics request +* or by freeing all statistics contexts of the function. If a user +* is interested in knowing if the statistics have been cleared +* since the last query, it can keep track of this sequence number +* between queries. +*/ +uint8_t clear_seq; +uint8_t unused_0[6 ];/* * This field is used in Output records to indicate that the output * is completely written to RAM. This field should be read as '1'
@@ -16045,24 +16858,20 @@ struct hwrm_func_qstats_ext_input {* A privileged PF can query for other function's statistics. */ uint16_t fid; -/* This flags indicates the type of statistics request. */ uint8_t flags; -/* This value is not used to avoid backward compatibility issues. */ -#define HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_UNUSED UINT32_C(0x0)/* -* flags should be set to 1 when request is for only RoCE statistics. -* This will be honored only if the caller_fid is a privileged PF. -* In all other cases FID and caller_fid should be the same. +* This bit should be set to 1 when request is for only RoCE +* statistics. This will be honored only if the caller_fid is +* a privileged PF. In all other cases FID and caller_fid should +* be the same. */ -#define HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_ROCE_ONLY UINT32_C(0x1) +#define HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_ROCE_ONLY UINT32_C(0x1)/* -* flags should be set to 2 when request is for the counter mask +* This bit should be set to 1 when request is for the counter mask * representing the width of each of the stats counters, rather * than counters themselves. */ -#define HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_COUNTER_MASK UINT32_C(0x2) -#define HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_LAST \ - HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_COUNTER_MASK +#define HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_COUNTER_MASK UINT32_C(0x2)uint8_t unused_0[1 ];uint32_t enables;/*
@@ -16418,6 +17227,14 @@ struct hwrm_func_drv_rgtr_input {*/ #define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_NPAR_1_2_SUPPORT \ UINT32_C(0x200) +/* +* When this bit is 1, the function's driver is indicating the +* support for asymmetric queue configuration, such that queue +* ids and service profiles on TX side are not the same as the +* corresponding queue configuration on the RX side +*/ +#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_ASYM_QUEUE_CFG_SUPPORT \ + UINT32_C(0x400)uint32_t enables;/* * This bit must be '1' for the os_type field to be
@@ -16979,7 +17796,7 @@ struct hwrm_func_resource_qcaps_input {uint8_t unused_0[6 ]; } __rte_packed; -/* hwrm_func_resource_qcaps_output (size:512b/64B) */ +/* hwrm_func_resource_qcaps_output (size:576b/72B) */ struct hwrm_func_resource_qcaps_output {/* The specific error status for the command. */ uint16_t error_code;
@@ -17054,15 +17871,16 @@ struct hwrm_func_resource_qcaps_output {*/ #define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_FLAGS_MIN_GUARANTEED \ UINT32_C(0x1) +uint8_t unused_0[2 ];/* Minimum guaranteed number of Tx Key Contexts */ -uint16_t min_tx_key_ctxs; +uint32_t min_tx_key_ctxs;/* Maximum non-guaranteed number of Tx Key Contexts */ -uint16_t max_tx_key_ctxs; +uint32_t max_tx_key_ctxs;/* Minimum guaranteed number of Rx Key Contexts */ -uint16_t min_rx_key_ctxs; +uint32_t min_rx_key_ctxs;/* Maximum non-guaranteed number of Rx Key Contexts */ -uint16_t max_rx_key_ctxs; -uint8_t unused_0[5 ]; +uint32_t max_rx_key_ctxs; +uint8_t unused_1[3 ];/* * This field is used in Output records to indicate that the output * is completely written to RAM. This field should be read as '1'
@@ -17078,7 +17896,7 @@ struct hwrm_func_resource_qcaps_output {*****************************/ -/* hwrm_func_vf_resource_cfg_input (size:512b/64B) */ +/* hwrm_func_vf_resource_cfg_input (size:576b/72B) */ struct hwrm_func_vf_resource_cfg_input {/* The HWRM command request type. */ uint16_t req_type;
@@ -17152,18 +17970,18 @@ struct hwrm_func_vf_resource_cfg_input {*/ #define HWRM_FUNC_VF_RESOURCE_CFG_INPUT_FLAGS_MIN_GUARANTEED \ UINT32_C(0x1) +uint8_t unused_0[2 ];/* Minimum guaranteed number of Tx Key Contexts */ -uint16_t min_tx_key_ctxs; +uint32_t min_tx_key_ctxs;/* Maximum non-guaranteed number of Tx Key Contexts */ -uint16_t max_tx_key_ctxs; +uint32_t max_tx_key_ctxs;/* Minimum guaranteed number of Rx Key Contexts */ -uint16_t min_rx_key_ctxs; +uint32_t min_rx_key_ctxs;/* Maximum non-guaranteed number of Rx Key Contexts */ -uint16_t max_rx_key_ctxs; -uint8_t unused_0[2 ]; +uint32_t max_rx_key_ctxs; } __rte_packed; -/* hwrm_func_vf_resource_cfg_output (size:256b/32B) */ +/* hwrm_func_vf_resource_cfg_output (size:320b/40B) */ struct hwrm_func_vf_resource_cfg_output {/* The specific error status for the command. */ uint16_t error_code;
@@ -17190,10 +18008,10 @@ struct hwrm_func_vf_resource_cfg_output {/* Reserved number of ring groups */ uint16_t reserved_hw_ring_grps;/* Actual number of Tx Key Contexts reserved */ -uint16_t reserved_tx_key_ctxs; +uint32_t reserved_tx_key_ctxs;/* Actual number of Rx Key Contexts reserved */ -uint16_t reserved_rx_key_ctxs; -uint8_t unused_0[3 ]; +uint32_t reserved_rx_key_ctxs; +uint8_t unused_0[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'
@@ -17479,8 +18297,13 @@ struct hwrm_func_backing_store_qcaps_output {* function. */ uint32_t rkc_max_entries; +/* +* Additional number of RoCE QP context entries required for this +* function to support fast QP destroy feature. +*/ +uint16_t fast_qpmd_qp_num_entries;/* Reserved for future. */ -uint8_t rsvd1[7 ]; +uint8_t rsvd1[5 ];/* * This field is used in Output records to indicate that the output * is completely written to RAM. This field should be read as '1'
@@ -20638,31 +21461,53 @@ struct hwrm_func_ptp_pin_qcfg_output {/* Type of function for Pin #2. */ uint8_t pin2_usage;/* No function is configured. */ -#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_NONE UINT32_C(0x0) +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_NONE \ + UINT32_C(0x0)/* PPS IN is configured. */ -#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_PPS_IN UINT32_C(0x1) +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_PPS_IN \ + UINT32_C(0x1)/* PPS OUT is configured. */ -#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_PPS_OUT UINT32_C(0x2) +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_PPS_OUT \ + UINT32_C(0x2)/* SYNC IN is configured. */ -#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNC_IN UINT32_C(0x3) +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNC_IN \ + UINT32_C(0x3)/* SYNC OUT is configured. */ -#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNC_OUT UINT32_C(0x4) +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNC_OUT \ + UINT32_C(0x4) +/* SYNCE primary clock OUT is configured. */ +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNCE_PRIMARY_CLOCK_OUT \ + UINT32_C(0x5) +/* SYNCE secondary clock OUT is configured. */ +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT \ + UINT32_C(0x6)#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_LAST \ - HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNC_OUT + HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT/* Type of function for Pin #3. */ uint8_t pin3_usage;/* No function is configured. */ -#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_NONE UINT32_C(0x0) +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_NONE \ + UINT32_C(0x0)/* PPS IN is configured. */ -#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_PPS_IN UINT32_C(0x1) +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_PPS_IN \ + UINT32_C(0x1)/* PPS OUT is configured. */ -#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_PPS_OUT UINT32_C(0x2) +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_PPS_OUT \ + UINT32_C(0x2)/* SYNC IN is configured. */ -#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNC_IN UINT32_C(0x3) +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNC_IN \ + UINT32_C(0x3)/* SYNC OUT is configured. */ -#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNC_OUT UINT32_C(0x4) +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNC_OUT \ + UINT32_C(0x4) +/* SYNCE primary clock OUT is configured. */ +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNCE_PRIMARY_CLOCK_OUT \ + UINT32_C(0x5) +/* SYNCE secondary OUT is configured. */ +#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUT \ + UINT32_C(0x6)#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_LAST \ - HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNC_OUT + HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUTuint8_t unused_0;/* * This field is used in Output records to indicate that the output
@@ -20813,17 +21658,28 @@ struct hwrm_func_ptp_pin_cfg_input {/* Configure function for TSIO pin#2. */ uint8_t pin2_usage;/* No function is configured. */ -#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_NONE UINT32_C(0x0) +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_NONE \ + UINT32_C(0x0)/* PPS IN is configured. */ -#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_PPS_IN UINT32_C(0x1) +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_PPS_IN \ + UINT32_C(0x1)/* PPS OUT is configured. */ -#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_PPS_OUT UINT32_C(0x2) +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_PPS_OUT \ + UINT32_C(0x2)/* SYNC IN is configured. */ -#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNC_IN UINT32_C(0x3) +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNC_IN \ + UINT32_C(0x3)/* SYNC OUT is configured. */ -#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNC_OUT UINT32_C(0x4) +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNC_OUT \ + UINT32_C(0x4) +/* SYNCE primary clock OUT is configured. */ +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNCE_PRIMARY_CLOCK_OUT \ + UINT32_C(0x5) +/* SYNCE secondary clock OUT is configured. */ +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT \ + UINT32_C(0x6)#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_LAST \ - HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNC_OUT + HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT/* Enable or disable functionality of Pin #3. */ uint8_t pin3_state;/* Disabled */
@@ -20835,17 +21691,28 @@ struct hwrm_func_ptp_pin_cfg_input {/* Configure function for TSIO pin#3. */ uint8_t pin3_usage;/* No function is configured. */ -#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_NONE UINT32_C(0x0) +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_NONE \ + UINT32_C(0x0)/* PPS IN is configured. */ -#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_PPS_IN UINT32_C(0x1) +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_PPS_IN \ + UINT32_C(0x1)/* PPS OUT is configured. */ -#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_PPS_OUT UINT32_C(0x2) +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_PPS_OUT \ + UINT32_C(0x2)/* SYNC IN is configured. */ -#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNC_IN UINT32_C(0x3) +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNC_IN \ + UINT32_C(0x3)/* SYNC OUT is configured. */ -#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNC_OUT UINT32_C(0x4) +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNC_OUT \ + UINT32_C(0x4) +/* SYNCE primary clock OUT is configured. */ +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNCE_PRIMARY_CLOCK_OUT \ + UINT32_C(0x5) +/* SYNCE secondary clock OUT is configured. */ +#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUT \ + UINT32_C(0x6)#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_LAST \ - HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNC_OUT + HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUTuint8_t unused_0[4 ]; } __rte_packed;
@@ -21130,12 +21997,25 @@ struct hwrm_func_ptp_ts_query_output {uint16_t resp_len;/* Timestamp value of last PPS event latched. */ uint64_t pps_event_ts; -/* PTM local timestamp value. */ -uint64_t ptm_res_local_ts; -/* PTM Master timestamp value. */ -uint64_t ptm_pmstr_ts; -/* PTM Master propagation delay */ -uint32_t ptm_mstr_prop_dly; +/* +* PHC timestamp value when PTM responseD request is received +* at downstream port (t4'). This is a 48 bit timestamp in nanoseconds. +*/ +uint64_t ptm_local_ts; +/* +* PTM System timestamp value corresponding to t4' at +* root complex (T4'). Together with ptm_local_ts, these +* two timestamps provide the cross-trigger timestamps. +* Driver can directly use these values for cross-trigger. +* This is a 48 bit timestamp in nanoseconds. +*/ +uint64_t ptm_system_ts; +/* +* PTM Link delay. This is the time taken at root complex (RC) +* between receiving PTM request and sending PTM response to +* downstream port. This is a 32 bit value in nanoseconds. +*/ +uint32_t ptm_link_delay;uint8_t unused_0[3 ];/* * This field is used in Output records to indicate that the output
@@ -21463,7 +22343,18 @@ struct hwrm_func_key_ctx_alloc_output {uint16_t resp_len;/* Actual number of Key Contexts allocated. */ uint16_t num_key_ctxs_allocated; -uint8_t unused_0[5 ]; +/* Control flags. */ +uint8_t flags; +/* +* When set, it indicates that all key contexts allocated by this +* command are contiguous. As a result, the driver has to read the +* start context ID from the first entry of the DMA data buffer +* and figures out the end context ID by “start context ID + +* num_key_ctxs_allocated - 1”. +*/ +#define HWRM_FUNC_KEY_CTX_ALLOC_OUTPUT_FLAGS_KEY_CTXS_CONTIGUOUS \ + UINT32_C(0x1) +uint8_t unused_0[4 ];/* * This field is used in Output records to indicate that the output * is completely written to RAM. This field should be read as '1'
@@ -21574,6 +22465,9 @@ struct hwrm_func_backing_store_cfg_v2_input {* Instance of the backing store type. It is zero-based, * which means "0" indicates the first instance. For backing * stores with single instance only, leave this field to 0. +* 1. If the backing store type is MPC TQM ring, use the following +* instance value to MPC client mapping: +* TCE (0), RCE (1), TE_CFA(2), RE_CFA (3), PRIMATE(4) */ uint16_t instance;/* Control flags. */
@@ -21586,6 +22480,31 @@ struct hwrm_func_backing_store_cfg_v2_input {*/ #define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_FLAGS_PREBOOT_MODE \ UINT32_C(0x1) +/* +* When set, the driver indicates that the backing store type +* to be configured in this command is the last one to do for +* the associated PF. That means all backing store type +* configurations are done for the corresponding PF after this +* command. As a result, the firmware has to do the necessary +* post configurations. +*/ +#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_FLAGS_BS_CFG_ALL_DONE \ + UINT32_C(0x2) +/* +* When set, the driver indicates extending the size of the specific +* backing store type instead of configuring the corresponding PBLs. +* The size specified in the command will be the new size to be +* configured. The operation is only valid when the specific backing +* store has been configured before. Otherwise, the firmware will +* return an error. The driver needs to zero out the “entry_size”, +* “flags”, “page_dir”, and “page_size_pbl_level” fields, and the +* firmware will ignore these inputs. Further, the firmware expects +* the “num_entries” and any valid split entries to be no less than +* the initial value that has been configured. If not, it will +* return an error code. +*/ +#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_FLAGS_BS_EXTEND \ + UINT32_C(0x4)/* Page directory. */ uint64_t page_dir;/* Number of entries */
@@ -21957,6 +22876,52 @@ struct hwrm_func_backing_store_qcfg_v2_output {uint8_t valid; } __rte_packed; +/* Common structure to cast QPC split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is QPC. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */ +/* qpc_split_entries (size:128b/16B) */ +struct qpc_split_entries { +/* Number of L2 QP backing store entries. */ +uint32_t qp_num_l2_entries; +/* Number of QP1 entries. */ +uint32_t qp_num_qp1_entries; +uint32_t rsvd[2 ]; +} __rte_packed; + +/* Common structure to cast SRQ split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is SRQ. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */ +/* srq_split_entries (size:128b/16B) */ +struct srq_split_entries { +/* Number of L2 SRQ backing store entries. */ +uint32_t srq_num_l2_entries; +uint32_t rsvd; +uint32_t rsvd2[2 ]; +} __rte_packed; + +/* Common structure to cast CQ split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is CQ. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */ +/* cq_split_entries (size:128b/16B) */ +struct cq_split_entries { +/* Number of L2 CQ backing store entries. */ +uint32_t cq_num_l2_entries; +uint32_t rsvd; +uint32_t rsvd2[2 ]; +} __rte_packed; + +/* Common structure to cast VNIC split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is VNIC. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */ +/* vnic_split_entries (size:128b/16B) */ +struct vnic_split_entries { +/* Number of VNIC backing store entries. */ +uint32_t vnic_num_vnic_entries; +uint32_t rsvd; +uint32_t rsvd2[2 ]; +} __rte_packed; + +/* Common structure to cast MRAV split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is MRAV. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */ +/* mrav_split_entries (size:128b/16B) */ +struct mrav_split_entries { +/* Number of AV backing store entries. */ +uint32_t mrav_num_av_entries; +uint32_t rsvd; +uint32_t rsvd2[2 ]; +} __rte_packed; +/************************************ * hwrm_func_backing_store_qcaps_v2 * ************************************/
@@ -22150,6 +23115,9 @@ struct hwrm_func_backing_store_qcaps_v2_output {/* * Bit map of the valid instances associated with the * backing store type. +* 1. If the backing store type is MPC TQM ring, use the following +* bit to MPC client mapping: +* TCE (0), RCE (1), TE_CFA(2), RE_CFA (3), PRIMATE(4) */ uint32_t instance_bit_map;/*
@@ -22506,7 +23474,7 @@ struct hwrm_func_dbr_pacing_qcfg_output {uint8_t unused_3[7 ];/* * Specifies primary function’s NQ ID. -* A value of 0xFFFF indicates NQ ID is invalid. +* A value of 0xFFFF FFFF indicates NQ ID is invalid. */ uint32_t primary_nq_id;/*
@@ -22585,13 +23553,13 @@ struct hwrm_func_dbr_pacing_broadcast_event_output {uint8_t valid; } __rte_packed; -/*********************** -* hwrm_func_vlan_qcfg * -***********************/ +/************************************* +* hwrm_func_dbr_pacing_nqlist_query * +*************************************/ -/* hwrm_func_vlan_qcfg_input (size:192b/24B) */ -struct hwrm_func_vlan_qcfg_input { +/* hwrm_func_dbr_pacing_nqlist_query_input (size:128b/16B) */ +struct hwrm_func_dbr_pacing_nqlist_query_input {/* The HWRM command request type. */ uint16_t req_type;/*
@@ -22620,18 +23588,10 @@ struct hwrm_func_vlan_qcfg_input {* point to a physically contiguous block of memory. */ uint64_t resp_addr; -/* -* Function ID of the function that is being -* configured. -* If set to 0xFF... (All Fs), then the configuration is -* for the requesting function. -*/ -uint16_t fid; -uint8_t unused_0[6 ]; } __rte_packed; -/* hwrm_func_vlan_qcfg_output (size:320b/40B) */ -struct hwrm_func_vlan_qcfg_output { +/* hwrm_func_dbr_pacing_nqlist_query_output (size:384b/48B) */ +struct hwrm_func_dbr_pacing_nqlist_query_output {/* The specific error status for the command. */ uint16_t error_code;/* The HWRM command request type. */
@@ -22640,49 +23600,414 @@ struct hwrm_func_vlan_qcfg_output {uint16_t seq_id;/* The length of the response data in number of bytes. */ uint16_t resp_len; -uint64_t unused_0; -/* S-TAG VLAN identifier configured for the function. */ -uint16_t stag_vid; -/* S-TAG PCP value configured for the function. */ -uint8_t stag_pcp; -uint8_t unused_1; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id0; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id1; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id2; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id3; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id4; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id5; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id6; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id7; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id8; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id9; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id10; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id11; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id12; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id13; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id14; +/* ID of an NQ ring allocated for DBR pacing notifications. */ +uint16_t nq_ring_id15; +/* Number of consecutive NQ ring IDs populated in the response. */ +uint32_t num_nqs; +uint8_t unused_0[3 ];/* -* S-TAG TPID value configured for the function. This field is specified in -* network byte order. +* 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. */ -uint16_t stag_tpid; -/* C-TAG VLAN identifier configured for the function. */ -uint16_t ctag_vid; -/* C-TAG PCP value configured for the function. */ -uint8_t ctag_pcp; -uint8_t unused_2; +uint8_t valid; +} __rte_packed; + +/************************************ +* hwrm_func_dbr_recovery_completed * +************************************/ + + +/* hwrm_func_dbr_recovery_completed_input (size:192b/24B) */ +struct hwrm_func_dbr_recovery_completed_input { +/* The HWRM command request type. */ +uint16_t req_type;/* -* C-TAG TPID value configured for the function. This field is specified in -* network byte order. +* The completion ring to send the completion event on. This should +* be the NQ ID returned from the `nq_alloc` HWRM command. */ -uint16_t ctag_tpid; -/* Future use. */ -uint32_t rsvd2; -/* Future use. */ -uint32_t rsvd3; -uint8_t unused_3[3 ]; +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; +/* +* Specifies the epoch value with the one that was specified by the +* firmware in the error_report_doorbell_drop_threshold async event +* corresponding to the specific recovery cycle. +*/ +uint32_t epoch; +/* The epoch value. */ +#define HWRM_FUNC_DBR_RECOVERY_COMPLETED_INPUT_EPOCH_VALUE_MASK \ + UINT32_C(0xffffff) +#define HWRM_FUNC_DBR_RECOVERY_COMPLETED_INPUT_EPOCH_VALUE_SFT 0 +uint8_t unused_0[4 ]; +} __rte_packed; + +/* hwrm_func_dbr_recovery_completed_output (size:128b/16B) */ +struct hwrm_func_dbr_recovery_completed_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; +uint8_t unused_0[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. +* 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_func_vlan_cfg * -**********************/ +/*********************** +* hwrm_func_synce_cfg * +***********************/ -/* hwrm_func_vlan_cfg_input (size:384b/48B) */ -struct hwrm_func_vlan_cfg_input { +/* hwrm_func_synce_cfg_input (size:192b/24B) */ +struct hwrm_func_synce_cfg_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; +uint8_t enables; +/* +* This bit must be '1' for the freq_profile field to be +* configured. +*/ +#define HWRM_FUNC_SYNCE_CFG_INPUT_ENABLES_FREQ_PROFILE \ + UINT32_C(0x1) +/* +* This bit must be '1' for the primary_clock_state field to be +* configured. +*/ +#define HWRM_FUNC_SYNCE_CFG_INPUT_ENABLES_PRIMARY_CLOCK \ + UINT32_C(0x2) +/* +* This bit must be '1' for the secondary_clock_state field to be +* configured. +*/ +#define HWRM_FUNC_SYNCE_CFG_INPUT_ENABLES_SECONDARY_CLOCK \ + UINT32_C(0x4) +/* Frequency profile for SyncE recovered clock. */ +uint8_t freq_profile; +/* Invalid frequency profile */ +#define HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_INVALID UINT32_C(0x0) +/* 25MHz SyncE clock profile */ +#define HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_25MHZ UINT32_C(0x1) +#define HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_LAST \ + HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_25MHZ +/* +* Enable or disable primary clock for PF/port, overriding previous +* primary clock setting. +*/ +uint8_t primary_clock_state; +/* Disable clock */ +#define HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_DISABLE \ + UINT32_C(0x0) +/* Enable clock */ +#define HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_ENABLE \ + UINT32_C(0x1) +#define HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_LAST \ + HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_ENABLE +/* +* Enable or disable secondary clock for PF/port, overriding previous +* secondary clock setting. +*/ +uint8_t secondary_clock_state; +/* Clock disabled */ +#define HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_DISABLE \ + UINT32_C(0x0) +/* Clock enabled */ +#define HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_ENABLE \ + UINT32_C(0x1) +#define HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_LAST \ + HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_ENABLE +uint8_t unused_0[4 ]; +} __rte_packed; + +/* hwrm_func_synce_cfg_output (size:128b/16B) */ +struct hwrm_func_synce_cfg_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; +uint8_t unused_0[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_func_synce_qcfg * +************************/ + + +/* hwrm_func_synce_qcfg_input (size:192b/24B) */ +struct hwrm_func_synce_qcfg_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; +uint8_t unused_0[8 ]; +} __rte_packed; + +/* hwrm_func_synce_qcfg_output (size:128b/16B) */ +struct hwrm_func_synce_qcfg_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; +/* Frequency profile for SyncE recovered clock. */ +uint8_t freq_profile; +/* Invalid frequency profile */ +#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_INVALID UINT32_C(0x0) +/* 25MHz SyncE clock profile */ +#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_25MHZ UINT32_C(0x1) +#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_LAST \ + HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_25MHZ +/* SyncE recovered clock state */ +uint8_t state; +/* +* When this bit is '1', primary clock is enabled for this PF/port. +* When this bit is '0', primary clock is disabled for this PF/port. +*/ +#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_STATE_PRIMARY_CLOCK_ENABLED \ + UINT32_C(0x1) +/* +* When this bit is '1', secondary clock is enabled for this +* PF/port. +* When this bit is '0', secondary clock is disabled for this +* PF/port. +*/ +#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_STATE_SECONDARY_CLOCK_ENABLED \ + UINT32_C(0x2) +uint8_t unused_0[5 ]; +/* +* 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_func_vlan_qcfg * +***********************/ + + +/* hwrm_func_vlan_qcfg_input (size:192b/24B) */ +struct hwrm_func_vlan_qcfg_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; +/* +* Function ID of the function that is being +* configured. +* If set to 0xFF... (All Fs), then the configuration is +* for the requesting function. +*/ +uint16_t fid; +uint8_t unused_0[6 ]; +} __rte_packed; + +/* hwrm_func_vlan_qcfg_output (size:320b/40B) */ +struct hwrm_func_vlan_qcfg_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; +uint64_t unused_0; +/* S-TAG VLAN identifier configured for the function. */ +uint16_t stag_vid; +/* S-TAG PCP value configured for the function. */ +uint8_t stag_pcp; +uint8_t unused_1; +/* +* S-TAG TPID value configured for the function. This field is specified in +* network byte order. +*/ +uint16_t stag_tpid; +/* C-TAG VLAN identifier configured for the function. */ +uint16_t ctag_vid; +/* C-TAG PCP value configured for the function. */ +uint8_t ctag_pcp; +uint8_t unused_2; +/* +* C-TAG TPID value configured for the function. This field is specified in +* network byte order. +*/ +uint16_t ctag_tpid; +/* Future use. */ +uint32_t rsvd2; +/* Future use. */ +uint32_t rsvd3; +uint8_t unused_3[3 ]; +/* +* 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_func_vlan_cfg * +**********************/ + + +/* hwrm_func_vlan_cfg_input (size:384b/48B) */ +struct hwrm_func_vlan_cfg_input {/* The HWRM command request type. */ uint16_t req_type;/*
@@ -24576,7 +25901,7 @@ struct hwrm_port_phy_qcfg_input {uint8_t unused_0[6 ]; } __rte_packed; -/* hwrm_port_phy_qcfg_output (size:768b/96B) */ +/* hwrm_port_phy_qcfg_output (size:832b/104B) */ struct hwrm_port_phy_qcfg_output {/* The specific error status for the command. */ uint16_t error_code;
@@ -25601,6 +26926,14 @@ struct hwrm_port_phy_qcfg_output {/* 200Gb link speed */ #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_PAM4_ADV_SPEEDS_200GB \ UINT32_C(0x4) +/* +* This field is used to indicate the reasons for link down. +* This field is set to 0, if the link down reason is unknown. +*/ +uint8_t link_down_reason; +/* Remote fault */ +#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_DOWN_REASON_RF UINT32_C(0x1) +uint8_t unused_0[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'
@@ -26934,16 +28267,12 @@ struct hwrm_port_qstats_input {/* Port ID of port that is being queried. */ uint16_t port_id;uint8_t flags; -/* This value is not used to avoid backward compatibility issues. */ -#define HWRM_PORT_QSTATS_INPUT_FLAGS_UNUSED UINT32_C(0x0)/* * This bit is set to 1 when request is for a counter mask, * representing the width of each of the stats counters, rather * than counters themselves. */ -#define HWRM_PORT_QSTATS_INPUT_FLAGS_COUNTER_MASK UINT32_C(0x1) -#define HWRM_PORT_QSTATS_INPUT_FLAGS_LAST \ - HWRM_PORT_QSTATS_INPUT_FLAGS_COUNTER_MASK +#define HWRM_PORT_QSTATS_INPUT_FLAGS_COUNTER_MASK UINT32_C(0x1)uint8_t unused_0[5 ];/* * This is the host address where
@@ -27646,16 +28975,12 @@ struct hwrm_port_qstats_ext_input {*/ uint16_t rx_stat_size;uint8_t flags; -/* This value is not used to avoid backward compatibility issues. */ -#define HWRM_PORT_QSTATS_EXT_INPUT_FLAGS_UNUSED UINT32_C(0x0)/* * This bit is set to 1 when request is for the counter mask, * representing width of each of the stats counters, rather than * counters themselves. */ -#define HWRM_PORT_QSTATS_EXT_INPUT_FLAGS_COUNTER_MASK UINT32_C(0x1) -#define HWRM_PORT_QSTATS_EXT_INPUT_FLAGS_LAST \ - HWRM_PORT_QSTATS_EXT_INPUT_FLAGS_COUNTER_MASK +#define HWRM_PORT_QSTATS_EXT_INPUT_FLAGS_COUNTER_MASK UINT32_C(0x1)uint8_t unused_0;/* * This is the host address where
@@ -27903,16 +29228,12 @@ struct hwrm_port_ecn_qstats_input {*/ uint16_t ecn_stat_buf_size;uint8_t flags; -/* This value is not used to avoid backward compatibility issues. */ -#define HWRM_PORT_ECN_QSTATS_INPUT_FLAGS_UNUSED UINT32_C(0x0)/* * This bit is set to 1 when request is for a counter mask, * representing the width of each of the stats counters, rather * than counters themselves. */ -#define HWRM_PORT_ECN_QSTATS_INPUT_FLAGS_COUNTER_MASK UINT32_C(0x1) -#define HWRM_PORT_ECN_QSTATS_INPUT_FLAGS_LAST \ - HWRM_PORT_ECN_QSTATS_INPUT_FLAGS_COUNTER_MASK +#define HWRM_PORT_ECN_QSTATS_INPUT_FLAGS_COUNTER_MASK UINT32_C(0x1)uint8_t unused_0[3 ];/* * This is the host address where
@@ -28398,6 +29719,12 @@ struct hwrm_port_phy_qcaps_output {*/ #define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_PFC_UNSUPPORTED \ UINT32_C(0x2) +/* +* If set to 1, then this field indicates that +* bank based addressing is supported in firmware. +*/ +#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_BANK_ADDR_SUPPORTED \ + UINT32_C(0x4)/* * Number of internal ports for this device. This field allows the FW * to advertise how many internal ports are present. Manufacturing
@@ -29720,6 +31047,14 @@ struct hwrm_port_prbs_test_input {#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS31 UINT32_C(0x5)/* PRBS58 */ #define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS58 UINT32_C(0x6) +/* PRBS49 */ +#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS49 UINT32_C(0x7) +/* PRBS10 */ +#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS10 UINT32_C(0x8) +/* PRBS20 */ +#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS20 UINT32_C(0x9) +/* PRBS13 */ +#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS13 UINT32_C(0xa)/* Invalid */ #define HWRM_PORT_PRBS_TEST_INPUT_POLY_INVALID UINT32_C(0xff)#define HWRM_PORT_PRBS_TEST_INPUT_POLY_LAST \
@@ -29749,6 +31084,15 @@ struct hwrm_port_prbs_test_input {*/ #define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_RX_LANE_MAP_VALID \ UINT32_C(0x4) +/* If set to 1, FEC stat t-code 0-7 registers are enabled. */ +#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_FEC_STAT_T0_T7 \ + UINT32_C(0x8) +/* +* If set to 1, FEC stat t-code 8-15 registers are enabled. +* If fec_stat_t0_t7 is set, fec_stat_t8_t15 field will be ignored. +*/ +#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_FEC_STAT_T8_T15 \ + UINT32_C(0x10)/* Duration in seconds to run the PRBS test. */ uint16_t timeout;/*
@@ -29777,7 +31121,15 @@ struct hwrm_port_prbs_test_output {uint16_t resp_len;/* Total length of stored data. */ uint16_t total_data_len; -uint16_t unused_0; +/* This field is used in Output records to indicate the output format */ +uint8_t ber_format; +/* BER_FORMAT_PRBS */ +#define HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_PRBS UINT32_C(0x0) +/* BER_FORMAT_FEC */ +#define HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_FEC UINT32_C(0x1) +#define HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_LAST \ + HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_FEC +uint8_t unused_0;uint8_t unused_1[3 ];/* * This field is used in Output records to indicate that the output
@@ -30800,6 +32152,160 @@ struct hwrm_port_ep_tx_qcfg_output {uint8_t valid; } __rte_packed; +/***************** +* hwrm_port_cfg * +*****************/ + + +/* hwrm_port_cfg_input (size:256b/32B) */ +struct hwrm_port_cfg_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.
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
PATCH v2 3/11 net/bnxt: update copyright date and cleanup whitespace
In reply to Randy SchacherUpdate the Copyright to 2023
Clean up extra blank lines
Clean up other whitespace issues
--- drivers/net/bnxt/bnxt_cpr.c | 2 +- drivers/net/bnxt/bnxt_cpr.h | 2 +- drivers/net/bnxt/bnxt_filter.c | 2 +- drivers/net/bnxt/bnxt_irq.c | 2 +- drivers/net/bnxt/bnxt_irq.h | 2 +- drivers/net/bnxt/bnxt_nvm_defs.h | 2 +- drivers/net/bnxt/bnxt_reps.h | 2 +- drivers/net/bnxt/bnxt_ring.h | 2 +- drivers/net/bnxt/bnxt_rxq.h | 2 +- drivers/net/bnxt/bnxt_rxr.h | 2 +- drivers/net/bnxt/bnxt_rxtx_vec_avx2.c | 2 +- drivers/net/bnxt/bnxt_rxtx_vec_common.h | 2 +- drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 2 +- drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 +- drivers/net/bnxt/bnxt_stats.c | 2 +- drivers/net/bnxt/bnxt_stats.h | 2 +- drivers/net/bnxt/bnxt_txq.h | 2 +- drivers/net/bnxt/bnxt_util.c | 2 +- drivers/net/bnxt/bnxt_util.h | 2 +- drivers/net/bnxt/meson.build | 2 +- drivers/net/bnxt/rte_pmd_bnxt.c | 2 +- drivers/net/bnxt/rte_pmd_bnxt.h | 2 +- drivers/net/bnxt/tf_core/bitalloc.c | 3 +-- drivers/net/bnxt/tf_core/bitalloc.h | 3 +-- drivers/net/bnxt/tf_core/cfa_resource_types.h | 3 +-- drivers/net/bnxt/tf_core/dpool.c | 3 ++- drivers/net/bnxt/tf_core/dpool.h | 3 +-- drivers/net/bnxt/tf_core/ll.c | 2 +- drivers/net/bnxt/tf_core/ll.h | 2 +- drivers/net/bnxt/tf_core/lookup3.h | 1 - drivers/net/bnxt/tf_core/rand.c | 2 +- drivers/net/bnxt/tf_core/rand.h | 3 +-- drivers/net/bnxt/tf_core/stack.c | 2 +- drivers/net/bnxt/tf_core/stack.h | 3 +-- drivers/net/bnxt/tf_core/tf_common.h | 3 +-- drivers/net/bnxt/tf_core/tf_core.h | 1 - drivers/net/bnxt/tf_core/tf_device.h | 1 - drivers/net/bnxt/tf_core/tf_device_p4.h | 3 +-- drivers/net/bnxt/tf_core/tf_device_p58.h | 2 +- drivers/net/bnxt/tf_core/tf_em.h | 3 +-- drivers/net/bnxt/tf_core/tf_em_common.c | 8 +------- drivers/net/bnxt/tf_core/tf_em_common.h | 4 +--- drivers/net/bnxt/tf_core/tf_em_hash_internal.c | 2 +- drivers/net/bnxt/tf_core/tf_em_host.c | 3 +-- drivers/net/bnxt/tf_core/tf_em_internal.c | 3 ++- drivers/net/bnxt/tf_core/tf_ext_flow_handle.h | 4 +--- drivers/net/bnxt/tf_core/tf_global_cfg.c | 2 +- drivers/net/bnxt/tf_core/tf_global_cfg.h | 3 +-- drivers/net/bnxt/tf_core/tf_hash.c | 2 +- drivers/net/bnxt/tf_core/tf_hash.h | 3 +-- drivers/net/bnxt/tf_core/tf_identifier.c | 2 +- drivers/net/bnxt/tf_core/tf_identifier.h | 3 +-- drivers/net/bnxt/tf_core/tf_if_tbl.h | 3 +-- drivers/net/bnxt/tf_core/tf_msg_common.h | 3 +-- drivers/net/bnxt/tf_core/tf_project.h | 3 +-- drivers/net/bnxt/tf_core/tf_resources.h | 3 +-- drivers/net/bnxt/tf_core/tf_rm.h | 6 +----- drivers/net/bnxt/tf_core/tf_session.h | 1 - drivers/net/bnxt/tf_core/tf_sram_mgr.h | 1 - drivers/net/bnxt/tf_core/tf_tbl.h | 4 +--- drivers/net/bnxt/tf_core/tf_tbl_sram.h | 6 +----- drivers/net/bnxt/tf_core/tf_tcam.h | 3 +-- drivers/net/bnxt/tf_core/tf_tcam_shared.h | 1 - drivers/net/bnxt/tf_core/tf_util.c | 3 +-- drivers/net/bnxt/tf_core/tf_util.h | 3 +-- drivers/net/bnxt/tf_core/tfp.c | 2 +- drivers/net/bnxt/tf_core/tfp.h | 4 +--- drivers/net/bnxt/tf_ulp/bnxt_tf_common.h | 3 +-- drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h | 1 - drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 1 - drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 1 - drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 1 - drivers/net/bnxt/tf_ulp/ulp_gen_hash.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_gen_hash.h | 3 +-- drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h | 1 - drivers/net/bnxt/tf_ulp/ulp_ha_mgr.h | 1 - drivers/net/bnxt/tf_ulp/ulp_mapper.h | 1 - drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h | 3 +-- drivers/net/bnxt/tf_ulp/ulp_matcher.h | 3 +-- drivers/net/bnxt/tf_ulp/ulp_port_db.h | 1 - drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 1 - drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 1 - drivers/net/bnxt/tf_ulp/ulp_tun.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_tun.h | 3 +-- drivers/net/bnxt/tf_ulp/ulp_utils.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_utils.h | 3 +-- 87 files changed, 73 insertions(+), 135 deletions(-)
drivers/net/bnxt/bnxt_cpr.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_cpr.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_filter.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_irq.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_irq.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_nvm_defs.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_reps.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_ring.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_rxq.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_rxr.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_rxtx_vec_avx2.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright(c) 2019-2021 Broadcom All rights reserved. */ +/* Copyright(c) 2019-2023 Broadcom All rights reserved. */ #include <inttypes.h> #include <stdbool.h>
drivers/net/bnxt/bnxt_rxtx_vec_common.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2020-2021 Broadcom +* Copyright(c) 2020-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_rxtx_vec_neon.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright(c) 2019-2021 Broadcom All rights reserved. */ +/* Copyright(c) 2019-2023 Broadcom All rights reserved. */ #include <inttypes.h> #include <stdbool.h>
drivers/net/bnxt/bnxt_rxtx_vec_sse.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright(c) 2019-2021 Broadcom All rights reserved. */ +/* Copyright(c) 2019-2023 Broadcom All rights reserved. */ #include <inttypes.h> #include <stdbool.h>
drivers/net/bnxt/bnxt_stats.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_stats.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_txq.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_util.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_util.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/meson.build +1 -1
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -# Copyright(c) 2020 Broadcom +# Copyright(c) 2023 Broadcom if is_windows build = false
drivers/net/bnxt/rte_pmd_bnxt.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2017-2021 Broadcom +* Copyright(c) 2017-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/rte_pmd_bnxt.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2017-2021 Broadcom +* Copyright(c) 2017-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/bitalloc.c +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -7,7 +7,6 @@#define BITALLOC_MAX_LEVELS 6 -/* Finds the last bit set plus 1, equivalent to gcc __builtin_fls */ static int ba_fls (bitalloc_word_t v)
drivers/net/bnxt/tf_core/bitalloc.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -121,5 +121,4 @@ int ba_free_count(struct bitalloc *pool);* Returns the pool's in use count */ int ba_inuse_count (struct bitalloc *pool); -#endif /* _BITALLOC_H_ */
drivers/net/bnxt/tf_core/cfa_resource_types.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -256,5 +256,4 @@/* Table Scope */ #define CFA_RESOURCE_TYPE_P4_TBL_SCOPE 0x22UL#define CFA_RESOURCE_TYPE_P4_LAST CFA_RESOURCE_TYPE_P4_TBL_SCOPE -#endif /* _CFA_RESOURCE_TYPES_H_ */
drivers/net/bnxt/tf_core/dpool.c +2 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */ #include <stdio.h>
@@ -55,6 +55,7 @@ static int dpool_move(struct dpool *dpool, {uint32_t size;uint32_t i; +if (DP_IS_FREE (dpool->entry[dst_index].flags)) { size =DP_FLAGS_SIZE (dpool->entry[src_index].flags);
drivers/net/bnxt/tf_core/dpool.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -305,5 +305,4 @@ void dpool_dump(struct dpool *dpool);int dpool_defrag (struct dpool *dpool,uint32_t entry_size,uint8_t defrag); -#endif /* _DPOOL_H_ */
drivers/net/bnxt/tf_core/ll.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/ll.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/lookup3.h +0 -1
@@ -157,5 +157,4 @@ static inline uint32_t hashword(const uint32_t *k,/*------------------------------------------------- report the result */ return c; } -#endif /* _LOOKUP3_H_ */
drivers/net/bnxt/tf_core/rand.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/rand.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -32,5 +32,4 @@ uint32_t rand32(void);* */ void rand_init (void ); -#endif /* __RAND_H__ */
drivers/net/bnxt/tf_core/stack.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/stack.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */ #ifndef _STACK_H_
@@ -113,5 +113,4 @@ int stack_pop(struct stack *st, uint32_t *x);* none */ void stack_dump (struct stack *st); -#endif /* _STACK_H_ */
drivers/net/bnxt/tf_core/tf_common.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2020-2021 Broadcom +* Copyright(c) 2020-2023 Broadcom * All rights reserved. */
@@ -39,5 +39,4 @@ return -EINVAL; \ } \ }while (0 ) - #endif /* _TF_COMMON_H_ */
drivers/net/bnxt/tf_core/tf_core.h +0 -1
@@ -2481,5 +2481,4 @@ struct tf_get_sram_policy_parms {*/ int tf_get_sram_policy (struct tf *tfp,struct tf_get_sram_policy_parms *parms); -#endif /* _TF_CORE_H_ */
drivers/net/bnxt/tf_core/tf_device.h +0 -1
@@ -1142,5 +1142,4 @@ extern const struct tf_dev_ops tf_dev_ops_p58;*/ extern const struct tf_hcapi_resource_map tf_hcapi_res_map_p4[CFA_RESOURCE_TYPE_P4_LAST +1 ];extern const struct tf_hcapi_resource_map tf_hcapi_res_map_p58[CFA_RESOURCE_TYPE_P58_LAST +1 ]; -#endif /* _TF_DEVICE_H_ */
drivers/net/bnxt/tf_core/tf_device_p4.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -181,5 +181,4 @@ const struct tf_hcapi_resource_map tf_hcapi_res_map_p4[CFA_RESOURCE_TYPE_P4_LASTTF_MODULE_TYPE_EM ,1 <<TF_EM_TBL_TYPE_TBL_SCOPE }, }; -#endif /* _TF_DEVICE_P4_H_ */
drivers/net/bnxt/tf_core/tf_device_p58.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/tf_em.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -8,7 +8,6 @@#include "tf_core.h" #include "tf_session.h" -#include "tf_em_common.h" #include "hcapi_cfa_defs.h"
drivers/net/bnxt/tf_core/tf_em_common.c +1 -7
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -9,7 +9,6 @@#include <rte_common.h> #include <rte_errno.h> #include <rte_log.h> -#include "tf_core.h" #include "tf_util.h" #include "tf_common.h"
@@ -20,10 +19,8 @@#include "tf_device.h" #include "tf_ext_flow_handle.h" #include "hcapi_cfa.h" -#include "bnxt.h" -/** Invalid table scope id */ #define TF_TBL_SCOPE_INVALID 0xffffffff
@@ -285,7 +282,6 @@ tf_em_create_key_entry(struct cfa_p4_eem_entry_hdr *result,memcpy (key_entry->key, in_key,TF_P4_HW_EM_KEY_MAX_SIZE +4 ); } -/** * Return the number of page table pages needed to * reference the given number of next level pages.
@@ -908,7 +904,6 @@ tf_em_delete_ext_entry(struct tf *tfp,return tf_delete_eem_entry (tbl_scope_cb, parms); } -int tf_em_ext_common_bind (struct tf *tfp,struct tf_em_cfg_parms *parms)
@@ -1204,7 +1199,6 @@ int tf_em_ext_map_tbl_scope(struct tf *tfp, gcfg_parms.config_mask = (uint8_t *)mask; gcfg_parms.config_sz_in_bytes =sizeof (uint64_t ); - rc =tf_msg_set_global_cfg (tfp, &gcfg_parms);if (rc) { TFP_DRV_LOG(ERR,
drivers/net/bnxt/tf_core/tf_em_common.h +1 -3
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -178,7 +178,6 @@ int tf_em_validate_num_entries(struct tf_tbl_scope_cb *tbl_scope_cb,int tf_em_size_table (struct hcapi_cfa_em_table *tbl,uint32_t page_size); -/** * Look up table scope control block using tbl_scope_id from * tf_session
@@ -196,5 +195,4 @@ int tf_em_size_table(struct hcapi_cfa_em_table *tbl,struct tf_tbl_scope_cb *tf_em_ext_common_tbl_scope_find (struct tf *tfp,uint32_t tbl_scope_id); -#endif /* _TF_EM_COMMON_H_ */
drivers/net/bnxt/tf_core/tf_em_hash_internal.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/tf_em_host.c +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -376,7 +376,6 @@ tf_em_ext_alloc(struct tf *tfp,void *ext_ptr =NULL ;uint16_t pf; - rc =tf_session_get_session_internal (tfp, &tfs);if (rc) { TFP_DRV_LOG(ERR, "Failed to get tf_session, rc:%s\n",
drivers/net/bnxt/tf_core/tf_em_internal.c +2 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -15,6 +15,7 @@#include "tf_msg.h" #include "tfp.h" #include "tf_ext_flow_handle.h" +#include "bnxt.h" #define TF_EM_DB_EM_REC 0
drivers/net/bnxt/tf_core/tf_ext_flow_handle.h +1 -3
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -184,6 +184,4 @@ do { \ type = (((gfid) &TF_HASH_TYPE_GFID_MASK ) >> \TF_HASH_TYPE_GFID_SFT ); \ } while (0) - -#endif /* _TF_EXT_FLOW_HANDLE_H_ */
drivers/net/bnxt/tf_core/tf_global_cfg.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/tf_global_cfg.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -146,5 +146,4 @@ int tf_global_cfg_set(struct tf *tfp,*/ int tf_global_cfg_get (struct tf *tfp,struct tf_global_cfg_parms *parms); -#endif /* TF_GLOBAL_CFG_H */
drivers/net/bnxt/tf_core/tf_hash.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/tf_hash.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -23,5 +23,4 @@ tf_hash_calc_crc32i(uint32_t init, uint8_t *buf, uint32_t len);*/ uint32_t tf_hash_calc_crc32 (uint8_t *buf,uint32_t len); -#endif
drivers/net/bnxt/tf_core/tf_identifier.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/tf_identifier.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -212,5 +212,4 @@ int tf_ident_search(struct tf *tfp,*/ int tf_ident_get_resc_info (struct tf *tfp,struct tf_identifier_resource_info *parms); -#endif /* _TF_IDENTIFIER_H_ */
drivers/net/bnxt/tf_core/tf_if_tbl.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -224,5 +224,4 @@ int tf_if_tbl_set(struct tf *tfp,*/ int tf_if_tbl_get (struct tf *tfp,struct tf_if_tbl_get_parms *parms); -#endif /* TF_IF_TBL_TYPE_H */
drivers/net/bnxt/tf_core/tf_msg_common.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -40,5 +40,4 @@ parms.resp_size =0 ; \ parms.resp_data =NULL ; \ } while (0) -#endif /* _TF_MSG_COMMON_H_ */
drivers/net/bnxt/tf_core/tf_project.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -20,5 +20,4 @@#ifndef TF_SHARED #define TF_SHARED 0#endif -#endif /* _TF_PROJECT_H_ */
drivers/net/bnxt/tf_core/tf_resources.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -7,5 +7,4 @@#define _TF_RESOURCES_H_#define TF_NUM_TBL_SCOPE 16/* < Number of TBL scopes */ -#endif /* _TF_RESOURCES_H_ */
drivers/net/bnxt/tf_core/tf_rm.h +1 -5
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -43,7 +43,6 @@ struct tf;* support module, not called directly. */ -/** * RM Element configuration enumeration. Used by the Device to * indicate how the RM elements the DB consists off, are to be
@@ -75,8 +74,6 @@ enum tf_rm_elem_cfg_type {* HCAPI type. Child accesses the parent db. */ TF_RM_ELEM_CFG_HCAPI_BA_CHILD , - - TF_RM_TYPE_MAX };
@@ -581,5 +578,4 @@ tf_rm_check_indexes_in_range(struct tf_rm_check_indexes_in_range_parms *parms);*/ int tf_rm_get_slices (struct tf_rm_get_slices_parms *parms); -#endif /* TF_RM_NEW_H_ */
drivers/net/bnxt/tf_core/tf_session.h +0 -1
@@ -716,5 +716,4 @@ tf_session_set_if_tbl_db(struct tf *tfp,int tf_session_get_if_tbl_db (struct tf *tfp,void **if_tbl_handle); -#endif /* _TF_SESSION_H_ */
drivers/net/bnxt/tf_core/tf_sram_mgr.h +0 -1
@@ -303,5 +303,4 @@ const char*/ const char *tf_sram_bank_2_str (enum tf_sram_bank_id bank_id); -#endif /* _TF_SRAM_MGR_H_ */
drivers/net/bnxt/tf_core/tf_tbl.h +1 -3
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -15,7 +15,6 @@ struct tf;* The Table module provides processing of Internal TF table types. */ -/** * Table configuration parameters */
@@ -327,5 +326,4 @@ int tf_tbl_bulk_get(struct tf *tfp,int tf_tbl_get_resc_info (struct tf *tfp,struct tf_tbl_resource_info *tbl); -#endif /* TF_TBL_TYPE_H */
drivers/net/bnxt/tf_core/tf_tbl_sram.h +1 -5
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -9,12 +9,10 @@#include "tf_core.h" #include "stack.h" -/** * The SRAM Table module provides processing of managed SRAM types. */ -/** * @page tblsram SRAM Table *
@@ -99,7 +97,6 @@ int tf_tbl_sram_alloc(struct tf *tfp,int tf_tbl_sram_free (struct tf *tfp,struct tf_tbl_free_parms *parms); -/** * Configures the requested element by sending a firmware request which * then installs it into the device internal structures.
@@ -150,5 +147,4 @@ int tf_tbl_sram_get(struct tf *tfp,*/ int tf_tbl_sram_bulk_get (struct tf *tfp,struct tf_tbl_get_bulk_parms *parms); -#endif /* TF_TBL_SRAM_H */
drivers/net/bnxt/tf_core/tf_tcam.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -374,5 +374,4 @@ int tf_tcam_get(struct tf *tfp,*/ int tf_tcam_get_resc_info (struct tf *tfp,struct tf_tcam_resource_info *parms); -#endif /* _TF_TCAM_H */
drivers/net/bnxt/tf_core/tf_tcam_shared.h +0 -1
@@ -179,5 +179,4 @@ int tf_tcam_shared_move_p58(struct tf *tfp,*/ int tf_tcam_shared_clear (struct tf *tfp,struct tf_clear_tcam_shared_entries_parms *parms); -#endif /* _TF_TCAM_SHARED_H */
drivers/net/bnxt/tf_core/tf_util.c +1 -2
@@ -1,10 +1,9 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */ #include <string.h> -#include "tf_util.h" const char *
drivers/net/bnxt/tf_core/tf_util.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -93,5 +93,4 @@ const char *tf_module_subtype_2_str(enum tf_module_type module,* Pointer to a char string holding the string for the EM type */ const char *tf_module_2_str (enum tf_module_type module); -#endif /* _TF_UTIL_H_ */
drivers/net/bnxt/tf_core/tfp.c +1 -1
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: BSD-3-Clause * see the individual elements. -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_core/tfp.h +1 -3
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom +* Copyright(c) 2019-2023 Broadcom * All rights reserved. */
@@ -185,7 +185,6 @@ void tfp_spinlock_unlock(struct tfp_spinlock_parms *slock);*/ int tfp_get_fid (struct tf *tfp,uint16_t *fw_fid); -/* * @ref tfp_cpu_to_le_16 * @ref tfp_le_to_cpu_16
@@ -232,5 +231,4 @@ int tfp_get_fid(struct tf *tfp, uint16_t *fw_fid);* */ int tfp_get_pf (struct tf *tfp,uint16_t *pf); -#endif /* _TFP_H_ */
drivers/net/bnxt/tf_ulp/bnxt_tf_common.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -68,5 +68,4 @@ bnxt_ulp_cntxt_ptr2_mark_db_get(struct bnxt_ulp_context *ulp_ctx);int32_t bnxt_ulp_cntxt_ptr2_mark_db_set (struct bnxt_ulp_context *ulp_ctx,struct bnxt_ulp_mark_tbl *mark_tbl); -#endif /* _BNXT_TF_COMMON_H_ */
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h +0 -1
@@ -25,5 +25,4 @@ uint16_t bnxt_pmd_get_phy_port_id(uint16_t port);uint16_t bnxt_pmd_get_vport (uint16_t port);enum bnxt_ulp_intf_type bnxt_pmd_get_interface_type (uint16_t port);int32_t bnxt_pmd_set_unicast_rxmask (struct rte_eth_dev *eth_dev); -#endif /* _BNXT_TF_PMD_ABSTRACT_H_ */
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +0 -1
@@ -317,5 +317,4 @@ bnxt_ulp_cntxt_num_shared_clients_get(struct bnxt_ulp_context *ulp_ctx);struct bnxt_flow_app_tun_ent *bnxt_ulp_cntxt_ptr2_app_tun_list_get (struct bnxt_ulp_context *ulp); -#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h +0 -1
@@ -184,5 +184,4 @@ int32_t ulp_fc_mgr_cntr_parent_flow_set(struct bnxt_ulp_context *ctxt,enum tf_dir dir, uint32_t hw_cntr_id, uint32_t pc_idx); -#endif /* _ULP_FC_MGR_H_ */
drivers/net/bnxt/tf_ulp/ulp_flow_db.h +0 -1
@@ -410,5 +410,4 @@ ulp_flow_db_parent_flow_count_reset(struct bnxt_ulp_context *ulp_ctxt);*/ void ulp_flow_db_shared_session_set (struct ulp_flow_db_res_params *res,enum bnxt_ulp_shared_session shared); -#endif /* _ULP_FLOW_DB_H_ */
drivers/net/bnxt/tf_ulp/ulp_gen_hash.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_ulp/ulp_gen_hash.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -162,5 +162,4 @@ ulp_gen_hash_tbl_list_add(struct ulp_gen_hash_tbl *hash_tbl,int32_t ulp_gen_hash_tbl_list_del (struct ulp_gen_hash_tbl *hash_tbl,struct ulp_gen_hash_entry_params *entry); -#endif /* _ULP_GEN_HASH_H_ */
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h +0 -1
@@ -167,5 +167,4 @@ int32_t ulp_mapper_gen_tbl_hash_entry_add(struct ulp_mapper_gen_tbl_list *tbl_list, struct ulp_gen_hash_entry_params *hash_entry, struct ulp_mapper_gen_tbl_entry *gen_tbl_ent); -#endif /* _ULP_EN_TBL_H_ */
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.h +0 -1
@@ -63,5 +63,4 @@ ulp_ha_mgr_close(struct bnxt_ulp_context *ulp_ctx);int32_t ulp_ha_mgr_region_get (struct bnxt_ulp_context *ulp_ctx,enum ulp_ha_mgr_region *region); -#endif /* _ULP_HA_MGR_H_*/
drivers/net/bnxt/tf_ulp/ulp_mapper.h +0 -1
@@ -133,5 +133,4 @@ ulp_mapper_get_shared_fid(struct bnxt_ulp_context *ulp,uint32_t id, uint16_t key, uint32_t *fid); -#endif /* _ULP_MAPPER_H_ */
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -112,5 +112,4 @@ int32_t ulp_mark_db_mark_del(struct bnxt_ulp_context *ctxt, uint32_t mark_flag, uint32_t gfid); -#endif /* _ULP_MARK_MGR_H_ */
drivers/net/bnxt/tf_ulp/ulp_matcher.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -27,5 +27,4 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params,int32_t ulp_matcher_action_match (struct ulp_rte_parser_params *params,uint32_t *act_id); -#endif /* ULP_MATCHER_H_ */
drivers/net/bnxt/tf_ulp/ulp_port_db.h +0 -1
@@ -326,5 +326,4 @@ ulp_port_db_parent_vnic_get(struct bnxt_ulp_context *ulp_ctxt,int32_t ulp_port_db_phy_port_get (struct bnxt_ulp_context *ulp_ctxt,uint32_t port_id,uint16_t *phy_port); -#endif /* _ULP_PORT_DB_H_ */
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +0 -1
@@ -259,5 +259,4 @@ ulp_vendor_vxlan_decap_act_handler(const struct rte_flow_action *action_item,int32_t ulp_rte_vendor_vxlan_decap_hdr_handler (const struct rte_flow_item *item,struct ulp_rte_parser_params *params); -#endif /* _ULP_RTE_PARSER_H_ */
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +0 -1
@@ -441,5 +441,4 @@ extern struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[];* that could be reused by other templates. */ extern uint32_t ulp_glb_template_tbl[]; -#endif /* _ULP_TEMPLATE_STRUCT_H_ */
drivers/net/bnxt/tf_ulp/ulp_tun.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_ulp/ulp_tun.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -57,5 +57,4 @@ ulp_tunnel_offload_entry_clear(struct bnxt_tun_cache_entry *tun_tbl,int32_t ulp_tunnel_offload_process (struct ulp_rte_parser_params *params); -#endif
drivers/net/bnxt/tf_ulp/ulp_utils.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_ulp/ulp_utils.h +1 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -522,5 +522,4 @@ uint32_t ulp_bitmap_notzero(const uint8_t *bitmap, int32_t size);/* returns 0 if input is power of 2 */ int32_t ulp_util_is_power_of_2 (uint64_t x); -#endif /* _ULP_UTILS_H_ */
Signature · 1 line
2.25.1
PATCH v2 4/11 net/bnxt: update Truflow core
In reply to Randy Schacher- Add shared session management
- Add SRAM session management
- Add dynamic TCAM management
- Add shared TCAM session management
- Add Hot Upgrade support
- Update copyright
--- drivers/net/bnxt/bnxt.h | 1 - drivers/net/bnxt/bnxt_irq.h | 1 - drivers/net/bnxt/bnxt_nvm_defs.h | 1 - drivers/net/bnxt/bnxt_ring.h | 1 - drivers/net/bnxt/bnxt_rxr.h | 1 - drivers/net/bnxt/bnxt_txr.h | 1 - drivers/net/bnxt/bnxt_util.h | 1 - drivers/net/bnxt/tf_core/cfa_resource_types.h | 2 - drivers/net/bnxt/tf_core/cfa_tcam_mgr.c | 2116 +++++++++++++++++ drivers/net/bnxt/tf_core/cfa_tcam_mgr.h | 523 ++++ .../net/bnxt/tf_core/cfa_tcam_mgr_device.h | 101 + .../net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c | 201 ++ .../net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h | 28 + drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c | 921 +++++++ drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h | 20 + drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c | 926 ++++++++ drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h | 20 + drivers/net/bnxt/tf_core/cfa_tcam_mgr_sbmp.h | 126 + .../net/bnxt/tf_core/cfa_tcam_mgr_session.c | 377 +++ .../net/bnxt/tf_core/cfa_tcam_mgr_session.h | 54 + drivers/net/bnxt/tf_core/meson.build | 36 +- drivers/net/bnxt/tf_core/tf_core.c | 54 +- drivers/net/bnxt/tf_core/tf_core.h | 97 +- drivers/net/bnxt/tf_core/tf_device.c | 18 +- drivers/net/bnxt/tf_core/tf_device.h | 2 +- drivers/net/bnxt/tf_core/tf_device_p4.c | 14 +- drivers/net/bnxt/tf_core/tf_device_p58.c | 84 +- drivers/net/bnxt/tf_core/tf_em_common.c | 2 +- drivers/net/bnxt/tf_core/tf_em_internal.c | 10 +- drivers/net/bnxt/tf_core/tf_identifier.c | 1 + drivers/net/bnxt/tf_core/tf_if_tbl.c | 59 +- drivers/net/bnxt/tf_core/tf_msg.c | 217 +- drivers/net/bnxt/tf_core/tf_msg.h | 38 +- drivers/net/bnxt/tf_core/tf_rm.c | 117 +- drivers/net/bnxt/tf_core/tf_session.c | 112 +- drivers/net/bnxt/tf_core/tf_session.h | 65 +- drivers/net/bnxt/tf_core/tf_sram_mgr.c | 117 +- drivers/net/bnxt/tf_core/tf_sram_mgr.h | 22 +- drivers/net/bnxt/tf_core/tf_tbl.c | 8 +- drivers/net/bnxt/tf_core/tf_tbl_sram.c | 25 +- drivers/net/bnxt/tf_core/tf_tcam.c | 226 +- drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c | 286 +++ drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h | 49 + drivers/net/bnxt/tf_core/tf_tcam_shared.c | 1146 +-------- drivers/net/bnxt/tf_core/tf_tcam_shared.h | 3 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 +- 46 files changed, 6686 insertions(+), 1552 deletions(-) create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_sbmp.h create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.c create mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h create mode 100644 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c create mode 100644 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h
drivers/net/bnxt/bnxt.h +0 -1
@@ -1044,5 +1044,4 @@ int bnxt_flow_ops_get_op(struct rte_eth_dev *dev,int bnxt_dev_start_op (struct rte_eth_dev *eth_dev);int bnxt_dev_stop_op (struct rte_eth_dev *eth_dev);void bnxt_handle_vf_cfg_change (void *arg); -#endif
drivers/net/bnxt/bnxt_irq.h +0 -1
@@ -20,5 +20,4 @@ void bnxt_enable_int(struct bnxt *bp);int bnxt_setup_int (struct bnxt *bp);int bnxt_request_int (struct bnxt *bp);void bnxt_int_handler (void *param); -#endif
drivers/net/bnxt/bnxt_nvm_defs.h +0 -1
@@ -66,5 +66,4 @@ enum bnxnvm_pkglog_field_index {BNX_PKG_LOG_FIELD_IDX_INSTALLED_ITEMS =5 ,BNX_PKG_LOG_FIELD_IDX_INSTALLED_MASK =6 }; -#endif /* Don't add anything after this line */
drivers/net/bnxt/bnxt_ring.h +0 -1
@@ -142,5 +142,4 @@ static inline void bnxt_db_cq(struct bnxt_cp_ring_info *cpr) B_CP_DIS_DB(cpr, cp_raw_cons); } } -#endif
drivers/net/bnxt/bnxt_rxr.h +0 -1
@@ -386,5 +386,4 @@ bnxt_parse_pkt_type_v2(struct rte_mbuf *mbuf, mbuf->packet_type = pkt_type; } -#endif /* _BNXT_RXR_H_ */
drivers/net/bnxt/bnxt_txr.h +0 -1
@@ -90,5 +90,4 @@ int bnxt_flush_tx_cmp(struct bnxt_cp_ring_info *cpr); TX_BD_LONG_LFLAGS_IP_CHKSUM)#define TX_BD_FLG_TIP_TCP_UDP_CHKSUM (TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM | \ TX_BD_LONG_LFLAGS_T_IP_CHKSUM) -#endif
drivers/net/bnxt/bnxt_util.h +0 -1
@@ -17,5 +17,4 @@int bnxt_check_zero_bytes (const uint8_t *bytes,int len);void bnxt_eth_hw_addr_random (uint8_t *mac_addr); -#endif /* _BNXT_UTIL_H_ */
drivers/net/bnxt/tf_core/cfa_resource_types.h +0 -2
@@ -63,7 +63,6 @@#define CFA_RESOURCE_TYPE_P59_VEB_TCAM 0x18UL#define CFA_RESOURCE_TYPE_P59_LAST CFA_RESOURCE_TYPE_P59_VEB_TCAM -/* Meter */ #define CFA_RESOURCE_TYPE_P58_METER 0x0UL/* SRAM_Bank_0 */
@@ -184,7 +183,6 @@#define CFA_RESOURCE_TYPE_P45_TBL_SCOPE 0x23UL#define CFA_RESOURCE_TYPE_P45_LAST CFA_RESOURCE_TYPE_P45_TBL_SCOPE -/* Multicast Group */ #define CFA_RESOURCE_TYPE_P4_MCG 0x0UL/* Encap 8 byte record */
drivers/net/bnxt/tf_core/cfa_tcam_mgr.c new file +2116 -0
2,116 lines not on this page · raw message
drivers/net/bnxt/tf_core/cfa_tcam_mgr.h new file +523 -0
523 lines not on this page · raw message
drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h new file +101 -0
101 lines not on this page · raw message
drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c new file +201 -0
201 lines not on this page · raw message
drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h new file +28 -0
@@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2021-2023 Broadcom +* All rights reserved. +*/ + +#ifndef CFA_TCAM_MGR_HWOP_MSG_H +#define CFA_TCAM_MGR_HWOP_MSG_H + +int +cfa_tcam_mgr_hwops_init (enum cfa_tcam_mgr_device_type type);
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c new file +921 -0
921 lines not on this page · raw message
drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h new file +20 -0
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c new file +926 -0
926 lines not on this page · raw message
drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h new file +20 -0
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_core/cfa_tcam_mgr_sbmp.h new file +126 -0
126 lines not on this page · raw message
drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.c new file +377 -0
377 lines not on this page · raw message
drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h new file +54 -0
54 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_core.c +42 -12
54 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_core.h +85 -12
97 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p4.c +9 -5
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_core/tf_device_p58.c +52 -32
84 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_em_common.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_core/tf_em_internal.c +3 -7
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_core/tf_identifier.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_core/tf_if_tbl.c +25 -34
59 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_msg.c +176 -41
217 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_rm.c +21 -96
117 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_session.c +90 -22
112 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_session.h +60 -5
65 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_sram_mgr.c +84 -33
117 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_sram_mgr.h +11 -11
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_core/tf_tbl_sram.c +13 -12
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_core/tf_tcam.c +166 -60
226 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c new file +286 -0
286 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h new file +49 -0
49 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tcam_shared.c +22 -1124
1,146 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tcam_shared.h +1 -2
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
PATCH v2 5/11 net/bnxt: update ULP shared session support
In reply to Randy Schacher- Update ulp generic templates
- Modify code to support shared sessions
--- drivers/net/bnxt/bnxt.h | 16 +- drivers/net/bnxt/bnxt_ethdev.c | 8 +- drivers/net/bnxt/bnxt_reps.c | 4 +- drivers/net/bnxt/tf_core/tf_rm.c | 28 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 548 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 109 +- .../bnxt/tf_ulp/generic_templates/meson.build | 18 +- .../generic_templates/ulp_template_db_act.c | 7000 +++- .../generic_templates/ulp_template_db_class.c | 33556 +++++++++++----- .../generic_templates/ulp_template_db_enum.h | 4366 +- .../generic_templates/ulp_template_db_field.h | 689 +- .../generic_templates/ulp_template_db_tbl.c | 16055 ++++++-- .../ulp_template_db_thor_act.c | 8714 ++-- .../ulp_template_db_thor_class.c | 10746 +++-- .../ulp_template_db_wh_plus_act.c | 1157 +- .../ulp_template_db_wh_plus_class.c | 288 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 16 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 25 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 7 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 29 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 15 +- drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 10 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 281 +- drivers/net/bnxt/tf_ulp/ulp_port_db.c | 6 +- drivers/net/bnxt/tf_ulp/ulp_port_db.h | 10 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 17 +- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 22 +- 27 files changed, 63079 insertions(+), 20661 deletions(-)
drivers/net/bnxt/bnxt.h +13 -3
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -633,6 +633,13 @@ struct bnxt_ring_stats {uint64_t rx_agg_aborts; }; +enum bnxt_session_type { +BNXT_SESSION_TYPE_REGULAR =0 , +BNXT_SESSION_TYPE_SHARED_COMMON , +BNXT_SESSION_TYPE_SHARED_WC , +BNXT_SESSION_TYPE_LAST +}; +struct bnxt {void *bar0;
@@ -690,6 +697,9 @@ struct bnxt {#define BNXT_FLAGS2_PTP_ALARM_SCHEDULED BIT(1)#define BNXT_P5_PTP_TIMESYNC_ENABLED (bp) \ ((bp)->flags2 & BNXT_FLAGS2_PTP_TIMESYNC_ENABLED) +#define BNXT_FLAGS2_TESTPMD_EN BIT(3) +#define BNXT_TESTPMD_EN (bp) \ + ((bp)->flags2 & BNXT_FLAGS2_TESTPMD_EN)uint16_t chip_num;#define CHIP_NUM_58818 0xd818
@@ -855,8 +865,7 @@ struct bnxt {uint16_t func_svif;uint16_t port_svif; -struct tf tfp; -struct tf tfp_shared; +struct tf tfp[BNXT_SESSION_TYPE_LAST ];struct bnxt_ulp_context *ulp_ctx;struct bnxt_flow_stat_info *flow_stat;uint16_t max_num_kflows;
@@ -1044,4 +1053,5 @@ int bnxt_flow_ops_get_op(struct rte_eth_dev *dev,int bnxt_dev_start_op (struct rte_eth_dev *eth_dev);int bnxt_dev_stop_op (struct rte_eth_dev *eth_dev);void bnxt_handle_vf_cfg_change (void *arg); +struct tf *bnxt_get_tfp_session (struct bnxt *bp,enum bnxt_session_type type);#endif
drivers/net/bnxt/bnxt_ethdev.c +7 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -6415,6 +6415,12 @@ bool is_bnxt_supported(struct rte_eth_dev *dev)return is_device_supported (dev, &bnxt_rte_pmd); } +struct tf *bnxt_get_tfp_session (struct bnxt *bp,enum bnxt_session_type type) +{ +return (type >=BNXT_SESSION_TYPE_LAST ) ? + &bp->tfp[BNXT_SESSION_TYPE_REGULAR ] : &bp->tfp[type]; +} +RTE_LOG_REGISTER_SUFFIX (bnxt_logtype_driver, driver,NOTICE );RTE_PMD_REGISTER_PCI (net_bnxt, bnxt_rte_pmd);RTE_PMD_REGISTER_PCI_TABLE (net_bnxt, bnxt_pci_id_map);
drivers/net/bnxt/bnxt_reps.c +2 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -327,7 +327,7 @@ static int bnxt_tf_vfr_alloc(struct rte_eth_dev *vfr_ethdev) (void )bnxt_hwrm_cfa_pair_free (parent_bp, vfr);/* Update the ULP portdata base with the new VFR interface */ - rc =ulp_port_db_dev_port_intf_update (parent_bp->ulp_ctx, vfr_ethdev); + rc =ulp_port_db_port_update (parent_bp->ulp_ctx, vfr_ethdev);if (rc) {BNXT_TF_DBG (ERR ,"Failed to update ulp port details vfr:%u\n" , vfr->vf_id);
drivers/net/bnxt/tf_core/tf_rm.c +6 -22
@@ -364,8 +364,7 @@ tf_rm_update_parent_reservations(struct tf *tfp,struct tf_rm_element_cfg *cfg, uint16_t *alloc_cnt, uint16_t num_elements, - uint16_t *req_cnt, - bool shared_session) + uint16_t *req_cnt) { int parent, child;const char *type_str =NULL ;
@@ -376,11 +375,7 @@ tf_rm_update_parent_reservations(struct tf *tfp,/* If I am a parent */ if (cfg[parent].cfg_type ==TF_RM_ELEM_CFG_HCAPI_BA_PARENT ) { -uint8_t p_slices =1 ; - -/* Shared session doesn't support slices */ -if (!shared_session) - p_slices = cfg[parent].slices; +uint8_t p_slices = cfg[parent].slices;RTE_ASSERT (p_slices);
@@ -402,12 +397,9 @@ tf_rm_update_parent_reservations(struct tf *tfp, TF_RM_ELEM_CFG_HCAPI_BA_CHILD && cfg[child].parent_subtype == parent && alloc_cnt[child]) { -uint8_t c_slices =1 ; +uint8_t c_slices = cfg[child].slices;uint16_t cnt =0 ; -if (!shared_session) - c_slices = cfg[child].slices; -RTE_ASSERT (c_slices); dev->ops->tf_dev_get_resource_str(tfp,
@@ -429,7 +421,7 @@ tf_rm_update_parent_reservations(struct tf *tfp, } }/* Save the parent count to be requested */ - req_cnt[parent] = combined_cnt; + req_cnt[parent] = combined_cnt *2 ; } }return 0 ;
@@ -452,7 +444,6 @@ tf_rm_create_db(struct tf *tfp,struct tf_rm_new_db *rm_db;struct tf_rm_element *db;uint32_t pool_size; -bool shared_session =0 ;TF_CHECK_PARMS2 (tfp, parms);
@@ -505,15 +496,12 @@ tf_rm_create_db(struct tf *tfp,tfp_memcpy (req_cnt, parms->alloc_cnt, parms->num_elements *sizeof (uint16_t )); - shared_session =tf_session_is_shared_session (tfs); -/* Update the req_cnt based upon the element configuration */ tf_rm_update_parent_reservations (tfp, dev, parms->cfg, parms->alloc_cnt, parms->num_elements, - req_cnt, - shared_session); + req_cnt);/* Process capabilities against DB requirements. However, as a * DB can hold elements that are not HCAPI we can reduce the
@@ -733,7 +721,6 @@ tf_rm_create_db_no_reservation(struct tf *tfp,struct tf_rm_new_db *rm_db;struct tf_rm_element *db;uint32_t pool_size; -bool shared_session =0 ;TF_CHECK_PARMS2 (tfp, parms);
@@ -763,15 +750,12 @@ tf_rm_create_db_no_reservation(struct tf *tfp,tfp_memcpy (req_cnt, parms->alloc_cnt, parms->num_elements *sizeof (uint16_t )); - shared_session =tf_session_is_shared_session (tfs); -/* Update the req_cnt based upon the element configuration */ tf_rm_update_parent_reservations (tfp, dev, parms->cfg, parms->alloc_cnt, parms->num_elements, - req_cnt, - shared_session); + req_cnt);/* Process capabilities against DB requirements. However, as a * DB can hold elements that are not HCAPI we can reduce the
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +406 -142
903 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +89 -20
175 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/meson.build +8 -10
@@ -2,15 +2,13 @@ # Copyright(c) 2018 Intel Corporation # Copyright(c) 2020 Broadcom -#Include the folder for headers includes += include_directories('.') - -#Add the source files sources += files( - 'ulp_template_db_class.c', - 'ulp_template_db_act.c', - 'ulp_template_db_tbl.c', - 'ulp_template_db_wh_plus_act.c', - 'ulp_template_db_wh_plus_class.c', - 'ulp_template_db_thor_act.c', - 'ulp_template_db_thor_class.c') + 'ulp_template_db_class.c', + 'ulp_template_db_act.c', + 'ulp_template_db_tbl.c', + 'ulp_template_db_wh_plus_act.c', + 'ulp_template_db_wh_plus_class.c', + 'ulp_template_db_thor_act.c', + 'ulp_template_db_thor_class.c') +
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_act.c +6524 -476
1,737 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_class.c +24166 -9390
33,556 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h +2814 -1552
4,366 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_field.h +496 -193
689 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c +13378 -2677
16,055 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_act.c +6413 -2301
8,714 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c +7320 -3426
10,746 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_wh_plus_act.c +990 -167
1,157 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_wh_plus_class.c +194 -94
288 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +12 -4
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_mapper.c +140 -141
281 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +9 -8
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +17 -5
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
PATCH v2 6/11 net/bnxt: add support for RSS action and Queue action
In reply to Randy Schacher- Update ULP layer to support RSS/Queue action
- Update bnxt driver to support RSS action
- Update bnxt driver to support queue action
--- drivers/net/bnxt/bnxt.h | 50 +- drivers/net/bnxt/bnxt_ethdev.c | 156 +-- drivers/net/bnxt/bnxt_filter.h | 6 +- drivers/net/bnxt/bnxt_flow.c | 75 +- drivers/net/bnxt/bnxt_hwrm.c | 187 +++- drivers/net/bnxt/bnxt_hwrm.h | 30 +- drivers/net/bnxt/bnxt_ring.c | 4 +- drivers/net/bnxt/bnxt_rxq.c | 159 +-- drivers/net/bnxt/bnxt_rxr.c | 9 +- drivers/net/bnxt/bnxt_txq.c | 2 +- drivers/net/bnxt/bnxt_txr.c | 2 +- drivers/net/bnxt/bnxt_txr.h | 2 +- drivers/net/bnxt/bnxt_vnic.c | 969 +++++++++++++++++- drivers/net/bnxt/bnxt_vnic.h | 80 +- drivers/net/bnxt/meson.build | 3 +- drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c | 248 ++++- drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h | 35 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 258 ++++- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 280 ++++- drivers/net/bnxt/tf_ulp/meson.build | 25 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 13 +- drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c | 37 +- drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h | 4 +- drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 121 ++- drivers/net/bnxt/tf_ulp/ulp_ha_mgr.h | 5 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 449 +++++++- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 3 +- drivers/net/bnxt/tf_ulp/ulp_matcher.c | 14 +- drivers/net/bnxt/tf_ulp/ulp_port_db.c | 58 ++ drivers/net/bnxt/tf_ulp/ulp_port_db.h | 26 + drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 22 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 346 ++++++- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 37 +- lib/cmdline/cmdline_parse_string.h | 2 +- lib/cmdline/cmdline_private.h | 2 +- 36 files changed, 3298 insertions(+), 422 deletions(-)
drivers/net/bnxt/bnxt.h +37 -13
@@ -24,6 +24,7 @@#include "tf_core.h" #include "bnxt_ulp.h" #include "bnxt_tf_common.h" +#include "bnxt_vnic.h" /* Vendor ID */ #define PCI_VENDOR_ID_BROADCOM 0x14E4
@@ -163,6 +164,8 @@#define BNXT_HWRM_CMD_TO_FORWARD (cmd) \ (bp->pf->vf_req_fwd[(cmd) / 32] |= (1 << ((cmd) % 32))) +#define BNXT_NTOHS rte_be_to_cpu_16 +struct bnxt_led_info {uint8_t num_leds;uint8_t led_id;
@@ -238,11 +241,11 @@ struct bnxt_parent_info {struct bnxt_pf_info {#define BNXT_FIRST_PF_FID 1#define BNXT_MAX_VFS (bp) ((bp)->pf->max_vfs) -#define BNXT_MAX_VF_REPS_WH 64 -#define BNXT_MAX_VF_REPS_TH 256 +#define BNXT_MAX_VF_REPS_P4 64 +#define BNXT_MAX_VF_REPS_P5 256#define BNXT_MAX_VF_REPS (bp) \ - (BNXT_CHIP_P5(bp) ? BNXT_MAX_VF_REPS_TH : \ - BNXT_MAX_VF_REPS_WH) + (BNXT_CHIP_P5(bp) ? BNXT_MAX_VF_REPS_P5 : \ + BNXT_MAX_VF_REPS_P4)#define BNXT_TOTAL_VFS (bp) ((bp)->pf->total_vfs)#define BNXT_FIRST_VF_FID 128#define BNXT_PF_RINGS_USED (bp) bnxt_get_num_queues(bp)
@@ -366,7 +369,7 @@ struct bnxt_ptp_cfg {uint32_t tx_regs[BNXT_PTP_TX_REGS ];uint32_t tx_mapped_regs[BNXT_PTP_TX_REGS ]; -/* On Thor, the Rx timestamp is present in the Rx completion record */ +/* On P5, the Rx timestamp is present in the Rx completion record */ uint64_t rx_timestamp;uint64_t current_time; };
@@ -640,6 +643,17 @@ enum bnxt_session_type {BNXT_SESSION_TYPE_LAST }; +#define VFR_NAMESZ 32 + +/* Virtual Interface (VIF) Info */ +struct bnxt_vif_info { +char vf_rep_name[VFR_NAMESZ ]; +struct rte_eth_dev *eth_dev; +pthread_mutex_t vif_lock; +pthread_mutex_t vif_start_lock; +bool conduit_valid; +}; +struct bnxt {void *bar0;
@@ -679,8 +693,8 @@ struct bnxt {#define BNXT_PF (bp) (!((bp)->flags & BNXT_FLAG_VF))#define BNXT_VF (bp) ((bp)->flags & BNXT_FLAG_VF)#define BNXT_NPAR (bp) ((bp)->flags & BNXT_FLAG_NPAR_PF) -#define BNXT_MH (bp) ((bp)->flags & BNXT_FLAG_MULTI_HOST) -#define BNXT_SINGLE_PF (bp) (BNXT_PF(bp) && !BNXT_NPAR(bp) && !BNXT_MH(bp)) +#define BNXT_MH (bp) ((bp)->flags & BNXT_FLAG_MULTI_HOST) +#define BNXT_SINGLE_PF (bp) (BNXT_PF(bp) && !BNXT_NPAR(bp) && !BNXT_MH(bp))#define BNXT_USE_CHIMP_MB 0 //For non-CFA commands, everything uses Chimp.#define BNXT_USE_KONG (bp) ((bp)->flags & BNXT_FLAG_KONG_MB_EN)#define BNXT_VF_IS_TRUSTED (bp) ((bp)->flags & BNXT_FLAG_TRUSTED_VF_EN)
@@ -689,7 +703,7 @@ struct bnxt {#define BNXT_HAS_NQ (bp) BNXT_CHIP_P5(bp)#define BNXT_HAS_RING_GRPS (bp) (!BNXT_CHIP_P5(bp))#define BNXT_FLOW_XSTATS_EN (bp) ((bp)->flags & BNXT_FLAG_FLOW_XSTATS_EN) -#define BNXT_HAS_DFLT_MAC_SET (bp) ((bp)->flags & BNXT_FLAG_DFLT_MAC_SET) +#define BNXT_HAS_DFLT_MAC_SET (bp) ((bp)->flags & BNXT_FLAG_DFLT_MAC_SET)#define BNXT_GFID_ENABLED (bp) ((bp)->flags & BNXT_FLAG_GFID_ENABLE)uint32_t flags2;
@@ -697,8 +711,8 @@ struct bnxt {#define BNXT_FLAGS2_PTP_ALARM_SCHEDULED BIT(1)#define BNXT_P5_PTP_TIMESYNC_ENABLED (bp) \ ((bp)->flags2 & BNXT_FLAGS2_PTP_TIMESYNC_ENABLED) -#define BNXT_FLAGS2_TESTPMD_EN BIT(3) -#define BNXT_TESTPMD_EN (bp) \ +#define BNXT_FLAGS2_TESTPMD_EN BIT(3) +#define BNXT_TESTPMD_EN (bp) \ ((bp)->flags2 & BNXT_FLAGS2_TESTPMD_EN)uint16_t chip_num;
@@ -719,7 +733,8 @@ struct bnxt {#define BNXT_FW_CAP_LINK_ADMIN BIT(7)#define BNXT_FW_CAP_TRUFLOW_EN BIT(8)#define BNXT_FW_CAP_VLAN_TX_INSERT BIT(9) -#define BNXT_TRUFLOW_EN (bp) ((bp)->fw_cap & BNXT_FW_CAP_TRUFLOW_EN) +#define BNXT_TRUFLOW_EN (bp) ((bp)->fw_cap & BNXT_FW_CAP_TRUFLOW_EN &&\ + (bp)->app_id != 0xFF)pthread_mutex_t flow_lock;
@@ -729,6 +744,7 @@ struct bnxt {#define BNXT_VNIC_CAP_RX_CMPL_V2 BIT(2)#define BNXT_VNIC_CAP_VLAN_RX_STRIP BIT(3)#define BNXT_RX_VLAN_STRIP_EN (bp) ((bp)->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP) +#define BNXT_VNIC_CAP_OUTER_RSS_TRUSTED_VF BIT(4)unsigned int rx_nr_rings;unsigned int rx_cp_nr_rings;unsigned int rx_num_qs_per_vnic;
@@ -758,7 +774,6 @@ struct bnxt {uint16_t nr_vnics; -#define BNXT_GET_DEFAULT_VNIC (bp) (&(bp)->vnic_info[0])struct bnxt_vnic_info *vnic_info; STAILQ_HEAD(, bnxt_vnic_info) free_vnic_list;
@@ -873,6 +888,7 @@ struct bnxt {uint16_t tx_cfa_action;struct bnxt_ring_stats *prev_rx_ring_stats;struct bnxt_ring_stats *prev_tx_ring_stats; +struct bnxt_vnic_queue_db vnic_queue_db;#define BNXT_MAX_MC_ADDRS ((bp)->max_mcast_addr)struct rte_ether_addr *mcast_addr_list;
@@ -905,7 +921,7 @@ inline uint16_t bnxt_max_rings(struct bnxt *bp) }/* -* RSS table size in Thor is 512. +* RSS table size in P5 is 512. * Cap max Rx rings to the same value for RSS. */ if (BNXT_CHIP_P5 (bp))
@@ -997,9 +1013,16 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp);bool is_bnxt_supported (struct rte_eth_dev *dev);bool bnxt_stratus_device (struct bnxt *bp);void bnxt_print_link_info (struct rte_eth_dev *eth_dev); +uint16_t bnxt_rss_ctxts (const struct bnxt *bp);uint16_t bnxt_rss_hash_tbl_size (const struct bnxt *bp);int bnxt_link_update_op (struct rte_eth_dev *eth_dev,int wait_to_complete); +int +bnxt_udp_tunnel_port_del_op (struct rte_eth_dev *eth_dev, +struct rte_eth_udp_tunnel *udp_tunnel); +int +bnxt_udp_tunnel_port_add_op (struct rte_eth_dev *eth_dev, +struct rte_eth_udp_tunnel *udp_tunnel);extern const struct rte_flow_ops bnxt_flow_ops;
@@ -1053,5 +1076,6 @@ int bnxt_flow_ops_get_op(struct rte_eth_dev *dev,int bnxt_dev_start_op (struct rte_eth_dev *eth_dev);int bnxt_dev_stop_op (struct rte_eth_dev *eth_dev);void bnxt_handle_vf_cfg_change (void *arg); +struct bnxt_vnic_info *bnxt_get_default_vnic (struct bnxt *bp);struct tf *bnxt_get_tfp_session (struct bnxt *bp,enum bnxt_session_type type);#endif
drivers/net/bnxt/bnxt_ethdev.c +84 -72
390 lines not on this page · raw message
drivers/net/bnxt/bnxt_filter.h +5 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -173,4 +173,8 @@ struct bnxt_filter_info *bnxt_get_l2_filter(struct bnxt *bp, HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_NUM_VLANS#define L2_FILTER_ALLOC_INPUT_EN_NUM_VLANS \ HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_NUM_VLANS +#define CFA_FLTR_ALLOC_INPUT_IP_ADDR_TYPE_IPV4 \ + HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4 +#define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_GENEVE \ + HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE#endif
drivers/net/bnxt/bnxt_flow.c +69 -6
116 lines not on this page · raw message
drivers/net/bnxt/bnxt_hwrm.c +157 -30
283 lines not on this page · raw message
drivers/net/bnxt/bnxt_hwrm.h +28 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -109,7 +109,31 @@ struct bnxt_pf_resource_info {uint32_t num_hw_ring_grps; }; -#define BNXT_CTX_VAL_INVAL 0xFFFF +#define BNXT_CTX_VAL_INVAL 0xFFFF +#define BNXT_RSS_CTX_IDX_INVALID 0xFFFF + +#define BNXT_TUNNELED_OFFLOADS_CAP_VXLAN_EN (bp) \ + (!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_VXLAN)) +#define BNXT_TUNNELED_OFFLOADS_CAP_NGE_EN (bp) \ + (!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NGE)) +#define BNXT_TUNNELED_OFFLOADS_CAP_GRE_EN (bp) \ + (!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_GRE)) +#define BNXT_TUNNELED_OFFLOADS_CAP_IPINIP_EN (bp) \ + (!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_IPINIP)) + +/* +* If the device supports VXLAN, GRE, IPIP and GENEVE tunnel parsing, then report +* RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM, RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM and +* RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM in the Rx/Tx offload capabilities of the device. +*/ +#define BNXT_TUNNELED_OFFLOADS_CAP_ALL_EN (bp) \ + (BNXT_TUNNELED_OFFLOADS_CAP_VXLAN_EN(bp) && \ + BNXT_TUNNELED_OFFLOADS_CAP_NGE_EN(bp) && \ + BNXT_TUNNELED_OFFLOADS_CAP_GRE_EN(bp) && \ + BNXT_TUNNELED_OFFLOADS_CAP_IPINIP_EN(bp)) + +#define BNXT_SIG_MODE_NRZ HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_NRZ +#define BNXT_SIG_MODE_PAM4 HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_PAM4#define BNXT_TUNNELED_OFFLOADS_CAP_VXLAN_EN (bp) \ (!((bp)->tunnel_disable_flag & HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_VXLAN))
@@ -227,6 +251,8 @@ int bnxt_hwrm_func_qcfg_vf_default_mac(struct bnxt *bp, uint16_t vf,int bnxt_hwrm_func_qcfg_current_vf_vlan (struct bnxt *bp,int vf);int bnxt_hwrm_tunnel_dst_port_alloc (struct bnxt *bp,uint16_t port,uint8_t tunnel_type); +int bnxt_hwrm_tunnel_upar_id_get (struct bnxt *bp,uint8_t *upar_id, +uint8_t tunnel_type);int bnxt_hwrm_tunnel_dst_port_free (struct bnxt *bp,uint16_t port,uint8_t tunnel_type);int bnxt_hwrm_set_default_vlan (struct bnxt *bp,int vf,uint8_t is_vf);
drivers/net/bnxt/bnxt_ring.c +2 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -54,7 +54,7 @@ int bnxt_alloc_ring_grps(struct bnxt *bp)return -EBUSY ; } -/* THOR does not support ring groups. +/* P5 does not support ring groups. * But we will use the array to save RSS context IDs. */ if (BNXT_CHIP_P5 (bp)) {
drivers/net/bnxt/bnxt_rxq.c +91 -68
218 lines not on this page · raw message
drivers/net/bnxt/bnxt_rxr.c +4 -5
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
@@ -691,7 +691,7 @@ static void bnxt_get_rx_ts_p5(struct bnxt *bp, uint32_t rx_ts_cmpl) {struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; -uint64_t last_hwrm_time; +uint64_t last_hwrm_time =0 ;uint64_t pkt_time =0 ;if (!BNXT_CHIP_P5 (bp) || !ptp)
@@ -705,7 +705,6 @@ bnxt_get_rx_ts_p5(struct bnxt *bp, uint32_t rx_ts_cmpl)* from the HWRM response with the lower 32 bits in the * Rx completion to produce the 48 bit timestamp for the Rx packet */ - last_hwrm_time = ptp->current_time; pkt_time = (last_hwrm_time &BNXT_PTP_CURRENT_TIME_MASK ) | rx_ts_cmpl;if (rx_ts_cmpl < (uint32_t )last_hwrm_time) {/* timer has rolled over */
@@ -923,7 +922,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,if (unlikely ((rte_le_to_cpu_16 (rxcmp->flags_type) &RX_PKT_CMPL_FLAGS_MASK ) == -RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP )) +RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP ))bnxt_get_rx_ts_p5 (rxq->bp, rxcmp1->reorder);if (cmp_type ==CMPL_BASE_TYPE_RX_L2_V2 ) {
@@ -1089,6 +1088,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,break ; } + cpr->cp_raw_cons = raw_cons;if (!nb_rx_pkts && !nb_rep_rx_pkts && !evt) {/* * For PMD, there is no need to keep on pushing to REARM
@@ -1097,7 +1097,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, goto done; } - cpr->cp_raw_cons = raw_cons;/* Ring the completion queue doorbell. */ bnxt_db_cq (cpr);
drivers/net/bnxt/bnxt_txq.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_txr.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_txr.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2021 Broadcom +* Copyright(c) 2014-2023 Broadcom * All rights reserved. */
drivers/net/bnxt/bnxt_vnic.c +951 -18
1,029 lines not on this page · raw message
drivers/net/bnxt/bnxt_vnic.h +76 -4
113 lines not on this page · raw message
drivers/net/bnxt/meson.build +2 -1
@@ -25,6 +25,8 @@ endforeach headers = files('rte_pmd_bnxt.h') +deps += ['hash'] + sources = files( 'bnxt_cpr.c', 'bnxt_ethdev.c',
@@ -41,7 +43,6 @@ sources = files( 'bnxt_util.c', 'bnxt_vnic.c', 'bnxt_reps.c', - 'rte_pmd_bnxt.c', )
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c +242 -6
291 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h +34 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2021-2021 Broadcom +* Copyright(c) 2021-2023 Broadcom * All rights reserved. */
@@ -9,6 +9,19 @@#include "bnxt_tf_common.h" #include "ulp_mapper.h" +/* Simple structure to manage the custom global tunnel */ +struct bnxt_global_tunnel_info { +uint16_t dport; +uint16_t ref_cnt; +}; + +/* Internal Tunnel type, */ +enum bnxt_global_register_tunnel_type { +BNXT_GLOBAL_REGISTER_TUNNEL_UNUSED =0 , +BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN , +BNXT_GLOBAL_REGISTER_TUNNEL_MAX +}; +int32_t bnxt_rss_config_action_apply (struct bnxt_ulp_mapper_parms *parms);int32_t bnxt_pmd_get_parent_mac_addr (struct bnxt_ulp_mapper_parms *parms,uint8_t *mac);
@@ -25,4 +38,24 @@ uint16_t bnxt_pmd_get_phy_port_id(uint16_t port);uint16_t bnxt_pmd_get_vport (uint16_t port);enum bnxt_ulp_intf_type bnxt_pmd_get_interface_type (uint16_t port);int32_t bnxt_pmd_set_unicast_rxmask (struct rte_eth_dev *eth_dev); +int32_t bnxt_pmd_queue_action_create (struct bnxt_ulp_mapper_parms *parms, +uint16_t *vnic_idx,uint16_t *vnic_id); +int32_t bnxt_pmd_queue_action_delete (struct tf *tfp,uint16_t vnic_idx); +int32_t bnxt_pmd_rss_action_create (struct bnxt_ulp_mapper_parms *parms, +uint16_t *vnic_idx,uint16_t *vnic_id); +int32_t bnxt_pmd_rss_action_delete (struct tf *tfp,uint16_t vnic_idx); +int32_t bnxt_tunnel_dst_port_free (struct bnxt *bp, +uint16_t port, +uint8_t type); +int32_t bnxt_tunnel_dst_port_alloc (struct bnxt *bp, +uint16_t port, +uint8_t type); +int32_t +bnxt_pmd_global_tunnel_set (uint16_t port_id,uint8_t type, +uint16_t udp_port,uint32_t *handle); +int32_t +bnxt_tunnel_upar_id_get (struct bnxt *bp, +uint8_t type, +uint8_t *upar_id); +int32_t bnxt_pmd_get_hot_upgrade_env (void );#endif /* _BNXT_TF_PMD_ABSTRACT_H_ */
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +251 -7
218 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +272 -8
280 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c +22 -15
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c +106 -15
121 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.c +407 -42
449 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_port_db.c +58 -0
58 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c +15 -7
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +290 -56
346 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +35 -2
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
PATCH v2 7/11 net/bnxt: add ulp support for rte meter
In reply to Randy SchacherAdd RTE meter support into the ULP layer
--- drivers/net/bnxt/bnxt.h | 2 + drivers/net/bnxt/bnxt_ethdev.c | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 + drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 3 + drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c | 909 ++++++++++++++++++ drivers/net/bnxt/tf_ulp/meson.build | 1 + drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 4 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 29 + drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 + 9 files changed, 960 insertions(+), 2 deletions(-) create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c
drivers/net/bnxt/bnxt.h +2 -0
@@ -1025,6 +1025,7 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, struct rte_eth_udp_tunnel *udp_tunnel);extern const struct rte_flow_ops bnxt_flow_ops; +extern const struct rte_flow_ops bnxt_flow_meter_ops;#define bnxt_acquire_flow_lock (bp) \ pthread_mutex_lock(&(bp)->flow_lock)
@@ -1076,6 +1077,7 @@ int bnxt_flow_ops_get_op(struct rte_eth_dev *dev,int bnxt_dev_start_op (struct rte_eth_dev *eth_dev);int bnxt_dev_stop_op (struct rte_eth_dev *eth_dev);void bnxt_handle_vf_cfg_change (void *arg); +int bnxt_flow_meter_ops_get (struct rte_eth_dev *eth_dev,void *arg);struct bnxt_vnic_info *bnxt_get_default_vnic (struct bnxt *bp);struct tf *bnxt_get_tfp_session (struct bnxt *bp,enum bnxt_session_type type);#endif
drivers/net/bnxt/bnxt_ethdev.c +1 -0
@@ -4095,6 +4095,7 @@ static const struct eth_dev_ops bnxt_dev_ops = { .timesync_adjust_time = bnxt_timesync_adjust_time, .timesync_read_rx_timestamp = bnxt_timesync_read_rx_timestamp, .timesync_read_tx_timestamp = bnxt_timesync_read_tx_timestamp, + .mtr_ops_get = bnxt_flow_meter_ops_get, };static uint32_t bnxt_map_reset_regs (struct bnxt *bp,uint32_t reg)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +8 -0
@@ -1681,6 +1681,14 @@ bnxt_ulp_init(struct bnxt *bp,return rc; } +if (ulp_dev_id ==BNXT_ULP_DEVICE_ID_THOR ) { + rc =bnxt_flow_meter_init (bp); +if (rc) { +BNXT_TF_DBG (ERR ,"Failed to config meter\n" ); + goto jump_to_error; + } + } +BNXT_TF_DBG (DEBUG ,"ulp ctx has been initialized\n" );return rc;
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +3 -0
@@ -371,6 +371,9 @@ bnxt_ulp_vxlan_ip_port_set(struct bnxt_ulp_context *ulp_ctx,unsigned int bnxt_ulp_vxlan_ip_port_get (struct bnxt_ulp_context *ulp_ctx); +int32_t +bnxt_flow_meter_init (struct bnxt *bp); +uint32_t bnxt_ulp_cntxt_convert_dev_id (uint32_t ulp_dev_id);
drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c new file +909 -0
909 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/meson.build +1 -0
@@ -11,6 +11,7 @@ sources += files( 'bnxt_tf_pmd_shim.c', 'bnxt_ulp.c', 'bnxt_ulp_flow.c', + 'bnxt_ulp_meter.c', 'ulp_def_rules.c', 'ulp_fc_mgr.c', 'ulp_flow_db.c',
drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c +2 -2
@@ -66,8 +66,8 @@ struct bnxt_ulp_rte_act_info ulp_act_info[] = { .proto_act_func = ulp_rte_port_act_handler }, [RTE_FLOW_ACTION_TYPE_METER] = { - .act_type = BNXT_ULP_ACT_TYPE_NOT_SUPPORTED, - .proto_act_func =NULL + .act_type = BNXT_ULP_ACT_TYPE_SUPPORTED, + .proto_act_func = ulp_rte_meter_act_handler }, [RTE_FLOW_ACTION_TYPE_SECURITY] = { .act_type = BNXT_ULP_ACT_TYPE_NOT_SUPPORTED,
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +29 -0
@@ -2697,6 +2697,35 @@ ulp_rte_queue_act_handler(const struct rte_flow_action *action_item,return BNXT_TF_RC_SUCCESS ; } +/* Function to handle the parsing of RTE Flow action meter. */ +int32_t +ulp_rte_meter_act_handler (const struct rte_flow_action *action_item, +struct ulp_rte_parser_params *params) +{ +const struct rte_flow_action_meter *meter; +struct ulp_rte_act_prop *act_prop = ¶ms->act_prop; +uint32_t tmp_meter_id; + +if (action_item ==NULL || action_item->conf ==NULL ) { +BNXT_TF_DBG (ERR ,"Parse Err: invalid meter configuration\n" ); +return BNXT_TF_RC_ERROR ; + } + + meter = action_item->conf; +if (meter) { +/* validate the mtr_id and update the reference counter */ + tmp_meter_id =tfp_cpu_to_be_32 (meter->mtr_id); +memcpy (&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER ], + &tmp_meter_id, +BNXT_ULP_ACT_PROP_SZ_METER ); + } + +/* set the meter action header bit */ +ULP_BITMAP_SET (params->act_bitmap.bits,BNXT_ULP_ACT_BIT_METER ); + +return BNXT_TF_RC_SUCCESS ; +} +/* Function to handle the parsing of RTE Flow action set mac src.*/ int32_t ulp_rte_set_mac_src_act_handler(const struct rte_flow_action *action_item,
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +5 -0
@@ -292,4 +292,9 @@ ulp_rte_set_mac_src_act_handler(const struct rte_flow_action *action_item,int32_t ulp_rte_set_mac_dst_act_handler (const struct rte_flow_action *action_item,struct ulp_rte_parser_params *params); + +/* Function to handle the parsing of RTE Flow action meter. */ +int32_t +ulp_rte_meter_act_handler (const struct rte_flow_action *action_item, +struct ulp_rte_parser_params *params);#endif /* _ULP_RTE_PARSER_H_ */
Signature · 1 line
2.25.1
PATCH v2 8/11 net/bnxt: update PTP support on Thor
In reply to Randy Schacheradd locking and time stamp checks to ptp feature
--- drivers/net/bnxt/bnxt.h | 5 ++ drivers/net/bnxt/bnxt_ethdev.c | 11 +++++ drivers/net/bnxt/bnxt_hwrm.c | 11 ++++- drivers/net/bnxt/bnxt_ring.c | 3 ++ drivers/net/bnxt/bnxt_rxr.c | 8 +++- drivers/net/bnxt/bnxt_txq.c | 1 + drivers/net/bnxt/bnxt_txr.c | 85 ++++++++++++++++++++++++++++++++-- drivers/net/bnxt/bnxt_txr.h | 1 + 8 files changed, 119 insertions(+), 6 deletions(-)
drivers/net/bnxt/bnxt.h +5 -0
@@ -349,6 +349,7 @@ struct bnxt_ptp_cfg { BNXT_PTP_MSG_PDELAY_RESP) uint8_t tx_tstamp_en:1;int rx_filter; +uint8_t filter_all;#define BNXT_PTP_RX_TS_L 0#define BNXT_PTP_RX_TS_H 1
@@ -372,6 +373,8 @@ struct bnxt_ptp_cfg {/* On P5, the Rx timestamp is present in the Rx completion record */ uint64_t rx_timestamp;uint64_t current_time; +uint64_t old_time; +rte_spinlock_t ptp_lock; };struct bnxt_coal {
@@ -733,6 +736,7 @@ struct bnxt {#define BNXT_FW_CAP_LINK_ADMIN BIT(7)#define BNXT_FW_CAP_TRUFLOW_EN BIT(8)#define BNXT_FW_CAP_VLAN_TX_INSERT BIT(9) +#define BNXT_FW_CAP_RX_ALL_PKT_TS BIT(10)#define BNXT_TRUFLOW_EN (bp) ((bp)->fw_cap & BNXT_FW_CAP_TRUFLOW_EN &&\ (bp)->app_id != 0xFF)
@@ -860,6 +864,7 @@ struct bnxt {struct bnxt_led_info *leds;uint8_t ieee_1588;struct bnxt_ptp_cfg *ptp_cfg; +uint8_t ptp_all_rx_tstamp;uint16_t vf_resv_strategy;struct bnxt_ctx_mem_info *ctx;
drivers/net/bnxt/bnxt_ethdev.c +11 -0
@@ -1441,8 +1441,11 @@ static void bnxt_ptp_get_current_time(void *arg)if (!ptp)return ; +rte_spinlock_lock (&ptp->ptp_lock); + ptp->old_time = ptp->current_time;bnxt_hwrm_port_ts_query (bp,BNXT_PTP_FLAGS_CURRENT_TIME , &ptp->current_time); +rte_spinlock_unlock (&ptp->ptp_lock); rc =rte_eal_alarm_set (US_PER_S , bnxt_ptp_get_current_time, (void *)bp);if (rc !=0 ) {PMD_DRV_LOG (ERR ,"Failed to re-schedule PTP alarm\n" );
@@ -1458,8 +1461,11 @@ static int bnxt_schedule_ptp_alarm(struct bnxt *bp)if (bp->flags2 &BNXT_FLAGS2_PTP_ALARM_SCHEDULED )return 0 ; +rte_spinlock_lock (&ptp->ptp_lock);bnxt_hwrm_port_ts_query (bp,BNXT_PTP_FLAGS_CURRENT_TIME , &ptp->current_time); + ptp->old_time = ptp->current_time; +rte_spinlock_unlock (&ptp->ptp_lock); rc =rte_eal_alarm_set (US_PER_S , bnxt_ptp_get_current_time, (void *)bp);
@@ -3615,12 +3621,15 @@ bnxt_timesync_enable(struct rte_eth_dev *dev) ptp->rx_filter =1 ; ptp->tx_tstamp_en =1 ; + ptp->filter_all =1 ; ptp->rxctl =BNXT_PTP_MSG_EVENTS ; rc =bnxt_hwrm_ptp_cfg (bp);if (rc)return rc; +rte_spinlock_init (&ptp->ptp_lock); + bp->ptp_all_rx_tstamp =1 ;memset (&ptp->tc,0 ,sizeof (struct rte_timecounter ));memset (&ptp->rx_tstamp_tc,0 ,sizeof (struct rte_timecounter ));memset (&ptp->tx_tstamp_tc,0 ,sizeof (struct rte_timecounter ));
@@ -3657,9 +3666,11 @@ bnxt_timesync_disable(struct rte_eth_dev *dev) ptp->rx_filter =0 ; ptp->tx_tstamp_en =0 ; ptp->rxctl =0 ; + ptp->filter_all =0 ;bnxt_hwrm_ptp_cfg (bp); + bp->ptp_all_rx_tstamp =0 ;if (!BNXT_CHIP_P5 (bp))bnxt_unmap_ptp_regs (bp);else
drivers/net/bnxt/bnxt_hwrm.c +10 -1
@@ -669,6 +669,11 @@ int bnxt_hwrm_ptp_cfg(struct bnxt *bp) flags |=HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_TX_TS_CAPTURE_DISABLE ; +if (ptp->filter_all) + flags |=HWRM_PORT_MAC_CFG_INPUT_FLAGS_ALL_RX_TS_CAPTURE_ENABLE ; +else if (bp->fw_cap &BNXT_FW_CAP_RX_ALL_PKT_TS ) + flags |=HWRM_PORT_MAC_CFG_INPUT_FLAGS_ALL_RX_TS_CAPTURE_DISABLE ; + req.flags =rte_cpu_to_le_32 (flags); req.enables =rte_cpu_to_le_32 (HWRM_PORT_MAC_CFG_INPUT_ENABLES_RX_TS_CAPTURE_PTP_MSG_TYPE );
@@ -810,7 +815,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)struct hwrm_func_qcaps_input req = {.req_type =0 };struct hwrm_func_qcaps_output *resp = bp->hwrm_cmd_resp_addr;uint16_t new_max_vfs; -uint32_t flags; +uint32_t flags, flags_ext2;HWRM_PREP (&req,HWRM_FUNC_QCAPS ,BNXT_USE_CHIMP_MB );
@@ -898,6 +903,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)PMD_DRV_LOG (DEBUG ,"Tunnel parsing capability is disabled, flags : %#x\n" , bp->tunnel_disable_flag); + flags_ext2 =rte_le_to_cpu_32 (resp->flags_ext2); +if (flags_ext2 &HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_RX_ALL_PKTS_TIMESTAMPS_SUPPORTED ) + bp->fw_cap |=BNXT_FW_CAP_RX_ALL_PKT_TS ; + unlock:HWRM_UNLOCK ();
drivers/net/bnxt/bnxt_ring.c +3 -0
@@ -227,6 +227,9 @@ int bnxt_alloc_rings(struct bnxt *bp, unsigned int socket_id, uint16_t qidx, tx_ring->bd_dma = mz_phys_addr + tx_ring_start; tx_ring_info->tx_desc_mapping = tx_ring->bd_dma; tx_ring->mem_zone = (const void *)mz; + tx_ring_info->nr_bds =rte_zmalloc ("bnxt_nr_bds" , +sizeof (unsigned short ) * + tx_ring->ring_size,0 );if (!tx_ring->bd)return -ENOMEM ;
drivers/net/bnxt/bnxt_rxr.c +6 -2
@@ -697,7 +697,7 @@ bnxt_get_rx_ts_p5(struct bnxt *bp, uint32_t rx_ts_cmpl)if (!BNXT_CHIP_P5 (bp) || !ptp)return ; -/* On Thor, Rx timestamps are provided directly in the +/* On P5, Rx timestamps are provided directly in the * Rx completion records to the driver. Only 32 bits of * the timestamp is present in the completion. Driver needs * to read the current 48 bit free running timer using the
@@ -705,6 +705,9 @@ bnxt_get_rx_ts_p5(struct bnxt *bp, uint32_t rx_ts_cmpl)* from the HWRM response with the lower 32 bits in the * Rx completion to produce the 48 bit timestamp for the Rx packet */ +rte_spinlock_lock (&ptp->ptp_lock); + last_hwrm_time = ptp->old_time; +rte_spinlock_unlock (&ptp->ptp_lock); pkt_time = (last_hwrm_time &BNXT_PTP_CURRENT_TIME_MASK ) | rx_ts_cmpl;if (rx_ts_cmpl < (uint32_t )last_hwrm_time) {/* timer has rolled over */
@@ -922,7 +925,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,if (unlikely ((rte_le_to_cpu_16 (rxcmp->flags_type) &RX_PKT_CMPL_FLAGS_MASK ) == -RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP )) +RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP ) || + bp->ptp_all_rx_tstamp)bnxt_get_rx_ts_p5 (rxq->bp, rxcmp1->reorder);if (cmp_type ==CMPL_BASE_TYPE_RX_L2_V2 ) {
drivers/net/bnxt/bnxt_txq.c +1 -0
@@ -96,6 +96,7 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)if (txq->tx_ring) {bnxt_free_ring (txq->tx_ring->tx_ring_struct);rte_free (txq->tx_ring->tx_ring_struct); +rte_free (txq->tx_ring->nr_bds);rte_free (txq->tx_ring); }
drivers/net/bnxt/bnxt_txr.c +82 -3
124 lines not on this page · raw message
drivers/net/bnxt/bnxt_txr.h +1 -0
@@ -24,6 +24,7 @@ struct bnxt_tx_ring_info {rte_iova_t tx_desc_mapping; +unsigned short *nr_bds;struct bnxt_ring *tx_ring_struct; };
Signature · 1 line
2.25.1
PATCH v2 9/11 net/bnxt: fix multi-root card support
In reply to Randy SchacherFrom: Kishore Padmanabha <[email protected]>
Changed the logic to use device serial number to identify that different ports belong to same physical card instead of the PCI domain address.
--- drivers/net/bnxt/bnxt.h | 3 +++ drivers/net/bnxt/bnxt_hwrm.c | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 11 ++++++++--- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 2 ++ 4 files changed, 14 insertions(+), 3 deletions(-)
drivers/net/bnxt/bnxt.h +3 -0
@@ -138,6 +138,7 @@#define BNXT_NUM_CMPL_DMA_AGGR 36#define BNXT_CMPL_AGGR_DMA_TMR_DURING_INT 50#define BNXT_NUM_CMPL_DMA_AGGR_DURING_INT 12 +#define BNXT_DEVICE_SERIAL_NUM_SIZE 8#define BNXT_DEFAULT_VNIC_STATE_MASK \ HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_MASK
@@ -874,6 +875,8 @@ struct bnxt {uint16_t num_reps;struct bnxt_rep_info *rep_info;uint16_t *cfa_code_map; +/* Device Serial Number */ +uint8_t dsn[BNXT_DEVICE_SERIAL_NUM_SIZE ];/* Struct to hold adapter error recovery related info */ struct bnxt_error_recovery_info *recovery_info;#define BNXT_MARK_TABLE_SZ (sizeof(struct bnxt_mark_info) * 64 * 1024)
drivers/net/bnxt/bnxt_hwrm.c +1 -0
@@ -863,6 +863,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) bp->max_l2_ctx, bp->max_vnics); bp->max_stat_ctx =rte_le_to_cpu_16 (resp->max_stat_ctx); bp->max_mcast_addr =rte_le_to_cpu_32 (resp->max_mcast_filters); +memcpy (bp->dsn, resp->device_serial_number,sizeof (bp->dsn));if (BNXT_PF (bp)) bp->pf->total_vnics =rte_le_to_cpu_16 (resp->max_vnics);
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +8 -3
@@ -1318,9 +1318,13 @@ ulp_get_session(struct bnxt *bp, struct rte_pci_addr *pci_addr)/* if multi root capability is enabled, then ignore the pci bus id */ STAILQ_FOREACH(session, &bnxt_ulp_session_list, next) { -if (session->pci_info.domain == pci_addr->domain && - (BNXT_MULTIROOT_EN (bp) || - session->pci_info.bus == pci_addr->bus)) { +if (BNXT_MULTIROOT_EN (bp)) { +if (!memcmp (bp->dsn, session->dsn, +sizeof (session->dsn))) { +return session; + } + }else if (session->pci_info.domain == pci_addr->domain && + session->pci_info.bus == pci_addr->bus) {return session; } }
@@ -1364,6 +1368,7 @@ ulp_session_init(struct bnxt *bp,/* Add it to the queue */ session->pci_info.domain = pci_addr->domain; session->pci_info.bus = pci_addr->bus; +memcpy (session->dsn, bp->dsn,sizeof (session->dsn)); rc =pthread_mutex_init (&session->bnxt_ulp_mutex,NULL );if (rc) {BNXT_TF_DBG (ERR ,"mutex create failed\n" );
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +2 -0
@@ -131,11 +131,13 @@ struct bnxt_ulp_pci_info {uint8_t bus; }; +#define BNXT_ULP_DEVICE_SERIAL_NUM_SIZE 8struct bnxt_ulp_session_state {STAILQ_ENTRY (bnxt_ulp_session_state) next;bool bnxt_ulp_init;pthread_mutex_t bnxt_ulp_mutex;struct bnxt_ulp_pci_info pci_info; +uint8_t dsn[BNXT_ULP_DEVICE_SERIAL_NUM_SIZE ];struct bnxt_ulp_data *cfg_data;struct tf *g_tfp[BNXT_ULP_SESSION_MAX ];uint32_t session_opened[BNXT_ULP_SESSION_MAX ];
Signature · 1 line
2.25.1
PATCH v2 10/11 net/bnxt: add ulp support for ecpri
In reply to Randy SchacherAdd RTE ECPRI support into the ULP layer
--- drivers/net/bnxt/bnxt.h | 4 + drivers/net/bnxt/bnxt_ethdev.c | 35 +++++ drivers/net/bnxt/bnxt_hwrm.c | 17 +++ drivers/net/bnxt/bnxt_txr.c | 10 +- drivers/net/bnxt/bnxt_vnic.c | 5 +- drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c | 7 +- drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 24 ++++ drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 9 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 18 +++ drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 4 + drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 120 +++++++++++++++++- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 + drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 2 + 14 files changed, 254 insertions(+), 7 deletions(-)
drivers/net/bnxt/bnxt.h +4 -0
@@ -855,10 +855,14 @@ struct bnxt {uint8_t port_cnt;uint8_t vxlan_port_cnt;uint8_t geneve_port_cnt; +uint8_t ecpri_port_cnt;uint16_t vxlan_port;uint16_t geneve_port; +uint16_t ecpri_port;uint16_t vxlan_fw_dst_port_id;uint16_t geneve_fw_dst_port_id; +uint16_t ecpri_fw_dst_port_id; +uint16_t ecpri_upar_in_use;uint32_t fw_ver;uint32_t hwrm_spec_code;
drivers/net/bnxt/bnxt_ethdev.c +35 -0
@@ -2405,6 +2405,20 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, tunnel_type =HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE ;break ; +case RTE_ETH_TUNNEL_TYPE_ECPRI : +if (bp->ecpri_port_cnt) { +PMD_DRV_LOG (ERR ,"Tunnel Port %d already programmed\n" , + udp_tunnel->udp_port); +if (bp->ecpri_port != udp_tunnel->udp_port) { +PMD_DRV_LOG (ERR ,"Only one port allowed\n" ); +return -ENOSPC ; + } + bp->ecpri_port_cnt++; +return 0 ; + } + tunnel_type = +HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ECPRI ; +break ;default :PMD_DRV_LOG (ERR ,"Tunnel type is not supported\n" );return -ENOTSUP ;
@@ -2423,6 +2437,10 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE) bp->geneve_port_cnt++; +if (tunnel_type == +HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ECPRI ) + bp->ecpri_port_cnt++; +return rc; }
@@ -2474,6 +2492,23 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev,HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GENEVE ; port = bp->geneve_fw_dst_port_id;break ; +case RTE_ETH_TUNNEL_TYPE_ECPRI : +if (!bp->ecpri_port_cnt) { +PMD_DRV_LOG (ERR ,"No Tunnel port configured yet\n" ); +return -EINVAL ; + } +if (bp->ecpri_port != udp_tunnel->udp_port) { +PMD_DRV_LOG (ERR ,"Req Port: %d. Configured port: %d\n" , + udp_tunnel->udp_port, bp->ecpri_port); +return -EINVAL ; + } +if (--bp->ecpri_port_cnt) +return 0 ; + + tunnel_type = +HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ECPRI ; + port = bp->ecpri_fw_dst_port_id; +break ;default :PMD_DRV_LOG (ERR ,"Tunnel type is not supported\n" );return -ENOTSUP ;
drivers/net/bnxt/bnxt_hwrm.c +17 -0
@@ -2969,6 +2969,10 @@ bnxt_free_tunnel_ports(struct bnxt *bp)if (bp->geneve_port_cnt)bnxt_hwrm_tunnel_dst_port_free (bp, bp->geneve_fw_dst_port_id,HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GENEVE ); + +if (bp->ecpri_port_cnt) +bnxt_hwrm_tunnel_dst_port_free (bp, bp->ecpri_fw_dst_port_id, +HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ECPRI ); }void bnxt_free_all_hwrm_resources (struct bnxt *bp)
@@ -4075,6 +4079,12 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,rte_le_to_cpu_16 (resp->tunnel_dst_port_id); bp->geneve_port = port;break ; +case HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ECPRI : + bp->ecpri_fw_dst_port_id = +rte_le_to_cpu_16 (resp->tunnel_dst_port_id); + bp->ecpri_port = port; + bp->ecpri_upar_in_use = resp->upar_in_use; +break ;default :break ; }
@@ -4142,6 +4152,13 @@ int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, uint16_t port, bp->geneve_port_cnt =0 ; } +if (tunnel_type == +HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ECPRI ) { + bp->ecpri_port =0 ; + bp->ecpri_upar_in_use =0 ; + bp->ecpri_port_cnt =0 ; + } +return rc; }
drivers/net/bnxt/bnxt_txr.c +9 -1
@@ -150,10 +150,14 @@ bnxt_check_pkt_needs_ts(struct rte_mbuf *m)struct rte_ether_hdr _eth_hdr;uint16_t eth_type, proto;uint32_t off =0 ; - +/* +* Check that the received packet is a eCPRI packet +*/ eth_hdr =rte_pktmbuf_read (m, off,sizeof (_eth_hdr), &_eth_hdr); eth_type =rte_be_to_cpu_16 (eth_hdr->ether_type); off +=sizeof (*eth_hdr); +if (eth_type ==RTE_ETHER_TYPE_ECPRI ) +return true;/* Check for single tagged and double tagged VLANs */ if (eth_type ==RTE_ETHER_TYPE_VLAN ) {const struct rte_vlan_hdr *vh;
@@ -164,6 +168,8 @@ bnxt_check_pkt_needs_ts(struct rte_mbuf *m)return false; off +=sizeof (*vh); proto =rte_be_to_cpu_16 (vh->eth_proto); +if (proto ==RTE_ETHER_TYPE_ECPRI ) +return true;if (proto ==RTE_ETHER_TYPE_VLAN ) {const struct rte_vlan_hdr *vh;struct rte_vlan_hdr vh_copy;
@@ -173,6 +179,8 @@ bnxt_check_pkt_needs_ts(struct rte_mbuf *m)return false; off +=sizeof (*vh); proto =rte_be_to_cpu_16 (vh->eth_proto); +if (proto ==RTE_ETHER_TYPE_ECPRI ) +return true; } }return false;
drivers/net/bnxt/bnxt_vnic.c +3 -2
@@ -258,7 +258,8 @@ uint16_t bnxt_rte_to_hwrm_hash_types(uint64_t rte_type) {uint16_t hwrm_type =0 ; -if (rte_type &RTE_ETH_RSS_IPV4 ) +if ((rte_type &RTE_ETH_RSS_IPV4 ) || + (rte_type &RTE_ETH_RSS_ECPRI )) hwrm_type |=HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4 ;if (rte_type &RTE_ETH_RSS_NONFRAG_IPV4_TCP ) hwrm_type |=HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4 ;
@@ -277,7 +278,7 @@ uint16_t bnxt_rte_to_hwrm_hash_types(uint64_t rte_type)int bnxt_rte_to_hwrm_hash_level (struct bnxt *bp,uint64_t hash_f,uint32_t lvl) {uint32_t mode =HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT ; -bool l3 = (hash_f & (RTE_ETH_RSS_IPV4 |RTE_ETH_RSS_IPV6 )); +bool l3 = (hash_f & (RTE_ETH_RSS_IPV4 |RTE_ETH_RSS_IPV6 |RTE_ETH_RSS_ECPRI )); bool l4 = (hash_f & (RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_NONFRAG_IPV6_UDP | RTE_ETH_RSS_NONFRAG_IPV4_TCP |
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c +5 -2
@@ -543,12 +543,15 @@ bnxt_pmd_global_tunnel_set(uint16_t port_id, uint8_t type,case BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN : hwtype =HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN ;break ; +case BNXT_GLOBAL_REGISTER_TUNNEL_ECPRI : + hwtype =HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ECPRI ; +break ;default :BNXT_TF_DBG (ERR ,"Tunnel Type (%d) invalid\n" , type);return -EINVAL ; } -if (!udp_port) { +if (!udp_port && type !=BNXT_GLOBAL_REGISTER_TUNNEL_ECPRI ) {/* Free based on the handle */ if (!handle) {BNXT_TF_DBG (ERR ,"Free with invalid handle\n" );
@@ -589,7 +592,7 @@ bnxt_pmd_global_tunnel_set(uint16_t port_id, uint8_t type,if (!rc) { ulp_global_tunnel_db[type].ref_cnt++; ulp_global_tunnel_db[type].dport = udp_port; -bnxt_pmd_global_reg_data_to_hndl (port_id,0 , +bnxt_pmd_global_reg_data_to_hndl (port_id, bp->ecpri_upar_in_use, type, handle); } }
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h +1 -0
@@ -19,6 +19,7 @@ struct bnxt_global_tunnel_info {enum bnxt_global_register_tunnel_type {BNXT_GLOBAL_REGISTER_TUNNEL_UNUSED =0 ,BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN , +BNXT_GLOBAL_REGISTER_TUNNEL_ECPRI ,BNXT_GLOBAL_REGISTER_TUNNEL_MAX };
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +24 -0
@@ -456,6 +456,7 @@ bnxt_ulp_cntxt_app_caps_init(struct bnxt *bp,bnxt_ulp_vxlan_ip_port_set (ulp_ctx, info[i].vxlan_ip_port);bnxt_ulp_vxlan_port_set (ulp_ctx, info[i].vxlan_port); +bnxt_ulp_ecpri_udp_port_set (ulp_ctx, info[i].ecpri_udp_port);/* set the shared session support from firmware */ fw = info[i].upgrade_fw_update;
@@ -479,6 +480,29 @@ bnxt_ulp_cntxt_app_caps_init(struct bnxt *bp,return 0 ; } +/* Function to retrieve the vxlan_ip (ecpri) port from the context. */ +int +bnxt_ulp_ecpri_udp_port_set (struct bnxt_ulp_context *ulp_ctx, +uint32_t ecpri_udp_port) +{ +if (!ulp_ctx || !ulp_ctx->cfg_data) +return -EINVAL ; + + ulp_ctx->cfg_data->ecpri_udp_port = ecpri_udp_port; + +return 0 ; +} + +/* Function to retrieve the vxlan_ip (ecpri) port from the context. */ +unsigned int +bnxt_ulp_ecpri_udp_port_get (struct bnxt_ulp_context *ulp_ctx) +{ +if (!ulp_ctx || !ulp_ctx->cfg_data) +return 0 ; + +return (unsigned int )ulp_ctx->cfg_data->ecpri_udp_port; +} +/* Function to set the number for vxlan_ip (custom vxlan) port into the context */ int bnxt_ulp_vxlan_ip_port_set(struct bnxt_ulp_context *ulp_ctx,
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +8 -1
@@ -113,6 +113,7 @@ struct bnxt_ulp_data {struct bnxt_flow_app_tun_ent app_tun[BNXT_ULP_MAX_TUN_CACHE_ENTRIES ];uint32_t vxlan_port;uint32_t vxlan_ip_port; +uint32_t ecpri_udp_port;uint8_t hu_reg_state;uint8_t hu_reg_cnt;uint32_t hu_session_type;
@@ -367,12 +368,19 @@ bnxt_ulp_vxlan_port_set(struct bnxt_ulp_context *ulp_ctx, uint32_t vxlan_port);unsigned int bnxt_ulp_vxlan_port_get (struct bnxt_ulp_context *ulp_ctx); +int bnxt_ulp_vxlan_ip_port_set (struct bnxt_ulp_context *ulp_ctx,uint32_t vxlan_ip_port);unsigned int bnxt_ulp_vxlan_ip_port_get (struct bnxt_ulp_context *ulp_ctx); +int +bnxt_ulp_ecpri_udp_port_set (struct bnxt_ulp_context *ulp_ctx, +uint32_t ecpri_udp_port); +unsigned int +bnxt_ulp_ecpri_udp_port_get (struct bnxt_ulp_context *ulp_ctx); +int32_t bnxt_flow_meter_init (struct bnxt *bp);
@@ -391,5 +399,4 @@ bnxt_ulp_ha_reg_cnt_get(struct bnxt_ulp_context *ulp_ctx);struct tf *bnxt_ulp_bp_tfp_get (struct bnxt *bp,enum bnxt_ulp_session_type type); -#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/ulp_mapper.c +18 -0
@@ -3298,6 +3298,11 @@ ulp_mapper_global_res_free(struct bnxt_ulp_context *ulp __rte_unused, rc =bnxt_pmd_global_tunnel_set (port_id, ttype, dport, &handle);break ; +case BNXT_ULP_RESOURCE_SUB_TYPE_GLOBAL_REGISTER_CUST_ECPRI : + ttype =BNXT_GLOBAL_REGISTER_TUNNEL_ECPRI ; + rc =bnxt_pmd_global_tunnel_set (port_id, ttype, dport, + &handle); +break ;default : rc = -EINVAL ; BNXT_TF_DBG(ERR, "Invalid ulp global resource type %d\n",
@@ -3362,6 +3367,19 @@ ulp_mapper_global_register_tbl_process(struct bnxt_ulp_mapper_parms *parms,return rc; }break ; +case BNXT_ULP_RESOURCE_SUB_TYPE_GLOBAL_REGISTER_CUST_ECPRI : + tmp_data =ulp_blob_data_get (&data, &data_len); + udp_port = *((uint16_t *)tmp_data); + udp_port =tfp_be_to_cpu_16 (udp_port); + ttype =BNXT_GLOBAL_REGISTER_TUNNEL_ECPRI ; + + rc =bnxt_pmd_global_tunnel_set (parms->port_id, ttype, + udp_port, &handle); +if (rc) { +BNXT_TF_DBG (ERR ,"Unable to set eCPRI UDP port\n" ); +return rc; + } +break ;default : rc = -EINVAL ; BNXT_TF_DBG(ERR, "Invalid ulp global resource type %d\n",
drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c +4 -0
@@ -408,6 +408,10 @@ struct bnxt_ulp_rte_hdr_info ulp_hdr_info[] = { .hdr_type = BNXT_ULP_HDR_TYPE_NOT_SUPPORTED, .proto_hdr_func =NULL }, + [RTE_FLOW_ITEM_TYPE_ECPRI] = { + .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED, + .proto_hdr_func = ulp_rte_ecpri_hdr_handler + }, [RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR] = { .hdr_type =BNXT_ULP_HDR_TYPE_SUPPORTED , .proto_hdr_func = ulp_rte_port_hdr_handler
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +119 -1
138 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +5 -0
@@ -149,6 +149,11 @@ int32_t ulp_rte_icmp6_hdr_handler(const struct rte_flow_item *item, struct ulp_rte_parser_params *params); +/* Function to handle the parsing of RTE Flow item ECPRI Header. */ +int32_t +ulp_rte_ecpri_hdr_handler (const struct rte_flow_item *item, +struct ulp_rte_parser_params *params); +/* Function to handle the parsing of RTE Flow item void Header. */ int32_t ulp_rte_void_hdr_handler(const struct rte_flow_item *item,
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +2 -0
@@ -29,6 +29,7 @@#define BNXT_ULP_PROTO_HDR_VXLAN_NUM 4#define BNXT_ULP_PROTO_HDR_GRE_NUM 2#define BNXT_ULP_PROTO_HDR_ICMP_NUM 5 +#define BNXT_ULP_PROTO_HDR_ECPRI_NUM 2#define BNXT_ULP_PROTO_HDR_MAX 128#define BNXT_ULP_PROTO_HDR_ENCAP_MAX 64#define BNXT_ULP_PROTO_HDR_FIELD_SVIF_IDX 1
@@ -364,6 +365,7 @@ struct bnxt_ulp_app_capabilities_info {uint8_t app_id;uint32_t vxlan_port;uint32_t vxlan_ip_port; +uint32_t ecpri_udp_port;enum bnxt_ulp_device_id device_id;uint32_t upgrade_fw_update;uint8_t ha_pool_id;
Signature · 1 line
2.25.1
PATCH v2 11/11 net/bnxt: Avoid submitting hwrm rss request when rss mode disabled
In reply to Randy SchacherFrom: Shuanglin Wang <[email protected]>
On WH+, if rss mode isn't enabled, then there is no rss context. Submitting HWRM_VNIC_RSS_CFG request to firmware would hit a failure.
The fix is to check the rss context. If no rss context, then don't submit the hwrm request.
--- drivers/net/bnxt/bnxt_hwrm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/bnxt/bnxt_hwrm.c +3 -0
@@ -2405,6 +2405,9 @@ bnxt_hwrm_vnic_rss_cfg_non_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr;int rc =0 ; +if (vnic->num_lb_ctxts ==0 ) +return rc; +HWRM_PREP (&req,HWRM_VNIC_RSS_CFG ,BNXT_USE_CHIMP_MB ); req.hash_type =rte_cpu_to_le_32 (vnic->hash_type);
Signature · 1 line
2.25.1