add features for host-based flow management
Subsystems (2)
PATCH v5 44/51 net/bnxt: fill mapper parameters with default rules
In reply to Ajit KhapardeFrom: Venkat Duvvuru <[email protected]>
Default rules are needed for the packets to be punted between the following entities in the non-offloaded path
1. Device PORT to DPDK App
2. DPDK App to Device PORT
3. VF Representor to VF
4. VF to VF Representor
This patch fills all the relevant information in the computed fields & the act_prop fields for the flow mapper to create the necessary tables in the hardware to enable the default rules.
--- drivers/net/bnxt/bnxt_ethdev.c | 6 +- drivers/net/bnxt/meson.build | 1 + drivers/net/bnxt/tf_ulp/Makefile | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 24 ++ drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 30 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 385 ++++++++++++++++++ drivers/net/bnxt/tf_ulp/ulp_mapper.c | 10 +- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 3 +- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 5 + 9 files changed, 444 insertions(+), 21 deletions(-) create mode 100644 drivers/net/bnxt/tf_ulp/ulp_def_rules.c
drivers/net/bnxt/bnxt_ethdev.c +3 -3
@@ -1274,9 +1274,6 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)struct rte_pci_device *pci_dev =RTE_ETH_DEV_TO_PCI (eth_dev);struct rte_intr_handle *intr_handle = &pci_dev->intr_handle; -if (BNXT_TRUFLOW_EN (bp)) -bnxt_ulp_deinit (bp); - eth_dev->data->dev_started =0 ;/* Prevent crashes when queues are still in use */ eth_dev->rx_pkt_burst = &bnxt_dummy_recv_pkts;
@@ -1332,6 +1329,9 @@ static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev)rte_eal_alarm_cancel (bnxt_dev_recover, (void *)bp);bnxt_cancel_fc_thread (bp); +if (BNXT_TRUFLOW_EN (bp)) +bnxt_ulp_deinit (bp); +if (eth_dev->data->dev_started)bnxt_dev_stop_op (eth_dev);
drivers/net/bnxt/meson.build +1 -0
@@ -61,6 +61,7 @@ sources = files('bnxt_cpr.c', 'tf_ulp/ulp_rte_parser.c', 'tf_ulp/bnxt_ulp_flow.c', 'tf_ulp/ulp_port_db.c', + 'tf_ulp/ulp_def_rules.c', 'rte_pmd_bnxt.c')
drivers/net/bnxt/tf_ulp/Makefile +1 -0
@@ -16,3 +16,4 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_ulp/bnxt_ulp.c SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_ulp/ulp_mark_mgr.c SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_ulp/ulp_flow_db.c SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_ulp/ulp_port_db.c +SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_ulp/ulp_def_rules.c
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +24 -0
@@ -12,6 +12,8 @@#include "rte_ethdev.h" +#include "ulp_template_db_enum.h" +struct bnxt_ulp_data {uint32_t tbl_scope_id;struct bnxt_ulp_mark_tbl *mark_tbl;
@@ -49,6 +51,12 @@ struct rte_tf_flow {uint32_t flow_id; }; +struct ulp_tlv_param { +enum bnxt_ulp_df_param_type type; +uint32_t length; +uint8_t value[16 ]; +}; +/* * Allow the deletion of context only for the bnxt device that * created the session
@@ -127,4 +135,20 @@ bnxt_ulp_cntxt_ptr2_port_db_set(struct bnxt_ulp_context *ulp_ctx,struct bnxt_ulp_port_db *bnxt_ulp_cntxt_ptr2_port_db_get (struct bnxt_ulp_context *ulp_ctx); +/* Function to create default flows. */ +int32_t +ulp_default_flow_create (struct rte_eth_dev *eth_dev, +struct ulp_tlv_param *param_list, +uint32_t ulp_class_tid, +uint32_t *flow_id); + +/* Function to destroy default flows. */ +int32_t +ulp_default_flow_destroy (struct rte_eth_dev *eth_dev, +uint32_t flow_id); + +int +bnxt_ulp_flow_destroy (struct rte_eth_dev *dev,struct rte_flow *flow, +struct rte_flow_error *error); +#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +18 -12
@@ -207,7 +207,7 @@ bnxt_ulp_flow_validate(struct rte_eth_dev *dev, }/* Function to destroy the rte flow. */ -static int +int bnxt_ulp_flow_destroy (struct rte_eth_dev *dev,struct rte_flow *flow,struct rte_flow_error *error)
@@ -220,9 +220,10 @@ bnxt_ulp_flow_destroy(struct rte_eth_dev *dev, ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (dev);if (!ulp_ctx) {BNXT_TF_DBG (ERR ,"ULP context is not initialized\n" ); -rte_flow_error_set (error,EINVAL , -RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , -"Failed to destroy flow." ); +if (error) +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , +"Failed to destroy flow." );return -EINVAL ; }
@@ -233,17 +234,22 @@ bnxt_ulp_flow_destroy(struct rte_eth_dev *dev,if (ulp_flow_db_validate_flow_func (ulp_ctx, flow_id, func_id) == false) {BNXT_TF_DBG (ERR ,"Incorrect device params\n" ); -rte_flow_error_set (error,EINVAL , -RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , -"Failed to destroy flow." ); +if (error) +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , +"Failed to destroy flow." );return -EINVAL ; } - ret =ulp_mapper_flow_destroy (ulp_ctx, flow_id); -if (ret) -rte_flow_error_set (error, -ret, -RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , -"Failed to destroy flow." ); + ret =ulp_mapper_flow_destroy (ulp_ctx, flow_id, +BNXT_ULP_REGULAR_FLOW_TABLE ); +if (ret) { +BNXT_TF_DBG (ERR ,"Failed to destroy flow.\n" ); +if (error) +rte_flow_error_set (error, -ret, +RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , +"Failed to destroy flow." ); + }return ret; }
drivers/net/bnxt/tf_ulp/ulp_def_rules.c new file +385 -0
385 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.c +5 -5
@@ -2274,16 +2274,15 @@ ulp_mapper_glb_resource_info_deinit(struct bnxt_ulp_context *ulp_ctx, }int32_t -ulp_mapper_flow_destroy (struct bnxt_ulp_context *ulp_ctx,uint32_t fid) +ulp_mapper_flow_destroy (struct bnxt_ulp_context *ulp_ctx,uint32_t fid, +enum bnxt_ulp_flow_db_tables flow_tbl_type) {if (!ulp_ctx) {BNXT_TF_DBG (ERR ,"Invalid parms, unable to free flow\n" );return -EINVAL ; } -return ulp_mapper_resources_free (ulp_ctx, - fid, -BNXT_ULP_REGULAR_FLOW_TABLE ); +return ulp_mapper_resources_free (ulp_ctx, fid, flow_tbl_type); }/* Function to handle the default global templates that are allocated during
@@ -2486,7 +2485,8 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx, flow_error:/* Free all resources that were allocated during flow creation */ - trc =ulp_mapper_flow_destroy (ulp_ctx, parms.fid); + trc =ulp_mapper_flow_destroy (ulp_ctx, parms.fid, +BNXT_ULP_REGULAR_FLOW_TABLE );if (trc)BNXT_TF_DBG (ERR ,"Failed to free all resources rc=%d\n" , trc);
drivers/net/bnxt/tf_ulp/ulp_mapper.h +2 -1
@@ -109,7 +109,8 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,/* Function that frees all resources associated with the flow. */ int32_t -ulp_mapper_flow_destroy (struct bnxt_ulp_context *ulp_ctx,uint32_t fid); +ulp_mapper_flow_destroy (struct bnxt_ulp_context *ulp_ctx,uint32_t fid, +enum bnxt_ulp_flow_db_tables flow_tbl_type);/* * Function that frees all resources and can be called on default or regular
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +5 -0
@@ -145,6 +145,11 @@ enum bnxt_ulp_device_id {BNXT_ULP_DEVICE_ID_LAST =4 }; +enum bnxt_ulp_df_param_type { +BNXT_ULP_DF_PARAM_TYPE_DEV_PORT_ID =0 , +BNXT_ULP_DF_PARAM_TYPE_LAST =1 +}; +enum bnxt_ulp_direction {BNXT_ULP_DIRECTION_INGRESS =0 ,BNXT_ULP_DIRECTION_EGRESS =1 ,
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v5 45/51 net/bnxt: add VF-rep and stat templates
In reply to Ajit KhapardeFrom: Kishore Padmanabha <[email protected]>
The support for VF representor and counters is added to the ulp templates.
--- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 21 +- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 2 +- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 424 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 5198 +++++++++++++---- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 409 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 463 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 87 +- 7 files changed, 4948 insertions(+), 1656 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_mapper.c +2 -19
@@ -22,7 +22,7 @@ ulp_mapper_glb_resource_info_list_get(uint32_t *num_entries) {if (!num_entries)return NULL ; - *num_entries =BNXT_ULP_GLB_RESOURCE_INFO_TBL_MAX_SZ ; + *num_entries =BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ ;return ulp_glb_resource_tbl; }
@@ -119,11 +119,6 @@ ulp_mapper_resource_ident_allocate(struct bnxt_ulp_context *ulp_ctx,tf_free_identifier (tfp, &fparms);return rc; } -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -BNXT_TF_DBG (DEBUG ,"Allocated Glb Res Ident [%s][%d][%d] = 0x%04x\n" , - (iparms.dir ==TF_DIR_RX ) ?"RX" :"TX" , - glb_res->glb_regfile_index, iparms.ident_type, iparms.id); -#endif return rc; }
@@ -182,11 +177,6 @@ ulp_mapper_resource_index_tbl_alloc(struct bnxt_ulp_context *ulp_ctx,tf_free_tbl_entry (tfp, &free_parms);return rc; } -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -BNXT_TF_DBG (DEBUG ,"Allocated Glb Res Index [%s][%d][%d] = 0x%04x\n" , - (aparms.dir ==TF_DIR_RX ) ?"RX" :"TX" , - glb_res->glb_regfile_index, aparms.type, aparms.idx); -#endif return rc; }
@@ -1441,9 +1431,6 @@ ulp_mapper_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,return rc; } } -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -ulp_mapper_result_dump ("EEM Result" , tbl, &data); -#endif /* do the transpose for the internal EM keys */ if (tbl->resource_func ==BNXT_ULP_RESOURCE_FUNC_INT_EM_TABLE )
@@ -1594,10 +1581,6 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,/* if encap bit swap is enabled perform the bit swap */ if (parms->device_params->encap_byte_swap && encap_flds) {ulp_blob_perform_encap_swap (&data); -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -BNXT_TF_DBG (INFO ,"Dump after encap swap\n" ); -ulp_mapper_blob_dump (&data); -#endif }/*
@@ -2255,7 +2238,7 @@ ulp_mapper_glb_resource_info_deinit(struct bnxt_ulp_context *ulp_ctx,/* Iterate the global resources and process each one */ for (dir =TF_DIR_RX ; dir <TF_DIR_MAX ; dir++) { -for (idx =0 ; idx <BNXT_ULP_GLB_RESOURCE_INFO_TBL_MAX_SZ ; +for (idx =0 ; idx <BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ ; idx++) { ent = &mapper_data->glb_res_tbl[dir][idx]; if (ent->resource_func ==
drivers/net/bnxt/tf_ulp/ulp_mapper.h +1 -1
@@ -46,7 +46,7 @@ struct bnxt_ulp_mapper_glb_resource_entry {struct bnxt_ulp_mapper_data {struct bnxt_ulp_mapper_glb_resource_entry - glb_res_tbl[TF_DIR_MAX ][BNXT_ULP_GLB_RESOURCE_INFO_TBL_MAX_SZ ]; + glb_res_tbl[TF_DIR_MAX ][BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ ];struct bnxt_ulp_mapper_cache_entry *cache_tbl[BNXT_ULP_CACHE_TBL_MAX_SZ ]; };
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +391 -33
541 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +4027 -1171
2,394 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +218 -191
409 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_field.h +259 -204
463 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +50 -37
87 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.21.1 (Apple Git-122.3)
Part of the diff is not shown here. View the raw message.
PATCH v5 46/51 net/bnxt: create default flow rules for the VF-rep
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
Invoked 3 new APIs for the default flow create/destroy and to get the action ptr for a default flow.
Changed ulp_intf_update() to accept rte_eth_dev as input and invoke the same from the VF rep start function.
ULP Mark Manager will indicate if the cfa_code returned in the Rx completion descriptor was for one of the default flow rules created for the VF representor conduit. The mark_id returned in such a case would be the VF rep's DPDK Port id, which can be used to get the corresponding rte_eth_dev struct in bnxt_vf_recv
--- drivers/net/bnxt/bnxt.h | 4 +- drivers/net/bnxt/bnxt_reps.c | 134 ++++++++++++++++++++++++----------- drivers/net/bnxt/bnxt_reps.h | 3 +- drivers/net/bnxt/bnxt_rxr.c | 25 +++---- drivers/net/bnxt/bnxt_txq.h | 1 + 5 files changed, 111 insertions(+), 56 deletions(-)
drivers/net/bnxt/bnxt.h +3 -1
@@ -806,8 +806,10 @@ struct bnxt_vf_representor {uint16_t fw_fid;uint16_t dflt_vnic_id;uint16_t svif; -uint16_t tx_cfa_action; +uint32_t vfr_tx_cfa_action;uint16_t rx_cfa_code; +uint32_t rep2vf_flow_id; +uint32_t vf2rep_flow_id;/* Private data store of associated PF/Trusted VF */ struct rte_eth_dev *parent_dev;uint8_t mac_addr[RTE_ETHER_ADDR_LEN ];
drivers/net/bnxt/bnxt_reps.c +93 -41
222 lines not on this page · raw message
drivers/net/bnxt/bnxt_reps.h +1 -2
@@ -13,8 +13,7 @@#define BNXT_VF_IDX_INVALID 0xffffuint16_t -bnxt_vfr_recv (struct bnxt *bp,uint16_t cfa_code,uint16_t queue_id, -struct rte_mbuf *mbuf); +bnxt_vfr_recv (uint16_t port_id,uint16_t queue_id,struct rte_mbuf *mbuf);int bnxt_vf_representor_init (struct rte_eth_dev *eth_dev,void *params);int bnxt_vf_representor_uninit (struct rte_eth_dev *eth_dev); int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
drivers/net/bnxt/bnxt_rxr.c +13 -12
@@ -403,9 +403,9 @@ bnxt_get_rx_ts_thor(struct bnxt *bp, uint32_t rx_ts_cmpl) }#endif -static void +static uint32_t bnxt_ulp_set_mark_in_mbuf (struct bnxt *bp,struct rx_pkt_cmpl_hi *rxcmp1, -struct rte_mbuf *mbuf) +struct rte_mbuf *mbuf,uint32_t *vfr_flag) {uint32_t cfa_code;uint32_t meta_fmt;
@@ -415,8 +415,6 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1,uint32_t flags2;uint32_t gfid_support =0 ;int rc; -uint32_t vfr_flag; -if (BNXT_GFID_ENABLED (bp)) gfid_support =1 ;
@@ -485,19 +483,21 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1, } rc =ulp_mark_db_mark_get (bp->ulp_ctx, gfid, - cfa_code, &vfr_flag, &mark_id); + cfa_code, vfr_flag, &mark_id);if (!rc) {/* Got the mark, write it to the mbuf and return */ mbuf->hash.fdir.hi = mark_id; mbuf->udata64 = (cfa_code &0xffffffffull ) <<32 ; mbuf->hash.fdir.id = rxcmp1->cfa_code; mbuf->ol_flags |=PKT_RX_FDIR |PKT_RX_FDIR_ID ; -return ; +return mark_id; } skip_mark: mbuf->hash.fdir.hi =0 ; mbuf->hash.fdir.id =0 ; + +return 0 ; } void bnxt_set_mark_in_mbuf(struct bnxt *bp,
@@ -553,7 +553,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,int rc =0 ;uint8_t agg_buf =0 ;uint16_t cmp_type; -uint32_t flags2_f =0 ; +uint32_t flags2_f =0 , vfr_flag =0 , mark_id =0 ;uint16_t flags_type;struct bnxt *bp = rxq->bp;
@@ -632,7 +632,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, }if (BNXT_TRUFLOW_EN (bp)) -bnxt_ulp_set_mark_in_mbuf (rxq->bp, rxcmp1, mbuf); + mark_id =bnxt_ulp_set_mark_in_mbuf (rxq->bp, rxcmp1, mbuf, + &vfr_flag);else bnxt_set_mark_in_mbuf (rxq->bp, rxcmp1, mbuf);
@@ -736,10 +737,10 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, rx: *rx_pkt = mbuf; -if ((BNXT_VF_IS_TRUSTED (rxq->bp) ||BNXT_PF (rxq->bp)) && - rxq->bp->cfa_code_map && rxcmp1->cfa_code) { -if (!bnxt_vfr_recv (rxq->bp, rxcmp1->cfa_code, rxq->queue_id, - mbuf)) { +if (BNXT_TRUFLOW_EN (bp) && + (BNXT_VF_IS_TRUSTED (bp) ||BNXT_PF (bp)) && + vfr_flag) { +if (!bnxt_vfr_recv (mark_id, rxq->queue_id, mbuf)) {/* Now return an error so that nb_rx_pkts is not * incremented. * This packet was meant to be given to the representor.
drivers/net/bnxt/bnxt_txq.h +1 -0
@@ -30,6 +30,7 @@ struct bnxt_tx_queue {int index;int tx_wake_thresh;uint32_t tx_cfa_action; +uint32_t vfr_tx_cfa_action;struct bnxt_tx_ring_info *tx_ring;unsigned int cp_nr_rings;
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v5 47/51 net/bnxt: add port default rules for ingress and egress
In reply to Ajit KhapardeFrom: Venkat Duvvuru <[email protected]>
ingress & egress port default rules are needed to send the packet from port_to_dpdk & dpdk_to_port respectively.
--- drivers/net/bnxt/bnxt_ethdev.c | 76 +++++++++++++++++++++++++++++- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 3 ++ 2 files changed, 78 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_ethdev.c +75 -1
@@ -29,6 +29,7 @@#include "hsi_struct_def_dpdk.h" #include "bnxt_nvm_defs.h" #include "bnxt_tf_common.h" +#include "ulp_flow_db.h" #define DRV_MODULE_NAME "bnxt" static const char bnxt_version[] =
@@ -1161,6 +1162,73 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)return rc; } +static int32_t +bnxt_create_port_app_df_rule (struct bnxt *bp,uint8_t flow_type, +uint32_t *flow_id) +{ +uint16_t port_id = bp->eth_dev->data->port_id; +struct ulp_tlv_param param_list[] = { + { + .type =BNXT_ULP_DF_PARAM_TYPE_DEV_PORT_ID , + .length =2 , + .value = {(port_id >>8 ) &0xff , port_id &0xff } + }, + { + .type =BNXT_ULP_DF_PARAM_TYPE_LAST , + .length =0 , + .value = {0 } + } + }; + +return ulp_default_flow_create (bp->eth_dev, param_list, flow_type, + flow_id); +} + +static int32_t +bnxt_create_df_rules (struct bnxt *bp) +{ +struct bnxt_ulp_data *cfg_data; +int rc; + + cfg_data = bp->ulp_ctx->cfg_data; + rc =bnxt_create_port_app_df_rule (bp,BNXT_ULP_DF_TPL_PORT_TO_VS , + &cfg_data->port_to_app_flow_id); +if (rc) { +PMD_DRV_LOG (ERR , +"Failed to create port to app default rule\n" ); +return rc; + } + +BNXT_TF_DBG (DEBUG ,"***** created port to app default rule ******\n" ); + rc =bnxt_create_port_app_df_rule (bp,BNXT_ULP_DF_TPL_VS_TO_PORT , + &cfg_data->app_to_port_flow_id); +if (!rc) { + rc =ulp_default_flow_db_cfa_action_get (bp->ulp_ctx, + cfg_data->app_to_port_flow_id, + &cfg_data->tx_cfa_action); +if (rc) + goto err; + +BNXT_TF_DBG (DEBUG , +"***** created app to port default rule *****\n" ); +return 0 ; + } + +err: +BNXT_TF_DBG (DEBUG ,"Failed to create app to port default rule\n" ); +return rc; +} + +static void +bnxt_destroy_df_rules (struct bnxt *bp) +{ +struct bnxt_ulp_data *cfg_data; + + cfg_data = bp->ulp_ctx->cfg_data; +ulp_default_flow_destroy (bp->eth_dev, cfg_data->port_to_app_flow_id); +ulp_default_flow_destroy (bp->eth_dev, cfg_data->app_to_port_flow_id); +} +static int bnxt_dev_start_op (struct rte_eth_dev *eth_dev) {struct bnxt *bp = eth_dev->data->dev_private;
@@ -1329,8 +1397,11 @@ static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev)rte_eal_alarm_cancel (bnxt_dev_recover, (void *)bp);bnxt_cancel_fc_thread (bp); -if (BNXT_TRUFLOW_EN (bp)) +if (BNXT_TRUFLOW_EN (bp)) { +if (bp->rep_info !=NULL ) +bnxt_destroy_df_rules (bp);bnxt_ulp_deinit (bp); + }if (eth_dev->data->dev_started)bnxt_dev_stop_op (eth_dev);
@@ -1580,6 +1651,9 @@ static int bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev)if (rc !=0 ) vnic->flags = old_flags; +if (BNXT_TRUFLOW_EN (bp) && bp->rep_info !=NULL ) +bnxt_create_df_rules (bp); +return rc; }
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +3 -0
@@ -22,6 +22,9 @@ struct bnxt_ulp_data {struct bnxt_ulp_flow_db *flow_db;void *mapper_data;struct bnxt_ulp_port_db *port_db; +uint32_t port_to_app_flow_id; +uint32_t app_to_port_flow_id; +uint32_t tx_cfa_action; };struct bnxt_ulp_context {
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v5 48/51 net/bnxt: fill cfa action in the Tx descriptor
In reply to Ajit KhapardeFrom: Venkat Duvvuru <[email protected]>
Currently, only vfrep transmit requires cfa_action to be filled in the tx buffer descriptor. However with truflow, dpdk(non vfrep) to port also requires cfa_action to be filled in the tx buffer descriptor.
This patch uses the correct cfa_action pointer while transmitting the packet. Based on whether the packet is transmitted on non-vfrep or vfrep, tx_cfa_action or vfr_tx_cfa_action inside txq will be filled in the tx buffer descriptor.
--- drivers/net/bnxt/bnxt_txr.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/net/bnxt/bnxt_txr.c +15 -3
@@ -131,7 +131,9 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,PKT_TX_VLAN_PKT |PKT_TX_OUTER_IP_CKSUM |PKT_TX_TUNNEL_GRE |PKT_TX_TUNNEL_VXLAN |PKT_TX_TUNNEL_GENEVE |PKT_TX_IEEE1588_TMST | - PKT_TX_QINQ_PKT) || txq->tx_cfa_action) + PKT_TX_QINQ_PKT) || + txq->bp->ulp_ctx->cfg_data->tx_cfa_action || + txq->vfr_tx_cfa_action) long_bd = true; nr_bds = long_bd + tx_pkt->nb_segs;
@@ -184,7 +186,15 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,if (long_bd) { txbd->flags_type |=TX_BD_LONG_TYPE_TX_BD_LONG ; vlan_tag_flags =0 ; - cfa_action = txq->tx_cfa_action; + +if (BNXT_TRUFLOW_EN (txq->bp)) { +if (txq->vfr_tx_cfa_action) + cfa_action = txq->vfr_tx_cfa_action; +else + cfa_action = + txq->bp->ulp_ctx->cfg_data->tx_cfa_action; + } +/* HW can accelerate only outer vlan in QinQ mode */ if (tx_buf->mbuf->ol_flags &PKT_TX_QINQ_PKT ) { vlan_tag_flags = TX_BD_LONG_CFA_META_KEY_VLAN_TAG |
@@ -212,7 +222,9 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, &txr->tx_desc_ring[txr->tx_prod]; txbd1->lflags =0 ; txbd1->cfa_meta = vlan_tag_flags; - txbd1->cfa_action = cfa_action; + +if (BNXT_TRUFLOW_EN (txq->bp)) + txbd1->cfa_action = cfa_action;if (tx_pkt->ol_flags &PKT_TX_TCP_SEG ) {uint16_t hdr_size;
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v5 49/51 net/bnxt: add ULP Flow counter Manager
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
The Flow counter manager allocates memory to hold the software view of the counters where the on-chip counter data will be accumulated along with another memory block that will be shadowing the on-chip counter data i.e where the raw counter data will be DMAed into from the chip.
It also keeps track of the first HW counter ID as that will be needed to retrieve the counter data in bulk using a TF API. It issues this cmd in an rte_alarm thread that keeps running every second.
--- drivers/net/bnxt/meson.build | 1 + drivers/net/bnxt/tf_ulp/Makefile | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 35 ++ drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 8 + drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 465 ++++++++++++++++++++++++++ drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 148 ++++++++ drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 27 ++ 7 files changed, 685 insertions(+) create mode 100644 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c create mode 100644 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h
drivers/net/bnxt/meson.build +1 -0
@@ -46,6 +46,7 @@ sources = files('bnxt_cpr.c', 'tf_core/ll.c', 'tf_core/tf_global_cfg.c', 'tf_core/tf_em_host.c', + 'tf_ulp/ulp_fc_mgr.c', 'hcapi/hcapi_cfa_p4.c',
drivers/net/bnxt/tf_ulp/Makefile +1 -0
@@ -17,3 +17,4 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_ulp/ulp_mark_mgr.c SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_ulp/ulp_flow_db.c SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_ulp/ulp_port_db.c SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_ulp/ulp_def_rules.c +SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_ulp/ulp_fc_mgr.c
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +35 -0
@@ -18,6 +18,7 @@#include "ulp_template_db_enum.h" #include "ulp_template_struct.h" #include "ulp_mark_mgr.h" +#include "ulp_fc_mgr.h" #include "ulp_flow_db.h" #include "ulp_mapper.h" #include "ulp_port_db.h"
@@ -705,6 +706,12 @@ bnxt_ulp_init(struct bnxt *bp) goto jump_to_error; } + rc =ulp_fc_mgr_init (bp->ulp_ctx); +if (rc) { +BNXT_TF_DBG (ERR ,"Failed to initialize ulp flow counter mgr\n" ); + goto jump_to_error; + } +return rc; jump_to_error:
@@ -752,6 +759,9 @@ bnxt_ulp_deinit(struct bnxt *bp)/* cleanup the ulp mapper */ ulp_mapper_deinit (bp->ulp_ctx); +/* Delete the Flow Counter Manager */ +ulp_fc_mgr_deinit (bp->ulp_ctx); +/* Delete the Port database */ ulp_port_db_deinit (bp->ulp_ctx);
@@ -963,3 +973,28 @@ bnxt_ulp_cntxt_ptr2_port_db_get(struct bnxt_ulp_context *ulp_ctx)return ulp_ctx->cfg_data->port_db; } + +/* Function to set the flow counter info into the context */ +int32_t +bnxt_ulp_cntxt_ptr2_fc_info_set (struct bnxt_ulp_context *ulp_ctx, +struct bnxt_ulp_fc_info *ulp_fc_info) +{ +if (!ulp_ctx || !ulp_ctx->cfg_data) { +BNXT_TF_DBG (ERR ,"Invalid ulp context data\n" ); +return -EINVAL ; + } + + ulp_ctx->cfg_data->fc_info = ulp_fc_info; + +return 0 ; +} + +/* Function to retrieve the flow counter info from the context. */ +struct bnxt_ulp_fc_info * +bnxt_ulp_cntxt_ptr2_fc_info_get (struct bnxt_ulp_context *ulp_ctx) +{ +if (!ulp_ctx || !ulp_ctx->cfg_data) +return NULL ; + +return ulp_ctx->cfg_data->fc_info; +}
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +8 -0
@@ -22,6 +22,7 @@ struct bnxt_ulp_data {struct bnxt_ulp_flow_db *flow_db;void *mapper_data;struct bnxt_ulp_port_db *port_db; +struct bnxt_ulp_fc_info *fc_info;uint32_t port_to_app_flow_id;uint32_t app_to_port_flow_id;uint32_t tx_cfa_action;
@@ -154,4 +155,11 @@ int bnxt_ulp_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, struct rte_flow_error *error); +int32_t +bnxt_ulp_cntxt_ptr2_fc_info_set (struct bnxt_ulp_context *ulp_ctx, +struct bnxt_ulp_fc_info *ulp_fc_info); + +struct bnxt_ulp_fc_info * +bnxt_ulp_cntxt_ptr2_fc_info_get (struct bnxt_ulp_context *ulp_ctx); +#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c new file +465 -0
465 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h new file +148 -0
148 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +27 -0
@@ -10,6 +10,7 @@#include "ulp_utils.h" #include "ulp_template_struct.h" #include "ulp_mapper.h" +#include "ulp_fc_mgr.h" #define ULP_FLOW_DB_RES_DIR_BIT 31#define ULP_FLOW_DB_RES_DIR_MASK 0x80000000
@@ -484,6 +485,21 @@ int32_t ulp_flow_db_resource_add(struct bnxt_ulp_context *ulp_ctxt,ulp_flow_db_res_params_to_info (fid_resource, params); } +if (params->resource_type ==TF_TBL_TYPE_ACT_STATS_64 && + params->resource_sub_type == +BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_INT_COUNT ) { +/* Store the first HW counter ID for this table */ +if (!ulp_fc_mgr_start_idx_isset (ulp_ctxt, params->direction)) +ulp_fc_mgr_start_idx_set (ulp_ctxt, params->direction, + params->resource_hndl); + +ulp_fc_mgr_cntr_set (ulp_ctxt, params->direction, + params->resource_hndl); + +if (!ulp_fc_mgr_thread_isstarted (ulp_ctxt)) +ulp_fc_mgr_thread_start (ulp_ctxt); + } +/* all good, return success */ return 0 ; }
@@ -574,6 +590,17 @@ int32_t ulp_flow_db_resource_del(struct bnxt_ulp_context *ulp_ctxt, nxt_idx); } +/* Now that the HW Flow counter resource is deleted, reset it's +* corresponding slot in the SW accumulation table in the Flow Counter +* manager +*/ +if (params->resource_type ==TF_TBL_TYPE_ACT_STATS_64 && + params->resource_sub_type == +BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_INT_COUNT ) { +ulp_fc_mgr_cntr_reset (ulp_ctxt, params->direction, + params->resource_hndl); + } +/* all good, return success */ return 0 ; }
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v5 50/51 net/bnxt: add support for count action in flow query
In reply to Ajit KhapardeFrom: Somnath Kotur <[email protected]>
Use the flow counter manager to fetch the accumulated stats for a flow.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 45 +++++++- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 141 +++++++++++++++++++++++- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 17 ++- 3 files changed, 196 insertions(+), 7 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +44 -1
@@ -9,6 +9,7 @@#include "ulp_matcher.h" #include "ulp_flow_db.h" #include "ulp_mapper.h" +#include "ulp_fc_mgr.h" #include <rte_malloc.h> static int32_t
@@ -289,11 +290,53 @@ bnxt_ulp_flow_flush(struct rte_eth_dev *eth_dev,return ret; } +/* Function to query the rte flows. */ +static int32_t +bnxt_ulp_flow_query (struct rte_eth_dev *eth_dev, +struct rte_flow *flow, +const struct rte_flow_action *action, +void *data, +struct rte_flow_error *error) +{ +int rc =0 ; +struct bnxt_ulp_context *ulp_ctx; +struct rte_flow_query_count *count; +uint32_t flow_id; + + ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (eth_dev); +if (!ulp_ctx) { +BNXT_TF_DBG (ERR ,"ULP context is not initialized\n" ); +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , +"Failed to query flow." ); +return -EINVAL ; + } + + flow_id = (uint32_t )(uintptr_t )flow; + +switch (action->type) { +case RTE_FLOW_ACTION_TYPE_COUNT : + count = data; + rc =ulp_fc_mgr_query_count_get (ulp_ctx, flow_id, count); +if (rc) { +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , +"Failed to query flow." ); + } +break ; +default : +rte_flow_error_set (error, -rc,RTE_FLOW_ERROR_TYPE_ACTION_NUM , +NULL ,"Unsupported action item" ); + } + +return rc; +} +const struct rte_flow_ops bnxt_ulp_rte_flow_ops = { .validate = bnxt_ulp_flow_validate, .create = bnxt_ulp_flow_create, .destroy = bnxt_ulp_flow_destroy, .flush = bnxt_ulp_flow_flush, - .query =NULL , + .query = bnxt_ulp_flow_query, .isolate =NULL };
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c +136 -5
200 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h +16 -1
@@ -23,6 +23,7 @@ struct sw_acc_counter {uint64_t pkt_count;uint64_t byte_count;bool valid; +uint32_t hw_cntr_id; };struct hw_fc_mem_info {
@@ -142,7 +143,21 @@ bool ulp_fc_mgr_start_idx_isset(struct bnxt_ulp_context *ctxt, enum tf_dir dir);* ctxt [in] The ulp context for the flow counter manager * */ -bool ulp_fc_mgr_thread_isstarted (struct bnxt_ulp_context *ctxt); +/* +* Fill the rte_flow_query_count 'data' argument passed +* in the rte_flow_query() with the values obtained and +* accumulated locally. +* +* ctxt [in] The ulp context for the flow counter manager +* +* flow_id [in] The HW flow ID +* +* count [out] The rte_flow_query_count 'data' that is set +* +*/ +int ulp_fc_mgr_query_count_get (struct bnxt_ulp_context *ulp_ctx, +uint32_t flow_id, +struct rte_flow_query_count *count);#endif /* _ULP_FC_MGR_H_ */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v5 51/51 doc: update release notes
In reply to Ajit KhapardeUpdate release notes with enhancements in Broadcom PMD.
--- doc/guides/rel_notes/release_20_08.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
doc/guides/rel_notes/release_20_08.rst +10 -1
@@ -92,6 +92,16 @@ New Features * Added support for DCF datapath configuration. * Added support for more PPPoE packet type for switch filter. +* **Updated Broadcom bnxt driver.** + + Updated the Broadcom bnxt driver with new features and improvements, including: + + * Added support for VF representors. + * Added support for multiple devices. + * Added support for new resource manager API. + * Added support for VXLAN encap/decap. + * Added support for rte_flow_query for COUNT action. + * **Added support for BPF_ABS/BPF_IND load instructions.** Added support for two BPF non-generic instructions:
@@ -108,7 +118,6 @@ New Features * Dump ``rte_flow`` memory consumption. * Measure packet per second forwarding. - Removed Items -------------
Signature · 1 line
2.21.1 (Apple Git-122.3)
Re: [dpdk-dev] [PATCH v5 00/51] net/bnxt: add features for host-based flow management
In reply to Ajit KhapardeQuoted 9 lines · Ajit Khaparde
v1->v2:
- update commit message
- rebase patches against latest changes in the tree
- fix signed-off-by tags
- update release notes
v2->v3:
- fix compilation issues
Quoted 7 lines
v3->v4:
- rebase against latest dpdk-next-net
v4->v5:
- fix uninitlalized variable in patch [29/51]
- rebase against latest dpdk-next-net
Patchset applied to dpdk-next-net-brcm. Thanks
Quoted 215 lines
Ajit Khaparde (1):
doc: update release notesJay Ding (5):
net/bnxt: implement support for TCAM access
net/bnxt: support two level priority for TCAMs
net/bnxt: add external action alloc and free
net/bnxt: implement IF tables set and get
net/bnxt: add global config set and get APIsKishore Padmanabha (8):
net/bnxt: integrate with the latest tf core changes net/bnxt: add support for if table processing net/bnxt: disable Tx vector mode if truflow is enabled net/bnxt: add index opcode and operand to mapper table net/bnxt: add support for global resource templates net/bnxt: add support for internal exact match entries net/bnxt: add support for conditional execution of mapper tables net/bnxt: add VF-rep and stat templatesLance Richardson (1):
net/bnxt: initialize parent PF informationMichael Wildt (7):
net/bnxt: add multi device support
net/bnxt: update multi device design support
net/bnxt: multiple device implementation
net/bnxt: update identifier with remap support
net/bnxt: update RM with residual checker
net/bnxt: update table get to use new design
net/bnxt: add TF register and unregisterMike Baucom (1):
net/bnxt: add support for internal encap recordsPeter Spreadborough (7):
net/bnxt: add support for exact match
net/bnxt: modify EM insert and delete to use HWRM direct net/bnxt: add HCAPI interface support
net/bnxt: support EM and TCAM lookup with table scope net/bnxt: update RM to support HCAPI only net/bnxt: remove table scope from session net/bnxt: add support for EEM System memoryRandy Schacher (2):
net/bnxt: add core changes for EM and EEM lookups net/bnxt: align CFA resources with RMShahaji Bhosle (2):
net/bnxt: support bulk table get and mirror
net/bnxt: support two-level priority for TCAMsSomnath Kotur (7):
net/bnxt: add basic infrastructure for VF reps net/bnxt: add support for VF-reps data path net/bnxt: get IDs for VF-Rep endpoint net/bnxt: parse reps along with other dev-args net/bnxt: create default flow rules for the VF-rep net/bnxt: add ULP Flow counter Manager net/bnxt: add support for count action in flow queryVenkat Duvvuru (10):
net/bnxt: modify port db dev interface net/bnxt: get port and function info
net/bnxt: add support for hwrm port phy qcaps net/bnxt: modify port db to handle more info net/bnxt: enable port MAC qcfg command for trusted VF net/bnxt: enhancements for port db
net/bnxt: manage VF to VFR conduit
net/bnxt: fill mapper parameters with default rules net/bnxt: add port default rules for ingress and egress net/bnxt: fill cfa action in the Tx descriptorconfig/common_base | 1 + doc/guides/rel_notes/release_20_08.rst | 11 +- drivers/net/bnxt/Makefile | 8 +- drivers/net/bnxt/bnxt.h | 121 +- drivers/net/bnxt/bnxt_ethdev.c | 519 +- drivers/net/bnxt/bnxt_hwrm.c | 122 +- drivers/net/bnxt/bnxt_hwrm.h | 7 + drivers/net/bnxt/bnxt_reps.c | 773 +++ drivers/net/bnxt/bnxt_reps.h | 45 + drivers/net/bnxt/bnxt_rxr.c | 39 +- drivers/net/bnxt/bnxt_rxr.h | 1 + drivers/net/bnxt/bnxt_txq.h | 2 + drivers/net/bnxt/bnxt_txr.c | 18 +- drivers/net/bnxt/hcapi/Makefile | 10 + drivers/net/bnxt/hcapi/cfa_p40_hw.h | 781 +++ drivers/net/bnxt/hcapi/cfa_p40_tbl.h | 303 + drivers/net/bnxt/hcapi/hcapi_cfa.h | 276 + drivers/net/bnxt/hcapi/hcapi_cfa_defs.h | 672 +++ drivers/net/bnxt/hcapi/hcapi_cfa_p4.c | 399 ++ drivers/net/bnxt/hcapi/hcapi_cfa_p4.h | 467 ++ drivers/net/bnxt/hsi_struct_def_dpdk.h | 3091 ++++++++-- drivers/net/bnxt/meson.build | 21 +- drivers/net/bnxt/tf_core/Makefile | 29 +- drivers/net/bnxt/tf_core/bitalloc.c | 107 + drivers/net/bnxt/tf_core/bitalloc.h | 5 + drivers/net/bnxt/tf_core/cfa_resource_types.h | 293 + drivers/net/bnxt/tf_core/hwrm_tf.h | 995 +--- drivers/net/bnxt/tf_core/ll.c | 52 + drivers/net/bnxt/tf_core/ll.h | 46 + drivers/net/bnxt/tf_core/lookup3.h | 1 - drivers/net/bnxt/tf_core/stack.c | 8 + drivers/net/bnxt/tf_core/stack.h | 10 + drivers/net/bnxt/tf_core/tf_common.h | 43 + drivers/net/bnxt/tf_core/tf_core.c | 1495 +++-- drivers/net/bnxt/tf_core/tf_core.h | 874 ++- drivers/net/bnxt/tf_core/tf_device.c | 271 + drivers/net/bnxt/tf_core/tf_device.h | 650 ++ drivers/net/bnxt/tf_core/tf_device_p4.c | 147 + drivers/net/bnxt/tf_core/tf_device_p4.h | 104 + drivers/net/bnxt/tf_core/tf_em.c | 515 -- drivers/net/bnxt/tf_core/tf_em.h | 492 +- drivers/net/bnxt/tf_core/tf_em_common.c | 1048 ++++ drivers/net/bnxt/tf_core/tf_em_common.h | 134 + drivers/net/bnxt/tf_core/tf_em_host.c | 531 ++ drivers/net/bnxt/tf_core/tf_em_internal.c | 352 ++ drivers/net/bnxt/tf_core/tf_em_system.c | 533 ++ drivers/net/bnxt/tf_core/tf_ext_flow_handle.h | 12 + drivers/net/bnxt/tf_core/tf_global_cfg.c | 199 + drivers/net/bnxt/tf_core/tf_global_cfg.h | 170 + drivers/net/bnxt/tf_core/tf_identifier.c | 186 + drivers/net/bnxt/tf_core/tf_identifier.h | 147 + drivers/net/bnxt/tf_core/tf_if_tbl.c | 178 + drivers/net/bnxt/tf_core/tf_if_tbl.h | 236 + drivers/net/bnxt/tf_core/tf_msg.c | 1681 +++--- drivers/net/bnxt/tf_core/tf_msg.h | 409 +- drivers/net/bnxt/tf_core/tf_resources.h | 531 -- drivers/net/bnxt/tf_core/tf_rm.c | 3840 +++--------- drivers/net/bnxt/tf_core/tf_rm.h | 554 +- drivers/net/bnxt/tf_core/tf_session.c | 776 +++ drivers/net/bnxt/tf_core/tf_session.h | 565 +- drivers/net/bnxt/tf_core/tf_shadow_tbl.c | 63 + drivers/net/bnxt/tf_core/tf_shadow_tbl.h | 240 + drivers/net/bnxt/tf_core/tf_shadow_tcam.c | 63 + drivers/net/bnxt/tf_core/tf_shadow_tcam.h | 239 + drivers/net/bnxt/tf_core/tf_tbl.c | 1930 +----- drivers/net/bnxt/tf_core/tf_tbl.h | 469 +- drivers/net/bnxt/tf_core/tf_tcam.c | 430 ++ drivers/net/bnxt/tf_core/tf_tcam.h | 360 ++ drivers/net/bnxt/tf_core/tf_util.c | 176 + drivers/net/bnxt/tf_core/tf_util.h | 98 + drivers/net/bnxt/tf_core/tfp.c | 33 +- drivers/net/bnxt/tf_core/tfp.h | 153 +- drivers/net/bnxt/tf_ulp/Makefile | 2 + drivers/net/bnxt/tf_ulp/bnxt_tf_common.h | 16 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 129 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 35 + drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 84 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 385 ++ drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 596 ++ drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 163 + drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 42 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 481 +- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 6 +- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 10 + drivers/net/bnxt/tf_ulp/ulp_port_db.c | 235 +- drivers/net/bnxt/tf_ulp/ulp_port_db.h | 122 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 30 +- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 433 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 5217 +++++++++++++---- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 537 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 463 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 85 +- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 23 +- drivers/net/bnxt/tf_ulp/ulp_utils.c | 2 +- 94 files changed, 28009 insertions(+), 11247 deletions(-) create mode 100644 drivers/net/bnxt/bnxt_reps.c create mode 100644 drivers/net/bnxt/bnxt_reps.h create mode 100644 drivers/net/bnxt/hcapi/Makefile create mode 100644 drivers/net/bnxt/hcapi/cfa_p40_hw.h create mode 100644 drivers/net/bnxt/hcapi/cfa_p40_tbl.h create mode 100644 drivers/net/bnxt/hcapi/hcapi_cfa.h create mode 100644 drivers/net/bnxt/hcapi/hcapi_cfa_defs.h create mode 100644 drivers/net/bnxt/hcapi/hcapi_cfa_p4.c create mode 100644 drivers/net/bnxt/hcapi/hcapi_cfa_p4.h create mode 100644 drivers/net/bnxt/tf_core/cfa_resource_types.h create mode 100644 drivers/net/bnxt/tf_core/ll.c create mode 100644 drivers/net/bnxt/tf_core/ll.h create mode 100644 drivers/net/bnxt/tf_core/tf_common.h create mode 100644 drivers/net/bnxt/tf_core/tf_device.c create mode 100644 drivers/net/bnxt/tf_core/tf_device.h create mode 100644 drivers/net/bnxt/tf_core/tf_device_p4.c create mode 100644 drivers/net/bnxt/tf_core/tf_device_p4.h delete mode 100644 drivers/net/bnxt/tf_core/tf_em.c create mode 100644 drivers/net/bnxt/tf_core/tf_em_common.c create mode 100644 drivers/net/bnxt/tf_core/tf_em_common.h create mode 100644 drivers/net/bnxt/tf_core/tf_em_host.c create mode 100644 drivers/net/bnxt/tf_core/tf_em_internal.c create mode 100644 drivers/net/bnxt/tf_core/tf_em_system.c create mode 100644 drivers/net/bnxt/tf_core/tf_global_cfg.c create mode 100644 drivers/net/bnxt/tf_core/tf_global_cfg.h create mode 100644 drivers/net/bnxt/tf_core/tf_identifier.c create mode 100644 drivers/net/bnxt/tf_core/tf_identifier.h create mode 100644 drivers/net/bnxt/tf_core/tf_if_tbl.c create mode 100644 drivers/net/bnxt/tf_core/tf_if_tbl.h create mode 100644 drivers/net/bnxt/tf_core/tf_session.c create mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tbl.c create mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tbl.h create mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tcam.c create mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tcam.h create mode 100644 drivers/net/bnxt/tf_core/tf_tcam.c create mode 100644 drivers/net/bnxt/tf_core/tf_tcam.h create mode 100644 drivers/net/bnxt/tf_core/tf_util.c create mode 100644 drivers/net/bnxt/tf_core/tf_util.h create mode 100644 drivers/net/bnxt/tf_ulp/ulp_def_rules.c create mode 100644 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c create mode 100644 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h--
2.21.1 (Apple Git-122.3)
Re: [dpdk-dev] [PATCH v5 00/51] net/bnxt: add features for host-based flow management
In reply to Ajit KhapardeQuoted 77 lines · Ajit Khaparde
v1->v2:
- update commit message
- rebase patches against latest changes in the tree
- fix signed-off-by tags
- update release notes
v2->v3:
- fix compilation issues
v3->v4:
- rebase against latest dpdk-next-net
v4->v5:
- fix uninitlalized variable in patch [29/51]
- rebase against latest dpdk-next-netAjit Khaparde (1):
doc: update release notesJay Ding (5):
net/bnxt: implement support for TCAM access
net/bnxt: support two level priority for TCAMs
net/bnxt: add external action alloc and free
net/bnxt: implement IF tables set and get
net/bnxt: add global config set and get APIsKishore Padmanabha (8):
net/bnxt: integrate with the latest tf core changes net/bnxt: add support for if table processing net/bnxt: disable Tx vector mode if truflow is enabled net/bnxt: add index opcode and operand to mapper table net/bnxt: add support for global resource templates net/bnxt: add support for internal exact match entries net/bnxt: add support for conditional execution of mapper tables net/bnxt: add VF-rep and stat templatesLance Richardson (1):
net/bnxt: initialize parent PF informationMichael Wildt (7):
net/bnxt: add multi device support
net/bnxt: update multi device design support
net/bnxt: multiple device implementation
net/bnxt: update identifier with remap support
net/bnxt: update RM with residual checker
net/bnxt: update table get to use new design
net/bnxt: add TF register and unregisterMike Baucom (1):
net/bnxt: add support for internal encap recordsPeter Spreadborough (7):
net/bnxt: add support for exact match
net/bnxt: modify EM insert and delete to use HWRM direct net/bnxt: add HCAPI interface support
net/bnxt: support EM and TCAM lookup with table scope net/bnxt: update RM to support HCAPI only net/bnxt: remove table scope from session net/bnxt: add support for EEM System memoryRandy Schacher (2):
net/bnxt: add core changes for EM and EEM lookups net/bnxt: align CFA resources with RMShahaji Bhosle (2):
net/bnxt: support bulk table get and mirror
net/bnxt: support two-level priority for TCAMsSomnath Kotur (7):
net/bnxt: add basic infrastructure for VF reps net/bnxt: add support for VF-reps data path net/bnxt: get IDs for VF-Rep endpoint net/bnxt: parse reps along with other dev-args net/bnxt: create default flow rules for the VF-rep net/bnxt: add ULP Flow counter Manager net/bnxt: add support for count action in flow query
Quoted 11 lines
Venkat Duvvuru (10):
net/bnxt: modify port db dev interface net/bnxt: get port and function info
net/bnxt: add support for hwrm port phy qcaps net/bnxt: modify port db to handle more info net/bnxt: enable port MAC qcfg command for trusted VF net/bnxt: enhancements for port db
net/bnxt: manage VF to VFR conduit
net/bnxt: fill mapper parameters with default rules net/bnxt: add port default rules for ingress and egress net/bnxt: fill cfa action in the Tx descriptor
Hi Ajit,
There are checkpatch warnings and some spelling errors (checkpatch will show them by default when 'codespell' is installed), can you please check them?