Skip to content

Commit 00c144a

Browse files
manishkurupajitkhaparde
authored andcommitted
net/bnxt/tf_ulp: remove TruFlow debug
This commit cleans up TruFlow debug/non-production prints Signed-off-by: Manish Kurup <[email protected]> Reviewed-by: Ajit Khaparde <[email protected]>
1 parent d53487c commit 00c144a

File tree

11 files changed

+0
-244
lines changed

11 files changed

+0
-244
lines changed

drivers/net/bnxt/bnxt_hwrm.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2868,29 +2868,6 @@ static uint32_t bnxt_sanitize_rss_type(struct bnxt *bp, uint32_t types)
28682868
return hwrm_type;
28692869
}
28702870

2871-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
2872-
static int
2873-
bnxt_hwrm_vnic_rss_qcfg_p5(struct bnxt *bp)
2874-
{
2875-
struct hwrm_vnic_rss_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
2876-
struct hwrm_vnic_rss_qcfg_input req = {0};
2877-
int rc;
2878-
2879-
HWRM_PREP(&req, HWRM_VNIC_RSS_QCFG, BNXT_USE_CHIMP_MB);
2880-
/* vnic_id and rss_ctx_idx must be set to INVALID to read the
2881-
* global hash mode.
2882-
*/
2883-
req.vnic_id = rte_cpu_to_le_16(BNXT_DFLT_VNIC_ID_INVALID);
2884-
req.rss_ctx_idx = rte_cpu_to_le_16(BNXT_RSS_CTX_IDX_INVALID);
2885-
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req),
2886-
BNXT_USE_CHIMP_MB);
2887-
HWRM_CHECK_RESULT();
2888-
HWRM_UNLOCK();
2889-
PMD_DRV_LOG_LINE(DEBUG, "RSS QCFG: Hash level %d", resp->hash_mode_flags);
2890-
2891-
return rc;
2892-
}
2893-
#endif
28942871

28952872
static int
28962873
bnxt_hwrm_vnic_rss_cfg_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)

drivers/net/bnxt/tf_ulp/bnxt_tf_common.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
#define BNXT_DRV_DBG(lvl, fmt, ...) \
1515
RTE_LOG(lvl, BNXT, "%s(): " fmt, __func__, ## __VA_ARGS__)
1616

17-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
18-
#define BNXT_DRV_INF(fmt, ...) RTE_LOG(INFO, fmt, ## __VA_ARGS__)
19-
#else
20-
#define BNXT_DRV_INF(fmt, ...)
21-
#endif
2217

2318
#define BNXT_ULP_EM_FLOWS 8192
2419
#define BNXT_ULP_1M_FLOWS 1000000

drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
#include "bnxt_hwrm.h"
1717
#include "bnxt_tf_common.h"
1818
#include "bnxt_tf_pmd_shim.h"
19-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
20-
#include "ulp_template_debug_proto.h"
21-
#endif
2219

2320

2421
int
@@ -617,9 +614,6 @@ bnxt_pmd_global_tunnel_set(struct bnxt_ulp_context *ulp_ctx,
617614
port_id, rc);
618615
return rc;
619616
}
620-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
621-
ulp_mapper_global_register_tbl_dump(type, udp_port);
622-
#endif
623617
if (udp_port)
624618
bnxt_pmd_global_reg_data_to_hndl(port_id, lupar_id,
625619
type, udp_port, handle);

drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -948,11 +948,6 @@ ulp_tf_eem_tbl_scope_init(struct bnxt *bp)
948948
return rc;
949949
}
950950

951-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
952-
BNXT_DRV_DBG(DEBUG, "TableScope=0x%0x %d\n",
953-
params.tbl_scope_id,
954-
params.tbl_scope_id);
955-
#endif
956951

957952
rc = bnxt_ulp_cntxt_tbl_scope_id_set(bp->ulp_ctx, params.tbl_scope_id);
958953
if (rc) {

drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
#include "ulp_alloc_tbl.h"
1111
#include "bnxt_ulp_utils.h"
1212

13-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
14-
#include "ulp_template_debug_proto.h"
15-
#include "ulp_tf_debug.h"
16-
#endif
1713

1814
/* Retrieve the allocator table initialization parameters for the tbl_idx */
1915
static const struct bnxt_ulp_allocator_tbl_params*

drivers/net/bnxt/tf_ulp/ulp_def_rules.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -960,12 +960,6 @@ bnxt_ulp_grp_miss_act_set(struct rte_eth_dev *dev,
960960
/* Perform the rte flow post process */
961961
bnxt_ulp_rte_parser_post_process(&params);
962962

963-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
964-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_PARSER
965-
/* Dump the rte flow action */
966-
ulp_parser_act_info_dump(&params);
967-
#endif
968-
#endif
969963

970964
ret = ulp_matcher_action_match(&params, &params.act_tmpl);
971965
if (unlikely(ret != BNXT_TF_RC_SUCCESS))

drivers/net/bnxt/tf_ulp/ulp_flow_db.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,6 @@ ulp_flow_db_fid_alloc(struct bnxt_ulp_context *ulp_ctxt,
532532
if (flow_type == BNXT_ULP_FDB_TYPE_REGULAR)
533533
ulp_flow_db_func_id_set(flow_db, *fid, func_id);
534534

535-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
536-
BNXT_DRV_DBG(DEBUG, "flow_id = %u:%u allocated\n", flow_type, *fid);
537-
#endif
538535
/* return success */
539536
return 0;
540537
}
@@ -805,9 +802,6 @@ ulp_flow_db_fid_free(struct bnxt_ulp_context *ulp_ctxt,
805802
if (flow_type == BNXT_ULP_FDB_TYPE_REGULAR)
806803
ulp_flow_db_func_id_set(flow_db, fid, 0);
807804

808-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
809-
BNXT_DRV_DBG(DEBUG, "flow_id = %u:%u freed\n", flow_type, fid);
810-
#endif
811805
/* all good, return success */
812806
return 0;
813807
}

drivers/net/bnxt/tf_ulp/ulp_mapper.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -653,12 +653,6 @@ ulp_mapper_priority_opc_process(struct bnxt_ulp_mapper_parms *parms,
653653
rc = -EINVAL;
654654
break;
655655
}
656-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
657-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
658-
if (!rc)
659-
BNXT_DRV_DBG(DEBUG, "Tcam priority = 0x%x\n", *priority);
660-
#endif
661-
#endif
662656
return rc;
663657
}
664658

@@ -1504,13 +1498,6 @@ ulp_mapper_key_recipe_alloc(struct bnxt_ulp_context *ulp_ctx,
15041498
BNXT_DRV_DBG(ERR, "Unable to alloc key recipe\n");
15051499
return NULL;
15061500
}
1507-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
1508-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
1509-
BNXT_DRV_INF("Alloc key recipe [%s]:[%s] = 0x%X\n",
1510-
(dir == BNXT_ULP_DIRECTION_INGRESS) ? "rx" : "tx",
1511-
ulp_mapper_key_recipe_type_to_str(stype), recipe_id);
1512-
#endif
1513-
#endif
15141501
} else if (alloc_only) {
15151502
BNXT_DRV_DBG(ERR, "Recipe ID (%d) already allocated\n",
15161503
recipe_id);
@@ -1554,13 +1541,6 @@ ulp_mapper_key_recipe_free(struct bnxt_ulp_context *ulp_ctx,
15541541
}
15551542
rte_free(recipes[index]);
15561543
recipes[index] = NULL;
1557-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
1558-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
1559-
BNXT_DRV_INF("Free key recipe [%s]:[%s] = 0x%X\n",
1560-
(dir == BNXT_ULP_DIRECTION_INGRESS) ? "rx" : "tx",
1561-
ulp_mapper_key_recipe_type_to_str(stype), index);
1562-
#endif
1563-
#endif
15641544
return 0;
15651545
}
15661546

@@ -1768,13 +1748,6 @@ ulp_mapper_key_recipe_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
17681748
}
17691749
}
17701750
}
1771-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
1772-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
1773-
if (*written && is_key)
1774-
BNXT_DRV_DBG(DEBUG, "%-20s bits = %-3d\n", fld->description,
1775-
fld->field_bit_size);
1776-
#endif
1777-
#endif
17781751
return rc;
17791752
}
17801753

@@ -3064,11 +3037,6 @@ ulp_mapper_stats_cache_tbl_process(struct bnxt_ulp_mapper_parms *parms,
30643037
rc);
30653038
return rc;
30663039
}
3067-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
3068-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
3069-
BNXT_DRV_DBG(DEBUG, "flow id =0x%x\n", parms->flow_id);
3070-
#endif
3071-
#endif
30723040
return rc;
30733041
}
30743042

@@ -4039,12 +4007,6 @@ ulp_mapper_func_info_process(struct bnxt_ulp_mapper_parms *parms,
40394007
func_info->func_dst_opr);
40404008
return -EINVAL;
40414009
}
4042-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
4043-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
4044-
BNXT_DRV_DBG(DEBUG, "write the %" PRIX64 " into func_opc %u\n", res,
4045-
func_info->func_dst_opr);
4046-
#endif
4047-
#endif
40484010

40494011
return rc;
40504012
}

drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
#include "bnxt_ulp_utils.h"
1212
#include "bnxt_ulp_tf.h"
1313

14-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
15-
#include "ulp_template_debug_proto.h"
16-
#include "ulp_tf_debug.h"
17-
#endif
1814

1915
/* Internal function to write the tcam entry */
2016
static int32_t
@@ -50,9 +46,6 @@ ulp_mapper_tf_tcam_tbl_entry_write(struct bnxt_ulp_mapper_parms *parms,
5046
tf_dir_2_str(sparms.dir), sparms.idx);
5147
return -EIO;
5248
}
53-
BNXT_DRV_INF("tcam[%s][%s][%x] write success.\n",
54-
tf_tcam_tbl_2_str(sparms.tcam_tbl_type),
55-
tf_dir_2_str(sparms.dir), sparms.idx);
5649

5750
/* Mark action */
5851
rc = ulp_mapper_mark_act_ptr_process(parms, tbl);
@@ -61,11 +54,6 @@ ulp_mapper_tf_tcam_tbl_entry_write(struct bnxt_ulp_mapper_parms *parms,
6154
return rc;
6255
}
6356

64-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
65-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
66-
ulp_mapper_tcam_entry_dump("TCAM", idx, tbl, key, mask, data);
67-
#endif
68-
#endif
6957
return rc;
7058
}
7159

@@ -353,11 +341,6 @@ ulp_mapper_tf_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
353341
BNXT_DRV_DBG(ERR, "Failed to build the result blob\n");
354342
return rc;
355343
}
356-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
357-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
358-
ulp_mapper_result_dump("EM Result", tbl, &data);
359-
#endif
360-
#endif
361344
if (dparms->em_dynamic_pad_en) {
362345
uint32_t abits = dparms->em_blk_align_bits;
363346

@@ -372,11 +355,6 @@ ulp_mapper_tf_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
372355
ulp_blob_pad_align(&data, abits);
373356

374357
ulp_blob_perform_byte_reverse(&data, ULP_BITS_2_BYTE(abits));
375-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
376-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
377-
ulp_mapper_result_dump("EM Merged Result", tbl, &data);
378-
#endif
379-
#endif
380358
}
381359

382360
/* do the transpose for the internal EM keys */
@@ -389,11 +367,6 @@ ulp_mapper_tf_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
389367
}
390368
tmplen = ulp_blob_data_len_get(&key);
391369
ulp_blob_perform_byte_reverse(&key, ULP_BITS_2_BYTE(tmplen));
392-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
393-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
394-
ulp_mapper_result_dump("EM Key Transpose", tbl, &key);
395-
#endif
396-
#endif
397370
}
398371

399372
rc = bnxt_ulp_cntxt_tbl_scope_id_get(parms->ulp_ctx,
@@ -444,12 +417,6 @@ ulp_mapper_tf_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
444417
return rc;
445418
}
446419

447-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
448-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
449-
ulp_mapper_em_dump("EM", &key, &data, &iparms);
450-
/* tf_dump_tables(tfp, iparms.tbl_scope_id); */
451-
#endif
452-
#endif
453420
/* Mark action process */
454421
if (mtype == BNXT_ULP_FLOW_MEM_TYPE_EXT &&
455422
tbl->resource_type == TF_MEM_EXTERNAL)
@@ -852,9 +819,6 @@ ulp_mapper_tf_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
852819
sparms.idx, rc);
853820
goto error;
854821
}
855-
BNXT_DRV_INF("Index table[%s][%s][%x] write successful.\n",
856-
tf_tbl_type_2_str(sparms.type),
857-
tf_dir_2_str(sparms.dir), sparms.idx);
858822

859823
/* Calculate action record size */
860824
if (tbl->resource_type == TF_TBL_TYPE_EXT) {
@@ -1032,10 +996,6 @@ ulp_mapper_tf_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
1032996
iftbl_params.idx, rc);
1033997
return rc;
1034998
}
1035-
BNXT_DRV_INF("Set table[%s][%s][%x] success.\n",
1036-
tf_if_tbl_2_str(iftbl_params.type),
1037-
tf_dir_2_str(iftbl_params.dir),
1038-
iftbl_params.idx);
1039999

10401000
/*
10411001
* TBD: Need to look at the need to store idx in flow db for restore
@@ -1073,13 +1033,6 @@ ulp_mapper_tf_ident_alloc(struct bnxt_ulp_context *ulp_ctx,
10731033
return rc;
10741034
}
10751035
*identifier_id = iparms.id;
1076-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
1077-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
1078-
BNXT_DRV_INF("Allocated Identifier [%s]:[%s] = 0x%X\n",
1079-
tf_dir_2_str(iparms.dir),
1080-
tf_ident_2_str(iparms.ident_type), iparms.id);
1081-
#endif
1082-
#endif
10831036
return rc;
10841037
}
10851038

@@ -1104,14 +1057,6 @@ ulp_mapper_tf_ident_free(struct bnxt_ulp_context *ulp_ctx,
11041057
free_parms.id = res->resource_hndl;
11051058

11061059
(void)tf_free_identifier(tfp, &free_parms);
1107-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
1108-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
1109-
BNXT_DRV_INF("Freed Identifier [%s]:[%s] = 0x%X\n",
1110-
tf_dir_2_str(free_parms.dir),
1111-
tf_ident_2_str(free_parms.ident_type),
1112-
(uint32_t)free_parms.id);
1113-
#endif
1114-
#endif
11151060
return rc;
11161061
}
11171062

@@ -1219,14 +1164,6 @@ ulp_mapper_tf_index_entry_free(struct bnxt_ulp_context *ulp,
12191164
if (fparms.type == TF_TBL_TYPE_FULL_ACT_RECORD)
12201165
(void)ulp_mapper_clear_full_action_record(tfp, ulp, &fparms);
12211166

1222-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
1223-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
1224-
BNXT_DRV_INF("Free index table [%s]:[%s] = 0x%X\n",
1225-
tf_dir_2_str(fparms.dir),
1226-
tf_tbl_type_2_str(fparms.type),
1227-
(uint32_t)fparms.idx);
1228-
#endif
1229-
#endif
12301167
return tf_free_tbl_entry(tfp, &fparms);
12311168
}
12321169

@@ -1267,14 +1204,6 @@ ulp_mapper_tf_index_tbl_alloc_process(struct bnxt_ulp_context *ulp,
12671204

12681205
*index = aparms.idx;
12691206

1270-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
1271-
#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
1272-
BNXT_DRV_DBG(DEBUG, "Allocated Table Index [%s][%s] = 0x%04x\n",
1273-
tf_tbl_type_2_str(aparms.type),
1274-
tf_dir_2_str(aparms.dir),
1275-
aparms.idx);
1276-
#endif
1277-
#endif
12781207
return rc;
12791208
}
12801209

0 commit comments

Comments
 (0)