From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Ivan Vecera <ivecera@redhat.com>
Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
open list <linux-kernel@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH net] i40e: Fix firmware version comparison function
Date: Wed, 28 Feb 2024 18:33:58 +0100 [thread overview]
Message-ID: <e0c35b34-a845-4221-b9d3-867d2f339f8d@molgen.mpg.de> (raw)
In-Reply-To: <20240228172603.29177-1-ivecera@redhat.com>
Dear Ivan,
Thank you for your patch.
Am 28.02.24 um 18:26 schrieb Ivan Vecera:
> Helper i40e_is_fw_ver_eq() compares incorrectly given firmware version
> as it returns true when the major version of running firmware is
> greater than the given major version that is wrong and results in
… version. That …
> failure during getting of DCB configuration where this helper is used.
> Fix the check and return true only if the running FW version is exactly
> equals to the given version.
is … equal
> Reproducer:
> 1. Load i40e driver
> 2. Check dmesg output
>
> [root@host ~]# modprobe i40e
> [root@host ~]# dmesg | grep 'i40e.*DCB'
> [ 74.750642] i40e 0000:02:00.0: Query for DCB configuration failed, err -EIO aq_err I40E_AQ_RC_EINVAL
> [ 74.759770] i40e 0000:02:00.0: DCB init failed -5, disabled
> [ 74.966550] i40e 0000:02:00.1: Query for DCB configuration failed, err -EIO aq_err I40E_AQ_RC_EINVAL
> [ 74.975683] i40e 0000:02:00.1: DCB init failed -5, disabled
>
> Fixes: cf488e13221f ("i40e: Add other helpers to check version of running firmware and AQ API")
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_prototype.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
> index af4269330581..ce1f11b8ad65 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
> @@ -567,8 +567,7 @@ static inline bool i40e_is_fw_ver_lt(struct i40e_hw *hw, u16 maj, u16 min)
> **/
> static inline bool i40e_is_fw_ver_eq(struct i40e_hw *hw, u16 maj, u16 min)
> {
> - return (hw->aq.fw_maj_ver > maj ||
> - (hw->aq.fw_maj_ver == maj && hw->aq.fw_min_ver == min));
> + return (hw->aq.fw_maj_ver == maj && hw->aq.fw_min_ver == min);
> }
>
> #endif /* _I40E_PROTOTYPE_H_ */
With the nits in the commit message addressed, this is
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
next prev parent reply other threads:[~2024-02-28 17:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 17:26 Ivan Vecera
2024-02-28 17:33 ` Paul Menzel [this message]
2024-03-06 12:45 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
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=e0c35b34-a845-4221-b9d3-867d2f339f8d@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=ivecera@redhat.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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®