RDMA/net/ionic: Misc updates
Subsystems (5)
cover RDMA/net/ionic: Misc updates
The big addition in this set is a dedicated debugfs directory under the main ionic driver's debugfs tree for RDMA-related entries and querying queue information; a separate patch on top of that adds the ability to configure DCQCN parameters using debugfs when the firmware is in a mode that allows it.
Other smaller additions add a devlink parameter to the ionic ethernet driver for enabling and disabling RDMA, as well as updating the copyright years for the ionic RDMA driver all in one go.
Abhijit Gangurde (1):
net/ionic: Add devlink parameter for RDMA
Allen Hubbe (2):
RDMA/ionic: Add debugfs support
RDMA/ionic: Add DCQCN parameter configuration via debugfs
Eric Joyner (1):
RDMA/ionic: Update copyright year to 2026
drivers/infiniband/hw/ionic/Kconfig | 2 +- drivers/infiniband/hw/ionic/Makefile | 3 +- drivers/infiniband/hw/ionic/ionic_admin.c | 6 +- .../infiniband/hw/ionic/ionic_controlpath.c | 21 +- drivers/infiniband/hw/ionic/ionic_datapath.c | 2 +- drivers/infiniband/hw/ionic/ionic_dcqcn.c | 629 +++++++++++++++ drivers/infiniband/hw/ionic/ionic_debugfs.c | 750 ++++++++++++++++++ drivers/infiniband/hw/ionic/ionic_fw.h | 33 +- drivers/infiniband/hw/ionic/ionic_hw_stats.c | 2 +- drivers/infiniband/hw/ionic/ionic_ibdev.c | 9 +- drivers/infiniband/hw/ionic/ionic_ibdev.h | 43 +- drivers/infiniband/hw/ionic/ionic_lif_cfg.c | 6 +- drivers/infiniband/hw/ionic/ionic_lif_cfg.h | 6 +- drivers/infiniband/hw/ionic/ionic_pgtbl.c | 2 +- drivers/infiniband/hw/ionic/ionic_profiles.h | 86 ++ drivers/infiniband/hw/ionic/ionic_queue.c | 2 +- drivers/infiniband/hw/ionic/ionic_queue.h | 2 +- drivers/infiniband/hw/ionic/ionic_res.h | 2 +- .../net/ethernet/pensando/ionic/ionic_aux.c | 3 +- .../ethernet/pensando/ionic/ionic_devlink.c | 75 ++ 20 files changed, 1668 insertions(+), 16 deletions(-) create mode 100644 drivers/infiniband/hw/ionic/ionic_dcqcn.c create mode 100644 drivers/infiniband/hw/ionic/ionic_debugfs.c create mode 100644 drivers/infiniband/hw/ionic/ionic_profiles.h
base-commit: 8c699be3dad7bba87cdda485dc099226cfc2f706
Signature · 1 line
2.17.1
PATCH 1/4 RDMA/ionic: Update copyright year to 2026
--- drivers/infiniband/hw/ionic/Kconfig | 2 +- drivers/infiniband/hw/ionic/ionic_admin.c | 2 +- drivers/infiniband/hw/ionic/ionic_controlpath.c | 2 +- drivers/infiniband/hw/ionic/ionic_datapath.c | 2 +- drivers/infiniband/hw/ionic/ionic_fw.h | 2 +- drivers/infiniband/hw/ionic/ionic_hw_stats.c | 2 +- drivers/infiniband/hw/ionic/ionic_ibdev.c | 2 +- drivers/infiniband/hw/ionic/ionic_ibdev.h | 2 +- drivers/infiniband/hw/ionic/ionic_lif_cfg.c | 2 +- drivers/infiniband/hw/ionic/ionic_lif_cfg.h | 2 +- drivers/infiniband/hw/ionic/ionic_pgtbl.c | 2 +- drivers/infiniband/hw/ionic/ionic_queue.c | 2 +- drivers/infiniband/hw/ionic/ionic_queue.h | 2 +- drivers/infiniband/hw/ionic/ionic_res.h | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-)
drivers/infiniband/hw/ionic/Kconfig +1 -1
@@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -# Copyright (C) 2018-2025, Advanced Micro Devices, Inc. +# Copyright (C) 2018-2026, Advanced Micro Devices, Inc. config INFINIBAND_IONIC tristate "AMD Pensando DSC RDMA/RoCE Support"
drivers/infiniband/hw/ionic/ionic_admin.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #include <linux/interrupt.h> #include <linux/module.h>
drivers/infiniband/hw/ionic/ionic_controlpath.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #include <linux/module.h> #include <linux/printk.h>
drivers/infiniband/hw/ionic/ionic_datapath.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #include <linux/module.h> #include <linux/printk.h>
drivers/infiniband/hw/ionic/ionic_fw.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #ifndef _IONIC_FW_H_#define _IONIC_FW_H_
drivers/infiniband/hw/ionic/ionic_hw_stats.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #include <linux/dma-mapping.h>
drivers/infiniband/hw/ionic/ionic_ibdev.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #include <linux/module.h> #include <linux/printk.h>
drivers/infiniband/hw/ionic/ionic_ibdev.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #ifndef _IONIC_IBDEV_H_#define _IONIC_IBDEV_H_
drivers/infiniband/hw/ionic/ionic_lif_cfg.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #include <linux/kernel.h>
drivers/infiniband/hw/ionic/ionic_lif_cfg.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #ifndef _IONIC_LIF_CFG_H_
drivers/infiniband/hw/ionic/ionic_pgtbl.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #include <linux/mman.h> #include <linux/dma-mapping.h>
drivers/infiniband/hw/ionic/ionic_queue.c +1 -1
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #include <linux/dma-mapping.h>
drivers/infiniband/hw/ionic/ionic_queue.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #ifndef _IONIC_QUEUE_H_#define _IONIC_QUEUE_H_
drivers/infiniband/hw/ionic/ionic_res.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright (C) 2018-2025, Advanced Micro Devices, Inc. */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ #ifndef _IONIC_RES_H_#define _IONIC_RES_H_
Signature · 1 line
2.17.1
PATCH 2/4 net/ionic: Add devlink parameter for RDMA
In reply to Eric JoynerFrom: Abhijit Gangurde <[email protected]>
Provides a devlink parameter to the ionic Ethernet driver to enable/disable the RDMA feature.
--- .../net/ethernet/pensando/ionic/ionic_aux.c | 3 +- .../ethernet/pensando/ionic/ionic_devlink.c | 75 +++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_aux.c +2 -1
@@ -23,7 +23,8 @@ int ionic_auxbus_register(struct ionic_lif *lif)struct auxiliary_device *aux_dev;int err, id; -if (!(le64_to_cpu (lif->ionic->ident.lif.capabilities) &IONIC_LIF_CAP_RDMA )) +if (!IS_ENABLED (CONFIG_INFINIBAND_IONIC ) || + !(le64_to_cpu (lif->ionic->ident.lif.capabilities) &IONIC_LIF_CAP_RDMA ))return 0 ; ionic_adev =kzalloc_obj (*ionic_adev);
drivers/net/ethernet/pensando/ionic/ionic_devlink.c +75 -0
96 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 3/4 RDMA/ionic: Add debugfs support
In reply to Eric JoynerFrom: Allen Hubbe <[email protected]>
Adds a per-RDMA device debugfs folder under the parent ionic ethernet device's folder for the LIF. Exports RDMA-specific debug information and various queue information.
--- drivers/infiniband/hw/ionic/Makefile | 2 +- drivers/infiniband/hw/ionic/ionic_admin.c | 4 + .../infiniband/hw/ionic/ionic_controlpath.c | 14 + drivers/infiniband/hw/ionic/ionic_debugfs.c | 750 ++++++++++++++++++ drivers/infiniband/hw/ionic/ionic_ibdev.c | 3 + drivers/infiniband/hw/ionic/ionic_ibdev.h | 29 + drivers/infiniband/hw/ionic/ionic_lif_cfg.c | 3 + drivers/infiniband/hw/ionic/ionic_lif_cfg.h | 2 + 8 files changed, 806 insertions(+), 1 deletion(-) create mode 100644 drivers/infiniband/hw/ionic/ionic_debugfs.c
drivers/infiniband/hw/ionic/Makefile +1 -1
@@ -6,4 +6,4 @@ obj-$(CONFIG_INFINIBAND_IONIC) += ionic_rdma.o ionic_rdma-y := \ ionic_ibdev.o ionic_lif_cfg.o ionic_queue.o ionic_pgtbl.o ionic_admin.o \ - ionic_controlpath.o ionic_datapath.o ionic_hw_stats.o + ionic_controlpath.o ionic_datapath.o ionic_hw_stats.o ionic_debugfs.o
drivers/infiniband/hw/ionic/ionic_admin.c +4 -0
@@ -586,6 +586,7 @@ static struct ionic_aq *__ionic_create_rdma_adminq(struct ionic_ibdev *dev,INIT_WORK (&aq->work, ionic_admin_work); aq->armed = false; +ionic_dbg_add_aq (dev, aq);return aq;
@@ -600,6 +601,7 @@ static struct ionic_aq *__ionic_create_rdma_adminq(struct ionic_ibdev *dev,static void __ionic_destroy_rdma_adminq (struct ionic_ibdev *dev,struct ionic_aq *aq) { +ionic_dbg_rm_aq (aq);kfree (aq->q_wr);ionic_queue_destroy (&aq->q, dev->lif_cfg.hwdev);kfree (aq);
@@ -1032,6 +1034,7 @@ static struct ionic_eq *ionic_create_eq(struct ionic_ibdev *dev, int eqid) goto err_cmd;ionic_intr_mask (dev->lif_cfg.intr_ctrl, eq->intr,IONIC_INTR_MASK_CLEAR ); +ionic_dbg_add_eq (dev, eq);return eq;
@@ -1053,6 +1056,7 @@ static void ionic_destroy_eq(struct ionic_eq *eq) {struct ionic_ibdev *dev = eq->dev; +ionic_dbg_rm_eq (eq); eq->enable = false;free_irq (eq->irq, eq);flush_work (&eq->work);
drivers/infiniband/hw/ionic/ionic_controlpath.c +14 -0
@@ -153,6 +153,8 @@ int ionic_create_cq_common(struct ionic_vcq *vcq, goto err_xa; } +ionic_dbg_add_cq (dev, cq); +return 0 ; err_xa:
@@ -176,6 +178,7 @@ void ionic_destroy_cq_common(struct ionic_ibdev *dev, struct ionic_cq *cq)if (!cq->vcq)return ; +ionic_dbg_rm_cq (cq);xa_erase_irq (&dev->cq_tbl, cq->cqid);kref_put (&cq->cq_kref, ionic_cq_complete);
@@ -918,6 +921,7 @@ struct ib_mr *ionic_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 length, goto err_cmd;ionic_pgtbl_unbuf (dev, &mr->buf); +ionic_dbg_add_mr (dev, mr);return &mr->ibmr;
@@ -988,6 +992,7 @@ struct ib_mr *ionic_reg_user_mr_dmabuf(struct ib_pd *ibpd, u64 offset, goto err_cmd;ionic_pgtbl_unbuf (dev, &mr->buf); +ionic_dbg_add_mr (dev, mr);return &mr->ibmr;
@@ -1017,6 +1022,7 @@ int ionic_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata)return rc; } +ionic_dbg_rm_mr (mr);ionic_pgtbl_unbuf (dev, &mr->buf);if (mr->umem)
@@ -1064,6 +1070,8 @@ struct ib_mr *ionic_alloc_mr(struct ib_pd *ibpd, enum ib_mr_type type,if (rc) goto err_cmd; +ionic_dbg_add_mr (dev, mr); +return &mr->ibmr; err_cmd:
@@ -1135,6 +1143,8 @@ int ionic_alloc_mw(struct ib_mw *ibmw, struct ib_udata *udata)if (rc) goto err_cmd; +ionic_dbg_add_mr (dev, mr); +return 0 ; err_cmd:
@@ -1152,6 +1162,7 @@ int ionic_dealloc_mw(struct ib_mw *ibmw)if (rc)return rc; +ionic_dbg_rm_mr (mr);ionic_put_mrid (dev, mr->mrid);return 0 ;
@@ -2364,6 +2375,8 @@ int ionic_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *attr, qp->rq_cqid = cq->cqid; } +ionic_dbg_add_qp (dev, qp); +return 0 ; err_resp:
@@ -2643,6 +2656,7 @@ int ionic_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata)if (rc)return rc; +ionic_dbg_rm_qp (qp);xa_erase_irq (&dev->qp_tbl, qp->qpid);kref_put (&qp->qp_kref, ionic_qp_complete);
drivers/infiniband/hw/ionic/ionic_debugfs.c new file +750 -0
750 lines not on this page · raw message
drivers/infiniband/hw/ionic/ionic_ibdev.c +3 -0
@@ -294,6 +294,7 @@ static void ionic_destroy_ibdev(struct ionic_ibdev *dev)ionic_stats_cleanup (dev);ionic_destroy_rdma_admin (dev);ionic_destroy_resids (dev); +ionic_dbg_rm_dev (dev);WARN_ON (!xa_empty (&dev->qp_tbl));xa_destroy (&dev->qp_tbl);WARN_ON (!xa_empty (&dev->cq_tbl));
@@ -318,6 +319,7 @@ static struct ionic_ibdev *ionic_create_ibdev(struct ionic_aux_dev *ionic_adev)xa_init_flags (&dev->cq_tbl,GFP_ATOMIC );ionic_init_resids (dev); +ionic_dbg_add_dev (dev, dev->lif_cfg.dbg_ctx); rc =ionic_rdma_reset_devcmd (dev);if (rc)
@@ -364,6 +366,7 @@ static struct ionic_ibdev *ionic_create_ibdev(struct ionic_aux_dev *ionic_adev)ionic_destroy_rdma_admin (dev); err_reset:ionic_destroy_resids (dev); +ionic_dbg_rm_dev (dev);xa_destroy (&dev->qp_tbl);xa_destroy (&dev->cq_tbl);ib_dealloc_device (&dev->ibdev);
drivers/infiniband/hw/ionic/ionic_ibdev.h +29 -0
@@ -115,6 +115,13 @@ struct ionic_ibdev {void *hw_stats_buf;struct rdma_stat_desc *hw_stats_hdrs;struct ionic_counter_stats *counter_stats; +struct dentry *debug; +struct dentry *debug_aq; +struct dentry *debug_cq; +struct dentry *debug_eq; +struct dentry *debug_mr; +struct dentry *debug_qp; +int hw_stats_count; };
@@ -133,6 +140,7 @@ struct ionic_eq {int irq;char name[32 ]; +struct dentry *debug; };struct ionic_admin_wr {
@@ -167,6 +175,9 @@ struct ionic_aq {struct ionic_admin_wr_q *q_wr;struct list_head wr_prod;struct list_head wr_post; +struct dentry *debug; +struct ionic_admin_wr *debug_wr; +struct mutex debug_mutex;/* for debug_wr */ };struct ionic_ctx {
@@ -215,6 +226,7 @@ struct ionic_cq {/* infrequently accessed, keep at end */ struct ib_umem *umem; +struct dentry *debug; };struct ionic_vcq {
@@ -304,6 +316,7 @@ struct ionic_qp {int dcqcn_profile;struct ib_ud_header *hdr; +struct dentry *debug; };struct ionic_ah {
@@ -323,6 +336,7 @@ struct ionic_mr {int flags;struct ib_umem *umem; +struct dentry *debug;struct ionic_tbl_buf buf;bool created; };
@@ -514,4 +528,19 @@ int ionic_pgtbl_init(struct ionic_ibdev *dev,int limit, u64 page_size);void ionic_pgtbl_unbuf (struct ionic_ibdev *dev,struct ionic_tbl_buf *buf); + +/* ionic_debugfs.c */ +void ionic_dbg_add_dev (struct ionic_ibdev *dev,struct dentry *parent); +void ionic_dbg_rm_dev (struct ionic_ibdev *dev); +void ionic_dbg_add_eq (struct ionic_ibdev *dev,struct ionic_eq *eq); +void ionic_dbg_rm_eq (struct ionic_eq *eq); +void ionic_dbg_add_cq (struct ionic_ibdev *dev,struct ionic_cq *cq); +void ionic_dbg_rm_cq (struct ionic_cq *cq); +void ionic_dbg_add_aq (struct ionic_ibdev *dev,struct ionic_aq *aq); +void ionic_dbg_rm_aq (struct ionic_aq *aq); +void ionic_dbg_add_mr (struct ionic_ibdev *dev,struct ionic_mr *mr); +void ionic_dbg_rm_mr (struct ionic_mr *mr); +void ionic_dbg_add_qp (struct ionic_ibdev *dev,struct ionic_qp *qp); +void ionic_dbg_rm_qp (struct ionic_qp *qp); +#endif /* _IONIC_IBDEV_H_ */
drivers/infiniband/hw/ionic/ionic_lif_cfg.c +3 -0
@@ -51,6 +51,7 @@ void ionic_fill_lif_cfg(struct ionic_lif *lif, struct ionic_lif_cfg *cfg) cfg->page_size_supported =IONIC_PAGE_SIZE_SUPPORTED ; cfg->rdma_version = ident->rdma.version; + cfg->minor_version = ident->rdma.minor_version; cfg->qp_opcodes = ident->rdma.qp_opcodes; cfg->admin_opcodes = ident->rdma.admin_opcodes;
@@ -90,6 +91,8 @@ void ionic_fill_lif_cfg(struct ionic_lif *lif, struct ionic_lif_cfg *cfg) !!(lif->qtype_info[IONIC_QTYPE_TXQ ].features &IONIC_QIDENT_F_EXPDB ); cfg->rq_expdb = !!(lif->qtype_info[IONIC_QTYPE_RXQ ].features &IONIC_QIDENT_F_EXPDB ); + + cfg->dbg_ctx = lif->dentry; }struct net_device *ionic_lif_netdev (struct ionic_lif *lif)
drivers/infiniband/hw/ionic/ionic_lif_cfg.h +2 -0
@@ -14,6 +14,7 @@struct ionic_lif_cfg {struct device *hwdev;struct ionic_lif *lif; +struct dentry *dbg_ctx;int lif_index;int lif_hw_index;
@@ -49,6 +50,7 @@ struct ionic_lif_cfg {u8 udma_qgrp_shift;u8 rdma_version; +u8 minor_version;u8 qp_opcodes;u8 admin_opcodes;
Signature · 1 line
2.17.1
Re: [PATCH net-next 3/4] RDMA/ionic: Add debugfs support
Quoted 9 lines · Eric Joyner
From: Allen Hubbe <[email protected]>
Adds a per-RDMA device debugfs folder under the parent ionic ethernet device's folder for the LIF. Exports RDMA-specific debug information and various queue information.
Signed-off-by Allen Hubbe <[email protected]>Co-developed-by Eric Joyner <[email protected]>Signed-off-by Eric Joyner <[email protected]>
Quoted 11 lines
--- drivers/infiniband/hw/ionic/Makefile | 2 +- drivers/infiniband/hw/ionic/ionic_admin.c | 4 + .../infiniband/hw/ionic/ionic_controlpath.c | 14 + drivers/infiniband/hw/ionic/ionic_debugfs.c | 750 ++++++++++++++++++ drivers/infiniband/hw/ionic/ionic_ibdev.c | 3 + drivers/infiniband/hw/ionic/ionic_ibdev.h | 29 + drivers/infiniband/hw/ionic/ionic_lif_cfg.c | 3 + drivers/infiniband/hw/ionic/ionic_lif_cfg.h | 2 + 8 files changed, 806 insertions(+), 1 deletion(-) create mode 100644 drivers/infiniband/hw/ionic/ionic_debugfs.c
I'll comment on this patch only, but the same issues apply to the whole series.
1. This series should target rdma-next, not net-next.
2. Jakub's feedback is valid and should be addressed.
3. The patch is too large and exposes too many details that should be gathered through the FW (fwctl).
4. It exposes a large number of fields from general RDMA structures, which suggests that this dump is placed in the wrong layer.
Thanks
Jakub Kicinski
maintainerRe: [PATCH net-next 3/4] RDMA/ionic: Add debugfs support
Quoted 2 lines · On Wed, 13 May 2026 10:21:13 +0300 Leon Romanovsky wrote:
3. The patch is too large and exposes too many details that should be gathered through the FW (fwctl).
Why? What's wrong with debugfs? Much easier for people to access.
Re: [PATCH net-next 3/4] RDMA/ionic: Add debugfs support
Quoted 5 lines · Jakub Kicinski
Quoted 2 lines · On Wed, 13 May 2026 10:21:13 +0300 Leon Romanovsky wrote:
3. The patch is too large and exposes too many details that should be gathered through the FW (fwctl).
Why? What's wrong with debugfs? Much easier for people to access.
There is nothing inherently wrong with debugfs. You can see recently accepted debugfs patches from hns [1].
The issue here is what data is being dumped through debugfs, and in what quantity. From a quick look, ionic_dev_info_show() appears to print raw data coming straight from the FW.
In my view, debugfs should expose in‑kernel structures that are shaped and controlled by the kernel itself. IMHO it is not the right place to debug FW state. There can always be exceptions, of course, but in this case the driver is effectively dumping everything from pds_core/FW in the RDMA layer.
Another point: data that is generated and fully managed by pds_core should be presented under drivers/ethernet/... where pds_core actually lives and interfaces with the FW.
It does not belong in RDMA.
Thanks
Re: [PATCH net-next 3/4] RDMA/ionic: Add debugfs support
Quoted 14 lines · Leon Romanovsky
Quoted 5 lines · Jakub Kicinski
Quoted 2 lines · On Wed, 13 May 2026 10:21:13 +0300 Leon Romanovsky wrote:
3. The patch is too large and exposes too many details that should be gathered through the FW (fwctl).
Why? What's wrong with debugfs? Much easier for people to access.
There is nothing inherently wrong with debugfs. You can see recently accepted debugfs patches from hns [1].
The issue here is what data is being dumped through debugfs, and in what quantity. From a quick look,
ionic_dev_info_show()appears to print raw data coming straight from the FW.
Quoted 5 lines
In my view, debugfs should expose in‑kernel structures that are shaped and controlled by the kernel itself. IMHO it is not the right place to debug FW state. There can always be exceptions, of course, but in this case the driver is effectively dumping everything from pds_core/FW in the RDMA layer.
debugfs is for anything you want, there is nothing wrong with doing this in debugfs, in fact, it's preferred. Don't spread debug info out into other areas, that makes it harder for admins and users to properly secure things from stuff they don't want users to have access to.
thanks,
greg k-h
Re: [PATCH net-next 3/4] RDMA/ionic: Add debugfs support
Quoted 21 lines · Greg Kroah-Hartman
Quoted 14 lines · Leon Romanovsky
Quoted 5 lines · Jakub Kicinski
Quoted 2 lines · On Wed, 13 May 2026 10:21:13 +0300 Leon Romanovsky wrote:
3. The patch is too large and exposes too many details that should be gathered through the FW (fwctl).
Why? What's wrong with debugfs? Much easier for people to access.
There is nothing inherently wrong with debugfs. You can see recently accepted debugfs patches from hns [1].
The issue here is what data is being dumped through debugfs, and in what quantity. From a quick look,
ionic_dev_info_show()appears to print raw data coming straight from the FW.Quoted 5 lines
In my view, debugfs should expose in‑kernel structures that are shaped and controlled by the kernel itself. IMHO it is not the right place to debug FW state. There can always be exceptions, of course, but in this case the driver is effectively dumping everything from pds_core/FW in the RDMA layer.
Quoted 4 lines
debugfs is for anything you want, there is nothing wrong with doing this in debugfs, in fact, it's preferred. Don't spread debug info out into other areas, that makes it harder for admins and users to properly secure things from stuff they don't want users to have access to.
We are not discussing a general principle here, but this specific patchset, which dumps information gathered and consumed by one subsystem into another.
If netdev wants to print raw firmware data, they are free to do so. I do not want to see this in RDMA.
Thanks
Quoted 4 lines
thanks,
greg k-h
PATCH 4/4 RDMA/ionic: Add DCQCN parameter configuration via debugfs
In reply to Eric JoynerFrom: Allen Hubbe <[email protected]>
The HCA supports DCQCN with multiple profiles; these are normally configured through a userspace utility, but expose these profiles and their parameters for debug purposes via debugfs.
To use these, the firmware must be configured in the mode that expects DCQCN settings to be programmed by the driver, otherwise the firmware will silently fail and indicate success without any changes actually occurring.
--- drivers/infiniband/hw/ionic/Makefile | 3 +- .../infiniband/hw/ionic/ionic_controlpath.c | 5 + drivers/infiniband/hw/ionic/ionic_dcqcn.c | 629 ++++++++++++++++++ drivers/infiniband/hw/ionic/ionic_fw.h | 31 + drivers/infiniband/hw/ionic/ionic_ibdev.c | 4 + drivers/infiniband/hw/ionic/ionic_ibdev.h | 12 + drivers/infiniband/hw/ionic/ionic_lif_cfg.c | 1 + drivers/infiniband/hw/ionic/ionic_lif_cfg.h | 2 + drivers/infiniband/hw/ionic/ionic_profiles.h | 86 +++ 9 files changed, 772 insertions(+), 1 deletion(-) create mode 100644 drivers/infiniband/hw/ionic/ionic_dcqcn.c create mode 100644 drivers/infiniband/hw/ionic/ionic_profiles.h
drivers/infiniband/hw/ionic/Makefile +2 -1
@@ -6,4 +6,5 @@ obj-$(CONFIG_INFINIBAND_IONIC) += ionic_rdma.o ionic_rdma-y := \ ionic_ibdev.o ionic_lif_cfg.o ionic_queue.o ionic_pgtbl.o ionic_admin.o \ - ionic_controlpath.o ionic_datapath.o ionic_hw_stats.o ionic_debugfs.o + ionic_controlpath.o ionic_datapath.o ionic_hw_stats.o ionic_debugfs.o \ + ionic_dcqcn.o
drivers/infiniband/hw/ionic/ionic_controlpath.c +5 -0
@@ -1512,6 +1512,7 @@ static int ionic_modify_qp_cmd(struct ionic_ibdev *dev,cpu_to_le32 (qp->ahid | (hdr_len <<24 )); wr.wqe.cmd.mod_qp.dma_addr =cpu_to_le64 (hdr_dma); + wr.wqe.cmd.mod_qp.dcqcn_profile = qp->dcqcn_profile; wr.wqe.cmd.mod_qp.en_pcp = attr->ah_attr.sl; wr.wqe.cmd.mod_qp.ip_dscp = grh->traffic_class >>2 ; }
@@ -2586,6 +2587,10 @@ int ionic_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int mask,if (mask &IB_QP_CAP )return -EINVAL ; +if (mask &IB_QP_AV ) + qp->dcqcn_profile = +ionic_dcqcn_select_profile (dev, &attr->ah_attr); + rc =ionic_modify_qp_cmd (dev, pd, qp, attr, mask);if (rc)return rc;
drivers/infiniband/hw/ionic/ionic_dcqcn.c new file +629 -0
629 lines not on this page · raw message
drivers/infiniband/hw/ionic/ionic_fw.h +31 -0
@@ -838,6 +838,36 @@ struct ionic_admin_query_qp {static_assert (sizeof (struct ionic_admin_query_qp ) ==IONIC_ADMIN_QUERY_QP_IN_V1_LEN ); +enum ionic_v1_dcqcn_flags { +IONIC_RPF_CLAMP_TGT_RATE =BIT (0 ), +IONIC_RPF_CLAMP_TGT_RATE_ATI =BIT (1 ), +}; + +struct ionic_admin_mod_dcqcn { +__u8 np_incp_802p_prio; +__u8 np_cnp_dscp; +__be16 rp_dce_tcp_g; +__be32 rp_dce_tcp_rtt; +__be32 rp_rate_reduce_monitor_period; +__be32 rp_rate_to_set_on_first_cnp; +__be32 rp_min_rate; +__be16 rp_initial_alpha_value; +__u8 rp_gd; +__u8 rp_min_dec_fac; +__u8 rp_clamp_flags; +__u8 rp_threshold; +__be16 rp_time_reset; +__be32 rp_qp_rate; +__be32 rp_byte_reset; +__be32 rp_ai_rate; +__be32 rp_hai_rate; +__le32 id_ver; +__be64 rp_token_bucket_size; +} __packed; + +#define IONIC_ADMIN_MODIFY_DCQCN_IN_V1_LEN 56 +static_assert (sizeof (struct ionic_admin_mod_dcqcn ) ==IONIC_ADMIN_MODIFY_DCQCN_IN_V1_LEN ); +#define ADMIN_WQE_STRIDE 64#define ADMIN_WQE_HDR_LEN 4
@@ -860,6 +890,7 @@ struct ionic_v1_admin_wqe {struct ionic_admin_destroy_qp destroy_qp;struct ionic_admin_mod_qp mod_qp;struct ionic_admin_query_qp query_qp; +struct ionic_admin_mod_dcqcn mod_dcqcn; } cmd; };
drivers/infiniband/hw/ionic/ionic_ibdev.c +4 -0
@@ -290,6 +290,8 @@ static void ionic_destroy_resids(struct ionic_ibdev *dev)static void ionic_destroy_ibdev (struct ionic_ibdev *dev) {ionic_kill_rdma_admin (dev, false); + +ionic_dcqcn_destroy (dev);ib_unregister_device (&dev->ibdev);ionic_stats_cleanup (dev);ionic_destroy_rdma_admin (dev);
@@ -357,6 +359,8 @@ static struct ionic_ibdev *ionic_create_ibdev(struct ionic_aux_dev *ionic_adev)if (rc) goto err_register; +ionic_dcqcn_init (dev, dev->lif_cfg.dcqcn_profiles); +return dev; err_register:
drivers/infiniband/hw/ionic/ionic_ibdev.h +12 -0
@@ -74,6 +74,11 @@ enum ionic_mmap_flag { IONIC_MMAP_WC = BIT(0), }; +enum ionic_profile_type { +IONIC_PROFILE_TYPE_DCQCN , +IONIC_PROFILE_TYPE_MAX , +}; +struct ionic_mmap_entry {struct rdma_user_mmap_entry rdma_entry;unsigned long size;
@@ -123,6 +128,7 @@ struct ionic_ibdev {struct dentry *debug_qp;int hw_stats_count; +struct ionic_profile_root *profile[IONIC_PROFILE_TYPE_MAX ]; };struct ionic_eq {
@@ -543,4 +549,10 @@ void ionic_dbg_rm_mr(struct ionic_mr *mr);void ionic_dbg_add_qp (struct ionic_ibdev *dev,struct ionic_qp *qp);void ionic_dbg_rm_qp (struct ionic_qp *qp); +/* ionic_dcqcn.c */ +int ionic_dcqcn_init (struct ionic_ibdev *dev,int prof_count); +void ionic_dcqcn_destroy (struct ionic_ibdev *dev); +int ionic_dcqcn_select_profile (struct ionic_ibdev *dev, +struct rdma_ah_attr *attr); +#endif /* _IONIC_IBDEV_H_ */
drivers/infiniband/hw/ionic/ionic_lif_cfg.c +1 -0
@@ -93,6 +93,7 @@ void ionic_fill_lif_cfg(struct ionic_lif *lif, struct ionic_lif_cfg *cfg) !!(lif->qtype_info[IONIC_QTYPE_RXQ ].features &IONIC_QIDENT_F_EXPDB ); cfg->dbg_ctx = lif->dentry; + cfg->dcqcn_profiles = ident->rdma.dcqcn_profiles; }struct net_device *ionic_lif_netdev (struct ionic_lif *lif)
drivers/infiniband/hw/ionic/ionic_lif_cfg.h +2 -0
@@ -58,6 +58,8 @@ struct ionic_lif_cfg {bool sq_expdb;bool rq_expdb;u8 expdb_mask; + +u8 dcqcn_profiles; };void ionic_fill_lif_cfg (struct ionic_lif *lif,struct ionic_lif_cfg *cfg);
drivers/infiniband/hw/ionic/ionic_profiles.h new file +86 -0
86 lines not on this page · raw message
Signature · 1 line
2.17.1
Re: [PATCH net-next 4/4] RDMA/ionic: Add DCQCN parameter configuration via debugfs
Quoted 910 lines · Eric Joyner
From: Allen Hubbe <[email protected]>
The HCA supports DCQCN with multiple profiles; these are normally configured through a userspace utility, but expose these profiles and their parameters for debug purposes via debugfs.
To use these, the firmware must be configured in the mode that expects DCQCN settings to be programmed by the driver, otherwise the firmware will silently fail and indicate success without any changes actually occurring.
Signed-off-by Allen Hubbe <[email protected]>Co-developed-by Eric Joyner <[email protected]>Signed-off-by Eric Joyner <[email protected]>--- drivers/infiniband/hw/ionic/Makefile | 3 +- .../infiniband/hw/ionic/ionic_controlpath.c | 5 + drivers/infiniband/hw/ionic/ionic_dcqcn.c | 629 ++++++++++++++++++ drivers/infiniband/hw/ionic/ionic_fw.h | 31 + drivers/infiniband/hw/ionic/ionic_ibdev.c | 4 + drivers/infiniband/hw/ionic/ionic_ibdev.h | 12 + drivers/infiniband/hw/ionic/ionic_lif_cfg.c | 1 + drivers/infiniband/hw/ionic/ionic_lif_cfg.h | 2 + drivers/infiniband/hw/ionic/ionic_profiles.h | 86 +++ 9 files changed, 772 insertions(+), 1 deletion(-) create mode 100644 drivers/infiniband/hw/ionic/ionic_dcqcn.c create mode 100644 drivers/infiniband/hw/ionic/ionic_profiles.hdrivers/infiniband/hw/ionic/Makefile +2
-1@@ -6,4 +6,5 @@ obj-$(CONFIG_INFINIBAND_IONIC) += ionic_rdma.o ionic_rdma-y := \ ionic_ibdev.o ionic_lif_cfg.o ionic_queue.o ionic_pgtbl.o ionic_admin.o \ - ionic_controlpath.o ionic_datapath.o ionic_hw_stats.o ionic_debugfs.o + ionic_controlpath.o ionic_datapath.o ionic_hw_stats.o ionic_debugfs.o \ + ionic_dcqcn.odrivers/infiniband/hw/ionic/ionic_controlpath.c +5
-0@@ -1512,6 +1512,7 @@ static int ionic_modify_qp_cmd(struct ionic_ibdev *dev,cpu_to_le32 (qp->ahid | (hdr_len <<24 )); wr.wqe.cmd.mod_qp.dma_addr =cpu_to_le64 (hdr_dma); + wr.wqe.cmd.mod_qp.dcqcn_profile = qp->dcqcn_profile; wr.wqe.cmd.mod_qp.en_pcp = attr->ah_attr.sl; wr.wqe.cmd.mod_qp.ip_dscp = grh->traffic_class >>2 ; }@@ -2586,6 +2587,10 @@ int ionic_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int mask,if (mask &IB_QP_CAP )return -EINVAL ; +if (mask &IB_QP_AV ) + qp->dcqcn_profile = +ionic_dcqcn_select_profile (dev, &attr->ah_attr); + rc =ionic_modify_qp_cmd (dev, pd, qp, attr, mask);if (rc)return rc;drivers/infiniband/hw/ionic/ionic_dcqcn.c new file +629
-0@@ -0,0 +1,629 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ + +#include <linux/debugfs.h> + +#include "ionic_ibdev.h" +#include "ionic_profiles.h" + +static const struct ionic_profile_vals dcqcn_defaults[] = { + { + .v[NP_ICNP_802P_PRIO ] =6 , + .v[NP_CNP_DSCP ] =46 , + .v[RP_TOKEN_BUCKET_SIZE ] =800000 , + .v[RP_INITIAL_ALPHA_VALUE ] =64 , + .v[RP_DCE_TCP_G ] =512 , + .v[RP_DCE_TCP_RTT ] =1 , + .v[RP_RATE_REDUCE_MONITOR_PERIOD ] =1 , + .v[RP_MIN_RATE ] =1 , + .v[RP_GD ] =11 , + .v[RP_MIN_DEC_FAC ] =50 , + .v[RP_CLAMP_TGT_RATE_ATI ] =1 , + .v[RP_THRESHOLD ] =1 , + .v[RP_TIME_RESET ] =1 , + .v[RP_QP_RATE ] =100000 , + .v[RP_BYTE_RESET ] =431068 , + .v[RP_AI_RATE ] =160 , + .v[RP_HAI_RATE ] =300 , + }, +}; + +#define DCQCN_INT_ATTR (_min, _max, _name) \ + { .min = (_min), .max = (_max), .name = (_name) } + +#define DCQCN_BOOL_ATTR (_name) \ + DCQCN_INT_ATTR(0, 1, _name) + +static const struct ionic_dcqcn_param_attr dcqcn_attrs[] = { +/* under "roce_np" */ +DCQCN_INT_ATTR (0 ,7 ,"icnp_802p_prio" ), +DCQCN_INT_ATTR (0 ,63 ,"cnp_dscp" ), +/* under "roce_rp" */ +DCQCN_INT_ATTR (100 ,200000000 ,"token_bucket_size" ), +DCQCN_INT_ATTR (0 ,1023 ,"initial_alpha_value" ), +DCQCN_INT_ATTR (0 ,1023 ,"dce_tcp_g" ), +DCQCN_INT_ATTR (1 ,131071 ,"dce_tcp_rtt" ), +DCQCN_INT_ATTR (1 ,INT_MAX ,"rate_reduce_monitor_period" ), +DCQCN_INT_ATTR (1 ,INT_MAX ,"rate_to_set_on_first_cnp" ), +DCQCN_INT_ATTR (1 ,INT_MAX ,"min_rate" ), +DCQCN_INT_ATTR (1 ,11 ,"gd" ), +DCQCN_INT_ATTR (0 ,100 ,"min_dec_fac" ), +DCQCN_BOOL_ATTR ("clamp_tgt_rate" ), +DCQCN_BOOL_ATTR ("clamp_tgt_rate_ati" ), +DCQCN_INT_ATTR (1 ,31 ,"threshold" ), +DCQCN_INT_ATTR (1 ,32767 ,"time_reset" ), +DCQCN_INT_ATTR (1 ,INT_MAX ,"qp_rate" ), +DCQCN_INT_ATTR (1 ,INT_MAX ,"byte_reset" ), +DCQCN_INT_ATTR (1 ,INT_MAX ,"ai_rate" ), +DCQCN_INT_ATTR (1 ,INT_MAX ,"hai_rate" ), +}; + +static void dcqcn_set_profile (struct ionic_profile *profile) +{ +struct ionic_ibdev *dev = profile->dev; +struct ionic_admin_wr wr = { + .work =COMPLETION_INITIALIZER_ONSTACK (wr.work), + .wqe = { + .op =IONIC_V1_ADMIN_MODIFY_DCQCN , + .len =cpu_to_le16 (IONIC_ADMIN_MODIFY_DCQCN_IN_V1_LEN ), + .cmd.mod_dcqcn = { + .id_ver =cpu_to_le32 (profile->idx +1 ), + } + } + }; +int rc; + + wr.wqe.cmd.mod_dcqcn.np_incp_802p_prio = + profile->vals.v[NP_ICNP_802P_PRIO ]; + + wr.wqe.cmd.mod_dcqcn.np_cnp_dscp = + profile->vals.v[NP_CNP_DSCP ]; + + wr.wqe.cmd.mod_dcqcn.rp_token_bucket_size = +cpu_to_be64 (profile->vals.v[RP_TOKEN_BUCKET_SIZE ]); + + wr.wqe.cmd.mod_dcqcn.rp_initial_alpha_value = +cpu_to_be16 (profile->vals.v[RP_INITIAL_ALPHA_VALUE ]); + + wr.wqe.cmd.mod_dcqcn.rp_dce_tcp_g = +cpu_to_be16 (profile->vals.v[RP_DCE_TCP_G ]); + + wr.wqe.cmd.mod_dcqcn.rp_dce_tcp_rtt = +cpu_to_be32 (profile->vals.v[RP_DCE_TCP_RTT ]); + + wr.wqe.cmd.mod_dcqcn.rp_rate_reduce_monitor_period = +cpu_to_be32 (profile->vals.v[RP_RATE_REDUCE_MONITOR_PERIOD ]); + + wr.wqe.cmd.mod_dcqcn.rp_rate_to_set_on_first_cnp = +cpu_to_be32 (profile->vals.v[RP_RATE_TO_SET_ON_FIRST_CNP ]); + + wr.wqe.cmd.mod_dcqcn.rp_min_rate = +cpu_to_be32 (profile->vals.v[RP_MIN_RATE ]); + + wr.wqe.cmd.mod_dcqcn.rp_gd = + profile->vals.v[RP_GD ]; + + wr.wqe.cmd.mod_dcqcn.rp_min_dec_fac = + profile->vals.v[RP_MIN_DEC_FAC ]; + +if (profile->vals.v[RP_CLAMP_TGT_RATE ]) + wr.wqe.cmd.mod_dcqcn.rp_clamp_flags |=IONIC_RPF_CLAMP_TGT_RATE ; + +if (profile->vals.v[RP_CLAMP_TGT_RATE_ATI ]) + wr.wqe.cmd.mod_dcqcn.rp_clamp_flags |= +IONIC_RPF_CLAMP_TGT_RATE_ATI ; + + wr.wqe.cmd.mod_dcqcn.rp_threshold = + profile->vals.v[RP_THRESHOLD ]; + + wr.wqe.cmd.mod_dcqcn.rp_time_reset = +cpu_to_be32 (profile->vals.v[RP_TIME_RESET ]); + + wr.wqe.cmd.mod_dcqcn.rp_qp_rate = +cpu_to_be32 (profile->vals.v[RP_QP_RATE ]); + + wr.wqe.cmd.mod_dcqcn.rp_byte_reset = +cpu_to_be32 (profile->vals.v[RP_BYTE_RESET ]); + + wr.wqe.cmd.mod_dcqcn.rp_ai_rate = +cpu_to_be32 (profile->vals.v[RP_AI_RATE ]); + + wr.wqe.cmd.mod_dcqcn.rp_hai_rate = +cpu_to_be32 (profile->vals.v[RP_HAI_RATE ]); + +ionic_admin_post (dev, &wr); + rc =ionic_admin_wait (dev, &wr,IONIC_ADMIN_F_INTERRUPT ); +if (rc) +ibdev_warn (&dev->ibdev,"dcqcn profile %d not set, error %d\n" , + profile->idx +1 , rc); +} + +static int dcqcn_param_show (struct seq_file *s,void *v) +{ +struct ionic_dcqcn_param_entry *entry = s->private; +struct ionic_profile *profile = entry->profile; +int val = profile->vals.v[entry->var]; + +seq_printf (s,"%d\n" , val); +return 0 ; +} + +static ssize_t dcqcn_param_write (struct file *fp,const char __user *ubuf, +size_t count,loff_t *ppos) +{ +struct seq_file *s = fp->private_data; +struct ionic_dcqcn_param_entry *entry; +struct ionic_profile *profile; +int rc, val; +char *buf; + + entry = s->private; + profile = entry->profile; + + buf =memdup_user_nul (ubuf, count); +if (IS_ERR (buf)) +return PTR_ERR (buf); + + rc =kstrtoint (buf,0 , &val); +if (rc <0 ) + goto out; + +if (val < dcqcn_attrs[entry->var].min || + val > dcqcn_attrs[entry->var].max) { + rc = -EINVAL ; + goto out; + } + + profile->vals.v[entry->var] = val; + +dcqcn_set_profile (profile); +out: +kfree (buf); +return rc ?: count; +} +DEFINE_SHOW_STORE_ATTRIBUTE (dcqcn_param); + +static const struct ionic_profile_vals *dcqcn_get_defaults (int prof_i) +{ +if (prof_i <0 || prof_i >=ARRAY_SIZE (dcqcn_defaults)) +return &dcqcn_defaults[0 ]; + +return &dcqcn_defaults[prof_i]; +} + +static int dcqcn_match_default_show (struct seq_file *s,void *v) +{ +struct ionic_profile_root *profile_root = s->private; +int val = profile_root->profiles_default; + +seq_printf (s,"%d\n" , val); +return 0 ; +} + +static ssize_t dcqcn_match_default_write (struct file *fp,const char __user *ubuf, +size_t count,loff_t *ppos) +{ +struct ionic_profile_root *profile_root; +struct seq_file *s = fp->private_data; +int rc, val; +char *buf; + + profile_root = s->private; + + buf =memdup_user_nul (ubuf, count); +if (IS_ERR (buf)) +return PTR_ERR (buf); + + rc =kstrtoint (buf,0 , &val); +if (rc <0 ) + goto out; + +if (val <0 || val > profile_root->profiles_count) { + rc = -EINVAL ; + goto out; + } + + profile_root->profiles_default = val; + +out: +kfree (buf); +return rc ?: count; +} +DEFINE_SHOW_STORE_ATTRIBUTE (dcqcn_match_default); + +static int dcqcn_match_rules_show (struct seq_file *s,void *v) +{ +struct ionic_profile_root *profile_root = s->private; +struct ionic_match_rule *rule, *rules; +unsigned long irqflags; +int i, rules_count; + +spin_lock_irqsave (&profile_root->rules_lock, irqflags); + + rules = profile_root->rules; + rules_count = profile_root->rules_count; +for (i =0 ; i < rules_count; ++i) { + rule = &rules[i]; +seq_printf (s,"%s %d %d\n" , rule->name, rule->cond, rule->prof); + } + +spin_unlock_irqrestore (&profile_root->rules_lock, irqflags); + +return 0 ; +} + +static bool ionic_match_prio (struct rdma_ah_attr *attr,int cond) +{ +int prio = attr->sl; + +return prio >=0 && prio <8 && (cond &BIT (prio)); +} + +static bool ionic_match_gid (struct rdma_ah_attr *attr,int cond) +{ +int gid =rdma_ah_read_grh (attr)->sgid_index; + +return gid == cond; +} + +static bool ionic_parse_rule_name (const char *name,const char *buf,int count) +{ +return !strncmp (name, buf, count) && !name[count]; +} + +static int ionic_parse_match_rules (const char *buf,size_t count, +int prof_count,int rules_count, +struct ionic_match_rule *rules) +{ +bool (*match)(struct rdma_ah_attr *attr,int cond); +struct ionic_match_rule *rule; +int cmd, cond, prof, end; +int rc, rule_i =0 ; +const char *name; + +for (;; ++rule_i) { +/* skip leading whitespace */ + + rc =sscanf (buf," %n" , &end); +if (rc !=0 ) +return -EINVAL ; + + buf += end; + count -= end; + +/* break at end of buffer */ + +if (!count) +break ; + +/* Parse one rule, as: +* <name> <condition> <profile> +* +* Name and condition determine when a rule will be a match. +* If a rule is a match, then use the inidcated DCQCN profile. +* +* If name eq "gid": +* then condition is a gid index. +* +* eg: gid 5 3 -> for gid index 5, use profile 3. +* +* If name eq "prio": +* then condition is a bitmask of 802.1p priorities. +* +* eg: prio 0xc 1 -> for 802.1p priority 2 or 3, use profile 1. +*/ + + rc =sscanf (buf,"%*s%n%i%i%n" , &cmd, &cond, &prof, &end); +if (rc !=2 ) +return -EINVAL ; + +/* rule name in first `cmd` chars of `buf` */ + +if (ionic_parse_rule_name ("gid" , buf, cmd)) { + match = ionic_match_gid; + name ="gid" ; + }else if (ionic_parse_rule_name ("prio" , buf, cmd)) { + match = ionic_match_prio; + name ="prio" ; + }else { +return -EINVAL ; + } + +if (prof <0 || prof > prof_count) +return -EINVAL ; + +if (rule_i < rules_count) { + rule = &rules[rule_i]; + rule->match = match; + rule->name = name; + rule->cond = cond; + rule->prof = prof; + } + + buf += end; + count -= end; + } + +return rule_i; +} + +static ssize_t dcqcn_match_rules_write (struct file *fp, +const char __user *ubuf, +size_t count,loff_t *ppos) +{ +struct ionic_profile_root *profile_root; +struct seq_file *s = fp->private_data; +unsigned long irqflags; +int rc, rules_count; +char *buf; + + profile_root = s->private; + + buf =memdup_user_nul (ubuf, count); +if (IS_ERR (buf)) +return PTR_ERR (buf); + +/* validate and count rules */ + rc =ionic_parse_match_rules (buf, count, profile_root->profiles_count, +0 ,NULL ); +if (rc <0 ) + goto out; + + rules_count = rc; + rc =0 ; + +/* clear previous rules */ +spin_lock_irqsave (&profile_root->rules_lock, irqflags); + profile_root->rules_count =0 ; +spin_unlock_irqrestore (&profile_root->rules_lock, irqflags); + +kfree (profile_root->rules); + profile_root->rules =NULL ; + +/* assign new rules */ +if (rules_count) { + profile_root->rules =kzalloc_objs (*profile_root->rules, + rules_count); +if (!profile_root->rules) { + rc = -ENOMEM ; + goto out; + } + +ionic_parse_match_rules (buf, count, profile_root->profiles_count, + rules_count, profile_root->rules); + +spin_lock_irqsave (&profile_root->rules_lock, irqflags); + profile_root->rules_count = rules_count; +spin_unlock_irqrestore (&profile_root->rules_lock, irqflags); + } +out: +kfree (buf); +return rc ?: count; +} +DEFINE_SHOW_STORE_ATTRIBUTE (dcqcn_match_rules); + +static ssize_t dcqcn_profile_reset (struct file *fp,const char __user *ubuf, +size_t count,loff_t *ppos) +{ +struct ionic_profile *profile = fp->private_data; +int rc =0 ; +char *buf; + + buf =memdup_user_nul (ubuf,2 ); +if (IS_ERR (buf)) +return PTR_ERR (buf); + +if (strcmp (buf,"1" ) &&strcmp (buf,"1\n" )) { + rc = -EINVAL ; + goto out; + } + + profile->vals = *dcqcn_get_defaults (profile->idx); +dcqcn_set_profile (profile); + +out: +kfree (buf); +return rc ?: count; +} + +static const struct file_operations dcqcn_profile_reset_fops = { + .owner =THIS_MODULE , + .open = simple_open, + .write = dcqcn_profile_reset, +}; + +static void ionic_dcqcn_add_profile_params (struct ionic_profile *profile) +{ +struct ionic_dcqcn_param_entry *entry; +struct dentry *dentry; +int i; + +for (i =0 ; i <DCQCN_VAR_COUNT ; i++) { + entry = &profile->entries[i]; + + entry->profile = profile; + entry->var = i; + +if (i <=NP_CNP_DSCP ) + dentry = profile->roce_np_debug; +else + dentry = profile->roce_rp_debug; + +debugfs_create_file (dcqcn_attrs[i].name,0640 , dentry, entry, + &dcqcn_param_fops); + } +} + +int ionic_dcqcn_init (struct ionic_ibdev *dev,int prof_count) +{ +const enum ionic_profile_type type =IONIC_PROFILE_TYPE_DCQCN ; +struct ionic_profile_root *profile_root; +int rc, i; + +if (!prof_count) +return 0 ; + + dev->profile[type] =kzalloc_obj (*dev->profile[type]); +if (!dev->profile[type]) { + rc = -ENOMEM ; + goto err_cb_alloc; + } + + profile_root = dev->profile[type]; + profile_root->dev = dev; + +spin_lock_init (&profile_root->rules_lock); + + profile_root->debug =debugfs_create_dir ("dcqcn" , dev->debug); +if (IS_ERR (profile_root->debug)) { + profile_root->debug =NULL ; + goto err_cb_dentry; + } + +debugfs_create_file ("match_default" ,0640 , profile_root->debug, + profile_root, &dcqcn_match_default_fops); +debugfs_create_file ("match_rules" ,0640 , profile_root->debug, + profile_root, &dcqcn_match_rules_fops); + + profile_root->profiles_debug =debugfs_create_dir ("profiles" , + profile_root->debug); +if (IS_ERR (profile_root->profiles_debug)) { + profile_root->profiles_debug =NULL ; + goto err_prof_dentry; + } + + profile_root->profiles =kzalloc_objs (*profile_root->profiles, + prof_count); +if (!profile_root->profiles) { + rc = -ENOMEM ; + goto err_prof_alloc; + } + + profile_root->profiles_default =0 ; + +for (i =0 ; i < prof_count; ++i) { +struct ionic_profile *profile = &profile_root->profiles[i]; +char name[8 ]; + + profile->dev = dev; + profile->vals = *dcqcn_get_defaults (i); + profile->idx = i; + +dcqcn_set_profile (profile); + +snprintf (name,sizeof (name),"%d" , i +1 ); + profile->debug =debugfs_create_dir (name, + profile_root->profiles_debug); +if (IS_ERR (profile->debug)) { + profile->debug =NULL ; +break ; + } + +debugfs_create_file ("reset" ,0640 , profile->debug, profile, + &dcqcn_profile_reset_fops); + + profile->entries =kzalloc_objs (*profile->entries, +DCQCN_VAR_COUNT ); + + profile->roce_np_debug =debugfs_create_dir ("roce_np" , + profile->debug); +if (IS_ERR (profile->roce_np_debug)) { + profile->roce_np_debug =NULL ; +break ; + } + + profile->roce_rp_debug =debugfs_create_dir ("roce_rp" , + profile->debug); +if (IS_ERR (profile->roce_rp_debug)) { + profile->roce_rp_debug =NULL ; +break ; + } + +ionic_dcqcn_add_profile_params (profile); + } + +if (!i) + goto err_prof_init; + + profile_root->profiles_count = i; +if (i != prof_count) { +ibdev_warn (&dev->ibdev, +"dcqcn initialized %d out of %d profiles\n" , + i, prof_count); + } +return 0 ; + +err_prof_init: +kfree (profile_root->profiles); +err_prof_alloc: +debugfs_remove_recursive (profile_root->profiles_debug); +err_prof_dentry: +debugfs_remove_recursive (profile_root->debug); +err_cb_dentry: +kfree (dev->profile[type]); + dev->profile[type] =NULL ; +err_cb_alloc: +ibdev_warn (&dev->ibdev,"dcqcn failed init, error %d\n" , rc); +return rc; +} + +void ionic_dcqcn_destroy (struct ionic_ibdev *dev) +{ +struct ionic_profile_root *profile_root; +int i, prof_count; + + profile_root = dev->profile[IONIC_PROFILE_TYPE_DCQCN ]; + +if (!profile_root) +return ; + prof_count = profile_root->profiles_count; +for (i =0 ; i < prof_count; ++i) { +struct ionic_profile *profile; + + profile = &profile_root->profiles[i]; + +kfree (profile->entries); +debugfs_remove_recursive (profile->debug); + } + +debugfs_remove_recursive (profile_root->profiles_debug); +kfree (profile_root->rules); +kfree (profile_root->profiles); + +debugfs_remove_recursive (profile_root->debug); + +kfree (profile_root); + dev->profile[IONIC_PROFILE_TYPE_DCQCN ] =NULL ; +} + +int ionic_dcqcn_select_profile (struct ionic_ibdev *dev, +struct rdma_ah_attr *attr) +{ +struct ionic_profile_root *profile_root; +struct ionic_match_rule *rule, *rules; +int i, rules_count, prof; +unsigned long irqflags; + +if (!dev->profile[IONIC_PROFILE_TYPE_DCQCN ]) +return 0 ; + + profile_root = dev->profile[IONIC_PROFILE_TYPE_DCQCN ]; + +spin_lock_irqsave (&profile_root->rules_lock, irqflags); + + prof = profile_root->profiles_default; + rules = profile_root->rules; + rules_count = profile_root->rules_count; + +for (i =0 ; i < rules_count; ++i) { + rule = &rules[i]; +if (rule->match (attr, rule->cond)) { + prof = rule->prof; +break ; + } + } + +spin_unlock_irqrestore (&profile_root->rules_lock, irqflags); + +return prof; +}drivers/infiniband/hw/ionic/ionic_fw.h +31
-0@@ -838,6 +838,36 @@ struct ionic_admin_query_qp {static_assert (sizeof (struct ionic_admin_query_qp ) ==IONIC_ADMIN_QUERY_QP_IN_V1_LEN ); +enum ionic_v1_dcqcn_flags { +IONIC_RPF_CLAMP_TGT_RATE =BIT (0 ), +IONIC_RPF_CLAMP_TGT_RATE_ATI =BIT (1 ), +}; + +struct ionic_admin_mod_dcqcn { +__u8 np_incp_802p_prio; +__u8 np_cnp_dscp; +__be16 rp_dce_tcp_g; +__be32 rp_dce_tcp_rtt; +__be32 rp_rate_reduce_monitor_period; +__be32 rp_rate_to_set_on_first_cnp; +__be32 rp_min_rate; +__be16 rp_initial_alpha_value; +__u8 rp_gd; +__u8 rp_min_dec_fac; +__u8 rp_clamp_flags; +__u8 rp_threshold; +__be16 rp_time_reset; +__be32 rp_qp_rate; +__be32 rp_byte_reset; +__be32 rp_ai_rate; +__be32 rp_hai_rate; +__le32 id_ver; +__be64 rp_token_bucket_size; +} __packed; + +#define IONIC_ADMIN_MODIFY_DCQCN_IN_V1_LEN 56 +static_assert (sizeof (struct ionic_admin_mod_dcqcn ) ==IONIC_ADMIN_MODIFY_DCQCN_IN_V1_LEN ); +#define ADMIN_WQE_STRIDE 64#define ADMIN_WQE_HDR_LEN 4@@ -860,6 +890,7 @@ struct ionic_v1_admin_wqe {struct ionic_admin_destroy_qp destroy_qp;struct ionic_admin_mod_qp mod_qp;struct ionic_admin_query_qp query_qp; +struct ionic_admin_mod_dcqcn mod_dcqcn; } cmd; };drivers/infiniband/hw/ionic/ionic_ibdev.c +4
-0@@ -290,6 +290,8 @@ static void ionic_destroy_resids(struct ionic_ibdev *dev)static void ionic_destroy_ibdev (struct ionic_ibdev *dev) {ionic_kill_rdma_admin (dev, false); + +ionic_dcqcn_destroy (dev);ib_unregister_device (&dev->ibdev);ionic_stats_cleanup (dev);ionic_destroy_rdma_admin (dev);@@ -357,6 +359,8 @@ static struct ionic_ibdev *ionic_create_ibdev(struct ionic_aux_dev *ionic_adev)if (rc) goto err_register; +ionic_dcqcn_init (dev, dev->lif_cfg.dcqcn_profiles); +return dev; err_register:drivers/infiniband/hw/ionic/ionic_ibdev.h +12
-0@@ -74,6 +74,11 @@ enum ionic_mmap_flag { IONIC_MMAP_WC = BIT(0), }; +enum ionic_profile_type { +IONIC_PROFILE_TYPE_DCQCN , +IONIC_PROFILE_TYPE_MAX , +}; +struct ionic_mmap_entry {struct rdma_user_mmap_entry rdma_entry;unsigned long size;@@ -123,6 +128,7 @@ struct ionic_ibdev {struct dentry *debug_qp;int hw_stats_count; +struct ionic_profile_root *profile[IONIC_PROFILE_TYPE_MAX ]; };struct ionic_eq {@@ -543,4 +549,10 @@ void ionic_dbg_rm_mr(struct ionic_mr *mr);void ionic_dbg_add_qp (struct ionic_ibdev *dev,struct ionic_qp *qp);void ionic_dbg_rm_qp (struct ionic_qp *qp); +/* ionic_dcqcn.c */ +int ionic_dcqcn_init (struct ionic_ibdev *dev,int prof_count); +void ionic_dcqcn_destroy (struct ionic_ibdev *dev); +int ionic_dcqcn_select_profile (struct ionic_ibdev *dev, +struct rdma_ah_attr *attr); +#endif /* _IONIC_IBDEV_H_ */ drivers/infiniband/hw/ionic/ionic_lif_cfg.c +1
-0@@ -93,6 +93,7 @@ void ionic_fill_lif_cfg(struct ionic_lif *lif, struct ionic_lif_cfg *cfg) !!(lif->qtype_info[IONIC_QTYPE_RXQ ].features &IONIC_QIDENT_F_EXPDB ); cfg->dbg_ctx = lif->dentry; + cfg->dcqcn_profiles = ident->rdma.dcqcn_profiles; }struct net_device *ionic_lif_netdev (struct ionic_lif *lif)drivers/infiniband/hw/ionic/ionic_lif_cfg.h +2
-0@@ -58,6 +58,8 @@ struct ionic_lif_cfg {bool sq_expdb;bool rq_expdb;u8 expdb_mask; + +u8 dcqcn_profiles; };void ionic_fill_lif_cfg (struct ionic_lif *lif,struct ionic_lif_cfg *cfg);drivers/infiniband/hw/ionic/ionic_profiles.h new file +76
-0@@ -0,0 +1,86 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2018-2026, Advanced Micro Devices, Inc. */ + +#ifndef _IONIC_PROFILES_H_ +#define _IONIC_PROFILES_H_ + +#include "ionic_ibdev.h" + +enum ionic_dcqcn_var { + /* notification point */ + NP_ICNP_802P_PRIO, /* 0..7 (prio) */ + NP_CNP_DSCP, /* 0..63 (dscp) */ + + RP_TOKEN_BUCKET_SIZE, /* 100..200000000 (100kb - 200gb) */ + /* reaction point alpha update */ + RP_INITIAL_ALPHA_VALUE, /* 0..1023 */ + RP_DCE_TCP_G, /* 0..1023 */ + RP_DCE_TCP_RTT, /* 1..131071 (us) */ + + /* reaction point rate decrease */ + RP_RATE_REDUCE_MONITOR_PERIOD, /* 1.. (us) */ + RP_RATE_TO_SET_ON_FIRST_CNP, /* 0 disable, 1.. (Mbps) */ + RP_MIN_RATE, /* 1.. (Mbps) */ + RP_GD, /* 1..11 */ + RP_MIN_DEC_FAC, /* 0..100 (%) */ + + /* reaction point rate increase */ + RP_CLAMP_TGT_RATE, /* 0..1 (bool) */ + RP_CLAMP_TGT_RATE_ATI, /* 0..1 (bool) */ + RP_THRESHOLD, /* 1..31 */ + RP_TIME_RESET, /* 1..32767 (x RP_DCE_TCP_RTT) */ + RP_QP_RATE, /* 1.. (Mbps) */ + RP_BYTE_RESET, /* 1..4294967296 (B) */ + RP_AI_RATE, /* 1.. (Mbps) */ + RP_HAI_RATE, /* 1.. (Mbps) */ + + DCQCN_VAR_COUNT +}; + +struct ionic_match_rule { + bool (*match)(struct rdma_ah_attr *attr, int cond); + const char *name; + int cond; + int prof; +}; + +struct ionic_profile_vals { + int v[DCQCN_VAR_COUNT]; +}; + +struct ionic_dcqcn_param_attr { + char *name; + int min; + int max; +}; + +struct ionic_dcqcn_param_entry { + struct ionic_profile *profile; + enum ionic_dcqcn_var var; +}; + +struct ionic_profile { + struct ionic_ibdev *dev; + struct ionic_profile_vals vals; + struct ionic_dcqcn_param_entry *entries; + int idx; + + struct dentry *debug; + struct dentry *roce_np_debug; + struct dentry *roce_rp_debug; +}; + +struct ionic_profile_root { + struct ionic_ibdev *dev; + int profiles_default; + int profiles_count;
drivers/infiniband/hw/ionic/ionic_profiles.h line 86
Quoted 10 lines
drivers/infiniband/hw/ionic/ionic_profiles.h new file +10
-0+struct ionic_profile *profiles; +spinlock_t rules_lock;/* lock to atomic update the rules */ +int rules_count; +struct ionic_match_rule *rules; + +struct dentry *debug; + struct dentry *profiles_debug; +}; + +#endif /* _IONIC_PROFILES_H_ */
Leon,
From this thread for Patch 3:
https://lore.kernel.org/linux-rdma/20260514163540.GT15586@unreal/, I understand that it's too large and it's exposing too much information; I can shrink that down and remove the entries there.
But before I make changes and resubmit, is what this patch is doing okay? It adds DCQCN configuration parameters so that they can be written to in debugfs and propagated to the firmware? Would this be considered too much meddling with the firmware in debugfs, too? We want to have a driver-configured mode for DCQCN and possibly other congestion control profiles.
- Eric
Re: [PATCH net-next 4/4] RDMA/ionic: Add DCQCN parameter configuration via debugfs
Quoted 8 lines · Eric Joyner
Leon,
From this thread for Patch 3:
https://lore.kernel.org/linux-rdma/20260514163540.GT15586@unreal/, I understand that it's too large and it's exposing too much information; I can shrink that down and remove the entries there.
Quoted 7 lines
But before I make changes and resubmit, is what this patch is doing okay? It adds DCQCN configuration parameters so that they can be written to in debugfs and propagated to the firmware? Would this be considered too much meddling with the firmware in debugfs, too? We want to have a driver-configured mode for DCQCN and possibly other congestion control profiles.
- Eric
Hi Leon,
Can you tell me what an acceptable approach would be in terms of the DCQCN configuration? It didn't get mentioned as part of the debugfs discussion on the other patch in this series, and I want to know if it's ok if I can modify the debugfs implementation to have these DCQCN tuning knobs in there, but to drop everything else from the rdma driver debugfs that looks offensive.
- Eric
Re: [PATCH net-next 4/4] RDMA/ionic: Add DCQCN parameter configuration via debugfs
Quoted 17 lines · Eric Joyner
Quoted 8 lines · Eric Joyner
Leon,
From this thread for Patch 3:
https://lore.kernel.org/linux-rdma/20260514163540.GT15586@unreal/, I understand that it's too large and it's exposing too much information; I can shrink that down and remove the entries there.Quoted 7 lines
But before I make changes and resubmit, is what this patch is doing okay? It adds DCQCN configuration parameters so that they can be written to in debugfs and propagated to the firmware? Would this be considered too much meddling with the firmware in debugfs, too? We want to have a driver-configured mode for DCQCN and possibly other congestion control profiles.
- Eric
Quoted 7 lines
Hi Leon,
Can you tell me what an acceptable approach would be in terms of the DCQCN configuration? It didn't get mentioned as part of the debugfs discussion on the other patch in this series, and I want to know if it's ok if I can modify the debugfs implementation to have these DCQCN tuning knobs in there, but to drop everything else from the rdma driver debugfs that looks offensive.
Yes, see the HNS driver. It added several debugfs knobs for configuring DCQCN.
Thanks
Quoted 2 lines
- Eric
Jakub Kicinski
maintainerQuoted 2 lines · On Tue, 5 May 2026 21:19:31 -0700 Eric Joyner wrote:
Other smaller additions add a devlink parameter to the ionic ethernet driver for enabling and disabling RDMA,
My understanding is that the devlink param was expected to change the configuration of the device. IOW user can enable/disable RDMA to save internal device resources. You seem to be purely preventing the auxbus device to be added. So there's nothing gained here compared to simply not loading the RDMA driver. What am I missing?
Abhijit Gangurde
maintainerQuoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Tue, 5 May 2026 21:19:31 -0700 Eric Joyner wrote:
Other smaller additions add a devlink parameter to the ionic ethernet driver for enabling and disabling RDMA,
My understanding is that the devlink param was expected to change the configuration of the device. IOW user can enable/disable RDMA to save internal device resources. You seem to be purely preventing the auxbus device to be added. So there's nothing gained here compared to simply not loading the RDMA driver. What am I missing?
You're right that the current implementation controls only the auxiliary bus device registration and doesn't reconfigure firmware resource allocation. The intent behind this devlink param is to provide per-device granularity for enabling/disabling RDMA. In a system with multiple ionic NICs, an administrator may want RDMA active on some devices but not others. That said, if this per-device control justification is sufficient on its own, or if firmware-side changes are a hard requirement for this to be acceptable?
Thanks,
Abhijit
Quoted 10 lines · Abhijit Gangurde
Quoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Tue, 5 May 2026 21:19:31 -0700 Eric Joyner wrote:
Other smaller additions add a devlink parameter to the ionic ethernet driver for enabling and disabling RDMA,
My understanding is that the devlink param was expected to change the configuration of the device. IOW user can enable/disable RDMA to save internal device resources. You seem to be purely preventing the auxbus device to be added. So there's nothing gained here compared to simply not loading the RDMA driver. What am I missing?
Quoted 8 lines
You're right that the current implementation controls only the auxiliary bus device registration and doesn't reconfigure firmware resource allocation. The intent behind this devlink param is to provide per-device granularity for enabling/disabling RDMA. In a system with multiple ionic NICs, an administrator may want RDMA active on some devices but not others. That said, if this per-device control justification is sufficient on its own, or if firmware-side changes are a hard requirement for this to be acceptable?
I'm confident that the administrator can vibe code an appropriate udev rule and disable autoprobing for this case.
The real advantage of a devlink knob here is the ability to control the firmware.
Thanks
Quoted 3 lines
Thanks,
Abhijit
Quoted 21 lines · Leon Romanovsky
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Quoted 9 lines · Abhijit Gangurde
Quoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Tue, 5 May 2026 21:19:31 -0700 Eric Joyner wrote:
Other smaller additions add a devlink parameter to the ionic ethernet driver for enabling and disabling RDMA,
My understanding is that the devlink param was expected to change the configuration of the device. IOW user can enable/disable RDMA to save internal device resources. You seem to be purely preventing the auxbus device to be added. So there's nothing gained here compared to simply not loading the RDMA driver. What am I missing?
Quoted 8 lines
You're right that the current implementation controls only the auxiliary bus device registration and doesn't reconfigure firmware resource allocation. The intent behind this devlink param is to provide per-device granularity for enabling/disabling RDMA. In a system with multiple ionic NICs, an administrator may want RDMA active on some devices but not others. That said, if this per-device control justification is sufficient on its own, or if firmware-side changes are a hard requirement for this to be acceptable?
Quoted 7 lines
I'm confident that the administrator can vibe code an appropriate udev rule and disable autoprobing for this case.
The real advantage of a devlink knob here is the ability to control the firmware.
Thanks
Based on the documentation in devlink-params.rst, the devlink knob for enable_rdma indicates that when enabled the driver will instantiate RDMA specific auxiliary device of the devlink device. The documentation doesn't state what to do when enable_rdma is disabled, but it seemed like removing the auxiliary device provided the opposite behavior of enabled.
If that's not the case, does the documentation need to be updated accordingly?
Thanks,
Brett
Quoted 3 lines
Quoted 3 lines
Thanks,
Abhijit
Quoted 30 lines · Brett
Quoted 27 lines · Leon Romanovsky
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Quoted 9 lines · Abhijit Gangurde
Quoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Tue, 5 May 2026 21:19:31 -0700 Eric Joyner wrote:
Other smaller additions add a devlink parameter to the ionic ethernet driver for enabling and disabling RDMA,
My understanding is that the devlink param was expected to change the configuration of the device. IOW user can enable/disable RDMA to save internal device resources. You seem to be purely preventing the auxbus device to be added. So there's nothing gained here compared to simply not loading the RDMA driver. What am I missing?
Quoted 8 lines
You're right that the current implementation controls only the auxiliary bus device registration and doesn't reconfigure firmware resource allocation. The intent behind this devlink param is to provide per-device granularity for enabling/disabling RDMA. In a system with multiple ionic NICs, an administrator may want RDMA active on some devices but not others. That said, if this per-device control justification is sufficient on its own, or if firmware-side changes are a hard requirement for this to be acceptable?
I'm confident that the administrator can vibe code an appropriate udev rule and disable autoprobing for this case.
The real advantage of a devlink knob here is the ability to control the firmware.
Quoted 7 lines
Quoted 1 line
Thanks
Based on the documentation in
devlink-params.rst, the devlink knob forenable_rdmaindicates that when enabled the driver will instantiate RDMA specific auxiliary device of the devlink device. The documentation doesn't state what to do whenenable_rdmais disabled, but it seemed like removing the auxiliary device provided the opposite behavior of enabled.
There is no practical way to document every possible case. When enable_rdma == false, it indicates that the device has RDMA support disabled.
Thanks
Quoted 14 lines
If that's not the case, does the documentation need to be updated accordingly?
Thanks,
Brett
Quoted 3 lines
Quoted 3 lines
Thanks,
Abhijit