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(-)
@@ -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);
@@ -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);
@@ -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);
@@ -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);