mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: luobin9@huawei.com
Cc: 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 v1] hinic: add set_channels ethtool_ops support
Date: Sat, 16 May 2020 13:35:08 -0700 (PDT)	[thread overview]
Message-ID: <20200516.133508.2302524641917348540.davem@davemloft.net> (raw)
In-Reply-To: <20200515194212.10381-1-luobin9@huawei.com>

From: Luo bin <luobin9@huawei.com>
Date: Fri, 15 May 2020 19:42:12 +0000

> add support to change TX/RX queue number with ethtool -L
> 
> Signed-off-by: Luo bin <luobin9@huawei.com>

I don't think you are properly following the semantics of this
ethtool command with your changes.

In fact, you are breaking the hinic_get_channels() function which
is properly advertising the ->max_* values currently.  Now it will
return zero.

Whatever is advertised in ->max_* should be the driver's maximum
capabilities.

This means that the user can request anything in the range from '1'
to these max values.

Whatever the user asks for in ->combined_count and elsewhere, you
_MUST_ provide or return an error.

That is not what hinic_set_channels() is doing.  It is using
combined_count as a "limit" rather than the value to use.

      reply	other threads:[~2020-05-16 20:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 19:42 Luo bin
2020-05-16 20:35 ` David Miller [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=20200516.133508.2302524641917348540.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luobin9@huawei.com \
    --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®