Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nguyen, Anthony L <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net v1] iavf: Fix reporting when setting descriptor count
Date: Tue, 12 Oct 2021 22:10:12 +0000	[thread overview]
Message-ID: <6309239359306fc8c0260301684ab0168626b239.camel@intel.com> (raw)
In-Reply-To: <20211012135245.6979-1-michal.maloszewski@intel.com>

On Tue, 2021-10-12 at 13:52 +0000, Michal Maloszewski wrote:
> iavf_set_ringparams doesn't communicate to the user that
> 
> 1. The user requested descriptor count is out of range. Instead it
> ?? just quietly sets descriptors to the "clamped" value and calls it
> ?? done. This makes it look an invalid value was successfully set as
> ?? the descriptor count when this isn't actually true.
> 
> 2. The user provided descriptor count needs to be inflated for
> alignment
> ?? reasons.
> 
> This behavior is confusing. The ice driver has already addressed this
> by rejecting invalid values for descriptor count and messaging for
> alignment adjustments.
> Do the same thing here by adding the error and info messages.
> 
> Fixes: fcea6f3da546 ("ice: Add stats and ethtool support")

I believe the commit that Ani provided was referencing the "ice driver
has already addressed this by rejecting invalid values for descriptor
count"

I don't believe this the the correct Fixes for this patch.

> Signed-off-by: Anirudh Venkataramanan
> <anirudh.venkataramanan@intel.com>
> Signed-off-by: Michal Maloszewski <michal.maloszewski@intel.com>
> ---
> v3: Commit with fixes tag changed.

Your title has v1, but there's a v3 here.

Please use checkpatch before sending your patches:

WARNING: Possible unwrapped commit description (prefer a maximum 75
chars per line)
#92:
by rejecting invalid values for descriptor count and messaging for
alignment adjustments.

WARNING: suspect code indent for conditional statements (8, 18)
#116: FILE: drivers/net/ethernet/intel/iavf/iavf_ethtool.c:615:
+       if (ring->tx_pending > IAVF_MAX_TXD ||
[...]
+                 netdev_err(netdev, "Descriptors requested (Tx: %d /
Rx: %d) out of range [%d-%d] (increment %d)\n",

WARNING: Statements should start on a tabstop
#123: FILE: drivers/net/ethernet/intel/iavf/iavf_ethtool.c:622:
+                 return -EINVAL;





  reply	other threads:[~2021-10-12 22:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 13:52 [Intel-wired-lan] [PATCH net v1] iavf: Fix reporting when setting descriptor count Michal Maloszewski
2021-10-12 22:10 ` Nguyen, Anthony L [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-26 12:59 Michal Maloszewski
2021-11-26 14:11 ` Jankowski, Konrad0

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=6309239359306fc8c0260301684ab0168626b239.camel@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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