mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "luobin (L)" <luobin9@huawei.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <davem@davemloft.net>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <luoxianjun@huawei.com>,
	<yin.yinshi@huawei.com>, <cloud.wangxiaoyun@huawei.com>,
	<chiqijun@huawei.com>
Subject: Re: [PATCH net-next] hinic: add debugfs support
Date: Fri, 21 Aug 2020 11:01:58 +0800	[thread overview]
Message-ID: <b4ad6d8e-0760-bcea-56a3-dd8d3ffc8237@huawei.com> (raw)
In-Reply-To: <20200820090203.3f56024b@kicinski-fedora-PC1C0HJN>

On 2020/8/21 0:02, Jakub Kicinski wrote:
> On Thu, 20 Aug 2020 20:14:32 +0800 Luo bin wrote:
>> +static int hinic_dbg_help(struct hinic_dev *nic_dev, const char *cmd_buf)
>> +{
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "Available commands:\n");
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "sq info <queue id>\n");
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "sq wqe info <queue id> <wqe id>\n");
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "rq info <queue id>\n");
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "rq wqe info <queue id> <wqe id>\n");
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "sq ci table <queue id>\n");
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "rq cqe info <queue id> <cqe id>\n");
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "mac table\n");
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "global table\n");
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "func table\n");
>> +	netif_info(nic_dev, drv, nic_dev->netdev, "port table\n");
>> +	return 0;
>> +}
>> +
>> +static const struct hinic_dbg_cmd_info g_hinic_dbg_cmd[] = {
>> +	{"help", hinic_dbg_help},
>> +	{"sq info", hinic_dbg_get_sq_info},
>> +	{"sq wqe info", hinic_dbg_get_sq_wqe_info},
>> +	{"rq info", hinic_dbg_get_rq_info},
>> +	{"rq wqe info", hinic_dbg_get_rq_wqe_info},
>> +	{"sq ci table", hinic_dbg_get_ci_table},
>> +	{"rq cqe info", hinic_dbg_get_rq_cqe_info},
>> +	{"mac table", hinic_dbg_get_mac_table},
>> +	{"global table", hinic_dbg_get_global_table},
>> +	{"func table", hinic_dbg_get_function_table},
>> +	{"port table", hinic_dbg_get_port_table},
>> +};
> 
> Please don't create command interfaces like this.
> 
> Instead create a read only file for objects you want to expose.
> 
> Split addition of each object into a separate patch and provide example
> output in the commit message.
> .
> 
Will fix. Thanks for your review.

      reply	other threads:[~2020-08-21  3:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 12:14 Luo bin
2020-08-20 16:02 ` Jakub Kicinski
2020-08-21  3:01   ` luobin (L) [this message]

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=b4ad6d8e-0760-bcea-56a3-dd8d3ffc8237@huawei.com \
    --to=luobin9@huawei.com \
    --cc=chiqijun@huawei.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luoxianjun@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=yin.yinshi@huawei.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

all inboxes | Powered by JetHome®