APPLIED: [SRU][J:linux-bluefield][PATCH v1 0/1] mlxbf_gige: msglvl infrastructure

Bartlomiej Zolnierkiewicz bartlomiej.zolnierkiewicz at canonical.com
Wed Mar 26 10:11:16 UTC 2025


On Fri, Mar 7, 2025 at 11:24 PM David Thompson <davthompson at nvidia.com> wrote:
>
> BugLink: https://bugs.launchpad.net/bugs/2101193
>
> SRU Justification:
>
> [Impact]
>
> The mlxbf_gige driver does not utilize the msglvl infrastructure, so
> there is no way to dynamically enable/disable certain debug log entries
> from the driver.
>
> [Fix]
>
> The fix is to add logic for setting a default msglvl, providing support
> for get/set of msglvl via ethtool, and updating certain driver paths
> with netif_msg_XXX checks before logging of driver internals.
> The driver currently supports the following msglvl settings:
>   link 0x004 (set by default)
>   ifup 0x020 (set by default)
>   rx_status 0x800
>   rx_err 0x040 (set by default)
>   tx_err 0x080 (set by default)
>   tx_done 0x400
>   tx_queued 0x100
>
> [Test Case]
>
> Boot BF2/BF3 with mlxbf_gige driver containing this patch
> Verify "ethtool oob_net0" shows default msglvl in output
>   e.g. "Current message level: 0x000000e4 (228)
>           link ifup rx_err tx_err"
> Verify that dmesg output shows log entries from driver, e.g.
>   mlxbf_gige MLNXBF17:00: open: start state tx_ci=0x0 tx_pi=0x0 rx_ci=0x0 rx_pi=0x0 int_mask=0x1
>   mlxbf_gige MLNXBF17:00: din_drop=0x0 rx_dma=0x4000000 rx_fifo=0x0 rx_polarity=0
> Verify that setting new value via "ethtool -s oob_net0 msglvl <value>"
>   is reflected in output of "ethtool oob_net0"
> Verify driver is fully functional after enabling various msglvl settings
>
> [Regression Potential]
> Since this is a debug feature that adds to kernel log, there is
> potential for causing regression (e.g. spamming log) if the
> msglvl is not set appropriately during certain test cases.
>
> David Thompson (1):
>   UBUNTU: SAUCE: mlxbf_gige: msglvl infrastructure
>
>  .../ethernet/mellanox/mlxbf_gige/mlxbf_gige.h |  2 +
>  .../mellanox/mlxbf_gige/mlxbf_gige_ethtool.c  | 14 +++++
>  .../mellanox/mlxbf_gige/mlxbf_gige_main.c     | 59 +++++++++++++++++--
>  .../mellanox/mlxbf_gige/mlxbf_gige_regs.h     |  1 +
>  .../mellanox/mlxbf_gige/mlxbf_gige_rx.c       |  7 +++
>  .../mellanox/mlxbf_gige/mlxbf_gige_tx.c       | 17 +++++-
>  6 files changed, 93 insertions(+), 7 deletions(-)
>

Applied to jammy:linux-bluefield/master-next. Thanks.

--
Best regards,
Bartlomiej



More information about the kernel-team mailing list