Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Chengchang Tang <tangchengchang@huawei.com>
To: Selvin Xavier <selvin.xavier@broadcom.com>, <leon@kernel.org>,
	<jgg@ziepe.ca>
Cc: <linux-rdma@vger.kernel.org>, <andrew.gospodarek@broadcom.com>,
	<kalesh-anakkur.purayil@broadcom.com>
Subject: Re: [PATCH for-next v2] RDMA/bnxt_re: Congestion control settings using debugfs hook
Date: Sat, 8 Feb 2025 17:19:13 +0800	[thread overview]
Message-ID: <4fa11b0e-e838-bfc1-a9e1-80c4aefc728f@huawei.com> (raw)
In-Reply-To: <1737301535-6599-1-git-send-email-selvin.xavier@broadcom.com>



On 2025/1/19 23:45, Selvin Xavier wrote:
> Implements routines to set and get different settings  of
> the congestion control. This will enable the users to modify
> the settings according to their network.
> 
> Currently supporting only GEN 0 version of the parameters.
> Reading these files queries the firmware and report the values
> currently programmed. Writing to the files sends commands that
> update the congestion control settings
> 
> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
> ---
> v1 -> v2:
>   Addressed Leon's comments
>      - rename debugfs file "g" to "run_avg_weight_g"
>      - Fix the indentation errors
>      - Remove the unnecessary error message during the read entry point
>      - Fix the return value
> 
>  drivers/infiniband/hw/bnxt_re/bnxt_re.h |   2 +
>  drivers/infiniband/hw/bnxt_re/debugfs.c | 212 +++++++++++++++++++++++++++++++-
>  drivers/infiniband/hw/bnxt_re/debugfs.h |  15 +++
>  3 files changed, 228 insertions(+), 1 deletion(-)
> 

...
> +static const struct file_operations bnxt_re_cc_config_ops = {
> +	.owner = THIS_MODULE,
> +	.open = simple_open,
> +	.read = bnxt_re_cc_config_get,
> +	.write = bnxt_re_cc_config_set,
> +};
> +
>  void bnxt_re_debugfs_add_pdev(struct bnxt_re_dev *rdev)
>  {
>  	struct pci_dev *pdev = rdev->en_dev->pdev;
> +	struct bnxt_re_dbg_cc_config_params *cc_params;
> +	int i;
>  
>  	rdev->dbg_root = debugfs_create_dir(dev_name(&pdev->dev), bnxt_re_debugfs_root);
>  
>  	rdev->qp_debugfs = debugfs_create_dir("QPs", rdev->dbg_root);
> +	rdev->cc_config = debugfs_create_dir("cc_config", rdev->dbg_root);
> +
> +	rdev->cc_config_params = kzalloc(sizeof(*cc_params), GFP_KERNEL);
> +
> +	for (i = 0; i < BNXT_RE_CC_PARAM_GEN0; i++) {
> +		struct bnxt_re_cc_param *tmp_params = &rdev->cc_config_params->gen0_parms[i];
> +
> +		tmp_params->rdev = rdev;
> +		tmp_params->offset = i;
> +		tmp_params->cc_gen = CC_CONFIG_GEN0_EXT0;
> +		tmp_params->dentry = debugfs_create_file(bnxt_re_cc_gen0_name[i], 0400,

Write operation doesn't seem to work?
> +							 rdev->cc_config, tmp_params,
> +							 &bnxt_re_cc_config_ops);
> +	}
>  }
>  


  parent reply	other threads:[~2025-02-08  9:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-19 15:45 [PATCH for-next v2] RDMA/bnxt_re: Congestion control settings using debugfs hook Selvin Xavier
2025-01-20 16:40 ` Jason Gunthorpe
2025-01-21 10:40   ` Selvin Xavier
2025-01-21 15:31     ` Jason Gunthorpe
2025-01-22  8:09       ` Selvin Xavier
2025-01-22 15:22         ` Jason Gunthorpe
2025-01-23  5:20           ` Selvin Xavier
2025-02-03 12:02 ` Leon Romanovsky
2025-02-03 12:03 ` Leon Romanovsky
2025-02-08  9:19 ` Chengchang Tang [this message]
2025-02-08 13:14   ` Selvin Xavier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4fa11b0e-e838-bfc1-a9e1-80c4aefc728f@huawei.com \
    --to=tangchengchang@huawei.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=jgg@ziepe.ca \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=selvin.xavier@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox