[PATCH 05/26] net/bnxt: replace RTE_LOG_DP with rte_log_dp
Somnath Kotur
somnath.kotur at broadcom.com
Wed Dec 13 04:07:06 CET 2023
On Wed, Dec 13, 2023 at 7:14 AM Stephen Hemminger
<stephen at networkplumber.org> wrote:
>
> Want datapath logs to use own logtype.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> 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(-)
>
> 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);
>
> --
> 2.42.0
>
Acked-by: Somnath Kotur <somnath.kotur at broadcom.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4212 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/dev/attachments/20231213/51383381/attachment.bin>
More information about the dev
mailing list