[v3,05/37] net/bnxt: replace RTE_LOG_DP with rte_log_dp

Message ID 20231213163820.894987-6-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Replace uso of RTE_LOGTYPE_PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Dec. 13, 2023, 4:35 p.m. UTC
  Want datapath logs to use own logtype.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h               | 5 +++++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 3 +--
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c  | 3 +--
 drivers/net/bnxt/bnxt_txr.c           | 4 +---
 4 files changed, 8 insertions(+), 7 deletions(-)
  

Patch

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 0e01b1d4baea..3aa9213a12f9 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -1058,6 +1058,11 @@  extern int bnxt_logtype_driver;
 #define PMD_DRV_LOG(level, fmt, args...) \
 	  PMD_DRV_LOG_RAW(level, fmt, ## args)
 
+#define PMD_DRV_LOG_DP(level, fmt, args...)			\
+	rte_log_dp(RTE_LOG_ ## level, bnxt_logtype_driver,	\
+		   fmt, ## args)
+
+
 extern const struct rte_flow_ops bnxt_ulp_rte_flow_ops;
 int32_t bnxt_ulp_port_init(struct bnxt *bp);
 void bnxt_ulp_port_deinit(struct bnxt *bp);
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index aa1b1ab8bb7e..64c1dfac47d9 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -357,8 +357,7 @@  bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
 		if (likely(CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2))
 			nb_tx_pkts += txcmp->opaque;
 		else
-			RTE_LOG_DP(ERR, PMD,
-				   "Unhandled CMP type %02x\n",
+			PMD_DRV_LOG_DP(ERR, "Unhandled CMP type %02x\n",
 				   CMP_TYPE(txcmp));
 		raw_cons = NEXT_RAW_CMP(raw_cons);
 	} while (nb_tx_pkts < ring_mask);
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index e99a547f5857..572b21a00837 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -326,8 +326,7 @@  bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
 		if (likely(CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2))
 			nb_tx_pkts += txcmp->opaque;
 		else
-			RTE_LOG_DP(ERR, PMD,
-				   "Unhandled CMP type %02x\n",
+			PMD_DRV_LOG_DP(ERR, "Unhandled CMP type %02x\n",
 				   CMP_TYPE(txcmp));
 		raw_cons = NEXT_RAW_CMP(raw_cons);
 	} while (nb_tx_pkts < ring_mask);
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 899986764f93..bd0a75653ab3 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -542,9 +542,7 @@  static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
 		if (CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2)
 			nb_tx_pkts += opaque;
 		else
-			RTE_LOG_DP(ERR, PMD,
-					"Unhandled CMP type %02x\n",
-					CMP_TYPE(txcmp));
+			PMD_DRV_LOG_DP(ERR, "Unhandled CMP type %02x\n", CMP_TYPE(txcmp));
 		raw_cons = NEXT_RAW_CMP(raw_cons);
 	} while (nb_tx_pkts < ring_mask);