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>
Subject: Re: [PATCH net-next v2] hinic: add set_channels ethtool_ops support
Date: Sat, 30 May 2020 09:30:35 +0800	[thread overview]
Message-ID: <e316f3e4-fdc7-ebba-e6d8-ae74ba257b08@huawei.com> (raw)
In-Reply-To: <20200529104424.58dd665a@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>

On 2020/5/30 1:44, Jakub Kicinski wrote:

> On Thu, 28 May 2020 18:36:33 +0000 Luo bin wrote:
>> add support to change TX/RX queue number with ethtool -L
>>
>> Signed-off-by: Luo bin <luobin9@huawei.com>
> Luo bin, your patches continue to come with Date: header being in the
> past. Also suspiciously no time zone offset. Can you address this?
>
>> +static int hinic_set_channels(struct net_device *netdev,
>> +			      struct ethtool_channels *channels)
>> +{
>> +	struct hinic_dev *nic_dev = netdev_priv(netdev);
>> +	unsigned int count = channels->combined_count;
>> +	int err;
>> +
>> +	if (!count) {
>> +		netif_err(nic_dev, drv, netdev,
>> +			  "Unsupported combined_count: 0\n");
>> +		return -EINVAL;
>> +	}
> This check has been added to the core since the last version of you
> patch:
>
> 	/* ensure there is at least one RX and one TX channel */
> 	if (!channels.combined_count &&
> 	    (!channels.rx_count || !channels.tx_count))
> 		return -EINVAL;
>
>> +	netif_info(nic_dev, drv, netdev, "Set max combined queue number from %d to %d\n",
>> +		   hinic_hwdev_num_qps(nic_dev->hwdev), count);
>> +
>> +	if (netif_running(netdev)) {
>> +		netif_info(nic_dev, drv, netdev, "Restarting netdev\n");
>> +		hinic_close(netdev);
>> +
>> +		nic_dev->hwdev->nic_cap.num_qps = count;
>> +
>> +		err = hinic_open(netdev);
>> +		if (err) {
>> +			netif_err(nic_dev, drv, netdev,
>> +				  "Failed to open netdev\n");
>> +			return -EFAULT;
>> +		}
>> +	} else {
>> +		nic_dev->hwdev->nic_cap.num_qps = count;
>> +	}
>> +
>> +	return 0;
>>   }
> Will fix. Thanks.
> .

      reply	other threads:[~2020-05-30  1:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 18:36 Luo bin
2020-05-29 17:44 ` Jakub Kicinski
2020-05-30  1:30   ` 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=e316f3e4-fdc7-ebba-e6d8-ae74ba257b08@huawei.com \
    --to=luobin9@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®