net/bnxt: remove debug macro breaking build
PATCH 1/1 net/bnxt: remove debug macro breaking build
Setting 'RTE_LIBRTE_BNXT_TRUFLOW_DEBUG' macro cause build error, removing it.
Also with meson build system compile time debug macros should be documented in driver documentation, since there is not other way to figure out their existence.
--- drivers/net/bnxt/tf_ulp/bnxt_tf_common.h | 4 - drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 5 - drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 12 --- drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 116 ----------------------- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 24 ----- drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c | 5 - drivers/net/bnxt/tf_ulp/ulp_mapper.c | 84 ---------------- drivers/net/bnxt/tf_ulp/ulp_matcher.c | 13 --- drivers/net/bnxt/tf_ulp/ulp_port_db.c | 9 -- 9 files changed, 272 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_tf_common.h +0 -4
@@ -13,11 +13,7 @@ #define BNXT_TF_DBG(lvl, fmt, args...) PMD_DRV_LOG(lvl, fmt, ## args) -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -#define BNXT_TF_INF(fmt, args...) PMD_DRV_LOG(INFO, fmt, ## args) -#else #define BNXT_TF_INF(fmt, args...) -#endif #define BNXT_ULP_EM_FLOWS 8192#define BNXT_ULP_1M_FLOWS 1000000
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +0 -5
@@ -698,11 +698,6 @@ ulp_eem_tbl_scope_init(struct bnxt *bp) rc);return rc; } -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -BNXT_TF_DBG (DEBUG ,"TableScope=0x%0x %d\n" , - params.tbl_scope_id, - params.tbl_scope_id); -#endif rc =bnxt_ulp_cntxt_tbl_scope_id_set (bp->ulp_ctx, params.tbl_scope_id);if (rc) {BNXT_TF_DBG (ERR ,"Unable to set table scope id\n" );
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +0 -12
@@ -14,9 +14,6 @@#include "ulp_ha_mgr.h" #include "ulp_tun.h" #include <rte_malloc.h> -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -#include "ulp_template_debug_proto.h" -#endif static int32_t bnxt_ulp_flow_validate_args(const struct rte_flow_attr *attr,
@@ -231,15 +228,6 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,if (ret ==BNXT_TF_RC_ERROR ) goto free_fid; -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_PARSER -/* Dump the rte flow pattern */ -ulp_parser_hdr_info_dump (¶ms); -/* Dump the rte flow action */ -ulp_parser_act_info_dump (¶ms); -#endif -#endif - ret =ulp_matcher_pattern_match (¶ms, ¶ms.class_id);if (ret !=BNXT_TF_RC_SUCCESS ) goto free_fid;
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +0 -116
131 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_flow_db.h +0 -24
@@ -411,28 +411,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); -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -/* -* Dump the flow entry details -* -* flow_db [in] Ptr to flow db -* fid [in] flow id -* -* returns none -*/ -void -ulp_flow_db_debug_fid_dump (struct bnxt_ulp_flow_db *flow_db,uint32_t fid); - -/* -* Dump the flow database entry details -* -* ulp_ctxt [in] Ptr to ulp_context -* flow_id [in] if zero then all fids are dumped. -* -* returns none -*/ -int32_t ulp_flow_db_debug_dump (struct bnxt_ulp_context *ulp_ctxt, -uint32_t flow_id); -#endif -#endif /* _ULP_FLOW_DB_H_ */
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c +0 -5
@@ -10,11 +10,6 @@#include "ulp_mapper.h" #include "ulp_flow_db.h" -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -#include "ulp_template_debug_proto.h" -#include "ulp_tf_debug.h" -#endif -/* Retrieve the generic table initialization parameters for the tbl_idx */ static struct bnxt_ulp_generic_tbl_params *ulp_mapper_gen_tbl_params_get (uint32_t tbl_idx)
drivers/net/bnxt/tf_ulp/ulp_mapper.c +0 -84
174 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_matcher.c +0 -13
@@ -6,10 +6,6 @@#include "ulp_matcher.h" #include "ulp_utils.h" -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -#include "ulp_template_debug_proto.h" -#endif -/* Utility function to calculate the class matcher hash */ static uint32_t ulp_matcher_class_hash_calculate (uint64_t hi_sig,uint64_t lo_sig)
@@ -99,11 +95,6 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params, error:BNXT_TF_DBG (DEBUG ,"Did not find any matching template\n" ); -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -BNXT_TF_DBG (DEBUG ,"class_hid:0x%x, Hdr:%" PRIX64 " Fld:%" PRIX64 "\n" , - class_hid, params->hdr_bitmap.bits, - params->fld_bitmap.bits); -#endif *class_id =0 ;return BNXT_TF_RC_ERROR ; }
@@ -151,10 +142,6 @@ ulp_matcher_action_match(struct ulp_rte_parser_params *params, error:BNXT_TF_DBG (DEBUG ,"Did not find any matching action template\n" ); -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -BNXT_TF_DBG (DEBUG ,"act_hid:0x%x, Hdr:%" PRIX64 "\n" , - act_hid, params->act_bitmap.bits); -#endif *act_id =0 ;return BNXT_TF_RC_ERROR ; }
drivers/net/bnxt/tf_ulp/ulp_port_db.c +0 -9
@@ -11,10 +11,6 @@#include "ulp_port_db.h" #include "tfp.h" -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -#include "ulp_tf_debug.h" -#endif -static uint32_t ulp_port_db_allocate_ifindex (struct bnxt_ulp_port_db *port_db) {
@@ -206,11 +202,6 @@ int32_t ulp_port_db_dev_port_intf_update(struct bnxt_ulp_context *ulp_ctxt, port_data->port_vport =bnxt_pmd_get_vport (port_id); port_data->port_valid = true; } -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG -#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_PORT -ulp_port_db_dump (port_db, intf, port_id); -#endif -#endif return 0 ; }
Signature · 1 line
2.31.1
Quoted 6 lines · Ferruh Yigit
Setting '
RTE_LIBRTE_BNXT_TRUFLOW_DEBUG' macro cause build error, removing it.Also with meson build system compile time debug macros should be documented in driver documentation, since there is not other way to
s/not/no
Quoted 3 lines
figure out their existence.
Signed-off-by Ferruh Yigit <[email protected]>
With thanks and above nit, :-)
Quoted 7 lines · Ajit Khaparde
Quoted 6 lines · Ferruh Yigit
Setting '
RTE_LIBRTE_BNXT_TRUFLOW_DEBUG' macro cause build error, removing it.Also with meson build system compile time debug macros should be documented in driver documentation, since there is not other way to
Quoted 9 lines
s/not/no
Quoted 3 lines
figure out their existence.
Signed-off-by Ferruh Yigit <[email protected]>With thanks and above nit, :-)
Reviewed-by Ajit Khaparde <[email protected]>
Other option is to fix the build error when macro is set, would you like to go with that option?
And can you please send a separate patch to document the remaining compile time macros in the driver guide?
Quoted 13 lines · Ferruh Yigit
Quoted 11 lines · Ajit Khaparde
Quoted 6 lines · Ferruh Yigit
Setting '
RTE_LIBRTE_BNXT_TRUFLOW_DEBUG' macro cause build error, removing it.Also with meson build system compile time debug macros should be documented in driver documentation, since there is not other way to
s/not/no
Quoted 2 lines
figure out their existence.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Ferruh Yigit <[email protected]>With thanks and above nit, :-)
Reviewed-by Ajit Khaparde <[email protected]>Other option is to fix the build error when macro is set, would you like to go with that option?
No. There is more that we would like to add if we want to add debug capability. Currently what you are trying to remove is a bit half baked which should not have sneaked in.
So removing it for now is perfectly fine.
Quoted 3 lines
And can you please send a separate patch to document the remaining compile time macros in the driver guide?
Sure. I will go through the code and take care of that.
Quoted 20 lines · Ajit Khaparde
Quoted 19 lines · Ferruh Yigit
Quoted 16 lines · Ajit Khaparde
Quoted 6 lines · Ferruh Yigit
Setting '
RTE_LIBRTE_BNXT_TRUFLOW_DEBUG' macro cause build error, removing it.Also with meson build system compile time debug macros should be documented in driver documentation, since there is not other way to
s/not/no
Quoted 3 lines
figure out their existence.
Signed-off-by Ferruh Yigit <[email protected]>With thanks and above nit, :-)
Reviewed-by Ajit Khaparde <[email protected]>
Quoted 7 lines
Quoted 2 lines
Other option is to fix the build error when macro is set, would you like to go with that option?
No. There is more that we would like to add if we want to add debug capability. Currently what you are trying to remove is a bit half baked which should not have sneaked in.
So removing it for now is perfectly fine.
OK.
Quoted 5 lines
Quoted 3 lines
And can you please send a separate patch to document the remaining compile time macros in the driver guide?
Sure. I will go through the code and take care of that.
I recognized that no more debug macro left after patch, so nothing to document.
btw, '-DRTE_LIBRTE_BNXT_TF' in the meson seems not used at all.
Ferruh Yigit
AppliedQuoted 7 lines · Ajit Khaparde
Quoted 6 lines · Ferruh Yigit
Setting '
RTE_LIBRTE_BNXT_TRUFLOW_DEBUG' macro cause build error, removing it.Also with meson build system compile time debug macros should be documented in driver documentation, since there is not other way to
Quoted 9 lines
s/not/no
Quoted 3 lines
figure out their existence.
Signed-off-by Ferruh Yigit <[email protected]>With thanks and above nit, :-)
Reviewed-by Ajit Khaparde <[email protected]>
Applied to dpdk-next-net/main, thanks.