From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Petr Oros <poros@redhat.com>
Cc: netdev@vger.kernel.org, Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
Wojciech Drewek <wojciech.drewek@intel.com>,
Simon Horman <horms@kernel.org>,
intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH iwl-net 1/2] ice: fix inverted ready check for VF representors
Date: Thu, 12 Feb 2026 10:47:11 +0100 [thread overview]
Message-ID: <aY2hnyXFM9wplF3i@mev-dev.igk.intel.com> (raw)
In-Reply-To: <a76096058dd9b6d0cccaa5c2c699458351d02cec.1770882260.git.poros@redhat.com>
On Thu, Feb 12, 2026 at 08:53:10AM +0100, Petr Oros wrote:
> Commit 0f00a897c9fcbd ("ice: check if SF is ready in ethtool ops")
> refactored the VF readiness check into a generic repr->ops.ready()
> callback but implemented ice_repr_ready_vf() with inverted logic:
>
> return !ice_check_vf_ready_for_cfg(repr->vf);
>
> ice_check_vf_ready_for_cfg() returns 0 on success, so the negation
> makes ready() return non-zero when the VF is ready. All callers treat
> non-zero as "not ready, skip", causing ndo_get_stats64, get_drvinfo,
> get_strings and get_ethtool_stats to always bail out in switchdev mode.
>
> Remove the erroneous negation. The SF variant ice_repr_ready_sf() is
> already correct (returns !active, i.e. non-zero when not active).
>
> Fixes: 0f00a897c9fcbd ("ice: check if SF is ready in ethtool ops")
> Signed-off-by: Petr Oros <poros@redhat.com>
> ---
> drivers/net/ethernet/intel/ice/ice_repr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_repr.c b/drivers/net/ethernet/intel/ice/ice_repr.c
> index cb08746556a670..2a84f656405828 100644
> --- a/drivers/net/ethernet/intel/ice/ice_repr.c
> +++ b/drivers/net/ethernet/intel/ice/ice_repr.c
> @@ -315,7 +315,7 @@ ice_repr_reg_netdev(struct net_device *netdev, const struct net_device_ops *ops)
>
> static int ice_repr_ready_vf(struct ice_repr *repr)
> {
> - return !ice_check_vf_ready_for_cfg(repr->vf);
> + return ice_check_vf_ready_for_cfg(repr->vf);
> }
>
> static int ice_repr_ready_sf(struct ice_repr *repr)
> --
> 2.52.0
>
Thanks for fixing
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
next prev parent reply other threads:[~2026-02-12 9:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 7:53 [PATCH iwl-net 0/2] ice: fix representor stats in switchdev mode Petr Oros
2026-02-12 7:53 ` [PATCH iwl-net 1/2] ice: fix inverted ready check for VF representors Petr Oros
2026-02-12 8:24 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-02-12 9:47 ` Michal Swiatkowski [this message]
2026-03-19 9:10 ` Holda, Patryk
2026-03-19 10:38 ` Holda, Patryk
2026-02-12 7:53 ` [PATCH iwl-net 2/2] ice: use ice_update_eth_stats() for representor stats Petr Oros
2026-02-12 8:24 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-03-19 9:27 ` Holda, Patryk
2026-03-19 10:37 ` Holda, Patryk
2026-03-19 9:12 ` Holda, Patryk
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=aY2hnyXFM9wplF3i@mev-dev.igk.intel.com \
--to=michal.swiatkowski@linux.intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=wojciech.drewek@intel.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