From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, andrew+netdev@lunn.ch,
netdev@vger.kernel.org
Cc: Petr Oros <poros@redhat.com>,
anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,
horms@kernel.org,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
Patryk Holda <patryk.holda@intel.com>
Subject: [PATCH net 2/6] ice: fix inverted ready check for VF representors
Date: Mon, 23 Mar 2026 13:58:37 -0700 [thread overview]
Message-ID: <20260323205843.624704-3-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20260323205843.624704-1-anthony.l.nguyen@intel.com>
From: Petr Oros <poros@redhat.com>
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>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Patryk Holda <patryk.holda@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.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 90f99443a922..68cdd04dd3aa 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.47.1
next prev parent reply other threads:[~2026-03-23 20:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 20:58 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-03-23 (ice, iavf, idpf) Tony Nguyen
2026-03-23 20:58 ` [PATCH net 1/6] ice: set max queues in alloc_etherdev_mqs() Tony Nguyen
2026-03-23 20:58 ` Tony Nguyen [this message]
2026-03-23 20:58 ` [PATCH net 3/6] ice: use ice_update_eth_stats() for representor stats Tony Nguyen
2026-03-23 20:58 ` [PATCH net 4/6] iavf: fix out-of-bounds writes in iavf_get_ethtool_stats() Tony Nguyen
2026-03-23 20:58 ` [PATCH net 5/6] idpf: clear stale cdev_info ptr Tony Nguyen
2026-03-23 20:58 ` [PATCH net 6/6] idpf: only assign num refillqs if allocation was successful Tony Nguyen
2026-03-26 14:20 ` [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-03-23 (ice, iavf, idpf) patchwork-bot+netdevbpf
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=20260323205843.624704-3-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=patryk.holda@intel.com \
--cc=poros@redhat.com \
--cc=przemyslaw.kitszel@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