[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200516.133508.2302524641917348540.davem@davemloft.net>
Date: Sat, 16 May 2020 13:35:08 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: luobin9@...wei.com
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
luoxianjun@...wei.com, yin.yinshi@...wei.com,
cloud.wangxiaoyun@...wei.com
Subject: Re: [PATCH net-next v1] hinic: add set_channels ethtool_ops support
From: Luo bin <luobin9@...wei.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@...wei.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.
Powered by blists - more mailing lists