From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Lukasz Czapnik <lukasz.czapnik@intel.com>,
<intel-wired-lan@lists.osuosl.org>
Cc: <netdev@vger.kernel.org>,
Jakub Kaminski <jakub.kaminski@intel.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Tomasz Lichwala <tomasz.lichwala@intel.com>
Subject: Re: [PATCH iwl-net v2] ice: Fix "Unknown bps" during link events
Date: Thu, 10 Sep 2026 14:37:35 -0700 [thread overview]
Message-ID: <5e55342a-9cbd-4a5f-84d9-56a80ac42664@intel.com> (raw)
In-Reply-To: <20260806162458.2384818-1-lukasz.czapnik@intel.com>
On 8/6/2026 9:24 AM, Lukasz Czapnik wrote:
> From: Jakub Kaminski <jakub.kaminski@intel.com>
...
> @@ -1190,11 +1191,8 @@ ice_link_event(struct ice_pf *pf, struct ice_port_info *pi, bool link_up,
>
> ice_check_link_cfg_err(pf, pi->phy.link_info.link_cfg_err);
>
> - /* Check if the link state is up after updating link info, and treat
> - * this event as an UP event since the link is actually UP now.
> - */
> - if (phy_info->link_info.link_info & ICE_AQ_LINK_UP)
> - link_up = true;
> + link_up = phy_info->link_info.link_info & ICE_AQ_LINK_UP;
> + link_speed = phy_info->link_info.link_speed;
Sashiko says:
Does this unconditionally overwrite the ARQ-provided link_up and link_speed
arguments with the cached AQ state?
If the synchronous AQ query (ice_update_link_info()) called earlier in
ice_link_event() fails, for example due to an AQ timeout, the
phy_info->link_info structure is not updated.
By unconditionally reading from this potentially stale structure, link_up
and link_speed are guaranteed to match old_link and old_link_speed. This
would cause the following early return block to trigger erroneously:
drivers/net/ethernet/intel/ice/ice_main.c:ice_link_event() {
...
if (link_up == old_link && link_speed == old_link_speed)
return 0;
...
}
Could this silently drop a valid hardware link state change, leaving the
OS and the hardware out of sync and causing network hangs?
Tony says:
I think the right/wrong combination could cause this to occur. I, also,
think there's an issue with accounting for the link event and updated
link info that could get lost if it changes.
Thanks,
Tony
> vsi = ice_get_main_vsi(pf);
> if (!vsi || !vsi->port_info)
prev parent reply other threads:[~2026-09-10 21:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 16:24 [PATCH iwl-net v2] ice: Fix "Unknown bps" during link events Lukasz Czapnik
2026-08-10 9:57 ` Simon Horman
2026-09-10 21:37 ` Tony Nguyen [this message]
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=5e55342a-9cbd-4a5f-84d9-56a80ac42664@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jakub.kaminski@intel.com \
--cc=lukasz.czapnik@intel.com \
--cc=netdev@vger.kernel.org \
--cc=tomasz.lichwala@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