From e7fbf6f5db6eead3ea9b980174e4332509175aef Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Tue, 13 Oct 2020 14:45:25 +0100 Subject: [PATCH] net/sfc: log doorbell addresses useful for debugging Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/sfc_ef10_essb_rx.c | 2 ++ drivers/net/sfc/sfc_ef10_rx.c | 5 +++++ drivers/net/sfc/sfc_ef10_tx.c | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c index 8238cc830d..d9bf28525b 100644 --- a/drivers/net/sfc/sfc_ef10_essb_rx.c +++ b/drivers/net/sfc/sfc_ef10_essb_rx.c @@ -596,6 +596,8 @@ sfc_ef10_essb_rx_qcreate(uint16_t port_id, uint16_t queue_id, ER_DZ_RX_DESC_UPD_REG_OFST + (info->hw_index << info->vi_window_shift); + sfc_ef10_essb_rx_info(&rxq->dp.dpq, "RxQ doorbell is %p", + rxq->doorbell); sfc_ef10_essb_rx_info(&rxq->dp.dpq, "block size is %u, buf stride is %u", rxq->block_size, rxq->buf_stride); diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c index 8c6ebaa2fa..62d0b6206b 100644 --- a/drivers/net/sfc/sfc_ef10_rx.c +++ b/drivers/net/sfc/sfc_ef10_rx.c @@ -33,6 +33,9 @@ #define sfc_ef10_rx_err(dpq, ...) \ SFC_DP_LOG(SFC_KVARG_DATAPATH_EF10, ERR, dpq, __VA_ARGS__) +#define sfc_ef10_rx_info(dpq, ...) \ + SFC_DP_LOG(SFC_KVARG_DATAPATH_EF10, INFO, dpq, __VA_ARGS__) + /** * Maximum number of descriptors/buffers in the Rx ring. * It should guarantee that corresponding event queue never overfill. @@ -672,6 +675,8 @@ sfc_ef10_rx_qcreate(uint16_t port_id, uint16_t queue_id, ER_DZ_EVQ_RPTR_REG_OFST + (info->evq_hw_index << info->vi_window_shift); + sfc_ef10_rx_info(&rxq->dp.dpq, "RxQ doorbell is %p", rxq->doorbell); + *dp_rxqp = &rxq->dp; return 0; diff --git a/drivers/net/sfc/sfc_ef10_tx.c b/drivers/net/sfc/sfc_ef10_tx.c index 4d7da427cb..6fb4ac88a8 100644 --- a/drivers/net/sfc/sfc_ef10_tx.c +++ b/drivers/net/sfc/sfc_ef10_tx.c @@ -29,6 +29,9 @@ #define sfc_ef10_tx_err(dpq, ...) \ SFC_DP_LOG(SFC_KVARG_DATAPATH_EF10, ERR, dpq, __VA_ARGS__) +#define sfc_ef10_tx_info(dpq, ...) \ + SFC_DP_LOG(SFC_KVARG_DATAPATH_EF10, INFO, dpq, __VA_ARGS__) + /** Maximum length of the DMA descriptor data */ #define SFC_EF10_TX_DMA_DESC_LEN_MAX \ ((1u << ESF_DZ_TX_KER_BYTE_CNT_WIDTH) - 1) @@ -960,6 +963,8 @@ sfc_ef10_tx_qcreate(uint16_t port_id, uint16_t queue_id, txq->evq_hw_ring = info->evq_hw_ring; txq->tso_tcp_header_offset_limit = info->tso_tcp_header_offset_limit; + sfc_ef10_tx_info(&txq->dp.dpq, "TxQ doorbell is %p", txq->doorbell); + *dp_txqp = &txq->dp; return 0; -- 2.20.1