netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: netdev@vger.kernel.org
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>,
	sameehj@amazon.com, davem@davemloft.net, dwmw@amazon.com,
	zorik@amazon.com, matua@amazon.com, saeedb@amazon.com,
	msw@amazon.com, aliguori@amazon.com, nafea@amazon.com,
	gtzalik@amazon.com, netanel@amazon.com, alisaidi@amazon.com,
	benh@amazon.com, akiyano@amazon.com
Subject: Re: [PATCH V2 net-next 5/5] net: ena: ethtool: support set_channels callback
Date: Thu, 3 Oct 2019 19:02:51 +0200	[thread overview]
Message-ID: <20191003170251.GI24815@unicorn.suse.cz> (raw)
In-Reply-To: <20191002131132.7b81f339@cakuba.hsd1.ca.comcast.net>

On Wed, Oct 02, 2019 at 01:11:32PM -0700, Jakub Kicinski wrote:
> On Wed, 2 Oct 2019 11:20:52 +0300, sameehj@amazon.com wrote:
> > +
> > +	new_channel_count = clamp_val(channels->tx_count,
> > +				      ENA_MIN_NUM_IO_QUEUES, channels->max_tx);
> 
> You should return an error if the value is not within bounds, rather
> than guessing.

And ethtool_set_channels() already does that if any of the requested
counts exceeds the corresponding maximum so that the upper bound check
here is superfluous.

Michal

  parent reply	other threads:[~2019-10-03 17:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02  8:20 [PATCH V2 net-next 0/5] Introduce ethtool's set_channels sameehj
2019-10-02  8:20 ` [PATCH V2 net-next 1/5] net: ena: change num_queues to num_io_queues for clarity and consistency sameehj
2019-10-02  8:20 ` [PATCH V2 net-next 2/5] net: ena: multiple queue creation related cleanups sameehj
2019-10-02  8:20 ` [PATCH V2 net-next 3/5] net: ena: make ethtool -l show correct max number of queues sameehj
2019-10-02  8:20 ` [PATCH V2 net-next 4/5] net: ena: remove redundant print of " sameehj
2019-10-02  8:20 ` [PATCH V2 net-next 5/5] net: ena: ethtool: support set_channels callback sameehj
2019-10-02 20:11   ` Jakub Kicinski
2019-10-03 15:32     ` Jubran, Samih
2019-10-03 17:08       ` Jakub Kicinski
2019-10-03 17:02     ` Michal Kubecek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-09-19 14:02 [PATCH V2 net-next 0/5] Introduce ethtool's set_channels sameehj
2019-09-19 14:02 ` [PATCH V2 net-next 5/5] net: ena: ethtool: support set_channels callback sameehj

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=20191003170251.GI24815@unicorn.suse.cz \
    --to=mkubecek@suse.cz \
    --cc=akiyano@amazon.com \
    --cc=aliguori@amazon.com \
    --cc=alisaidi@amazon.com \
    --cc=benh@amazon.com \
    --cc=davem@davemloft.net \
    --cc=dwmw@amazon.com \
    --cc=gtzalik@amazon.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=matua@amazon.com \
    --cc=msw@amazon.com \
    --cc=nafea@amazon.com \
    --cc=netanel@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedb@amazon.com \
    --cc=sameehj@amazon.com \
    --cc=zorik@amazon.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;
as well as URLs for NNTP newsgroup(s).