All of lore.kernel.org
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Tomasz Lichwala <tomasz.lichwala@linux.intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: <netdev@vger.kernel.org>, Marcin Szycik <marcin.szycik@linux.intel.com>
Subject: Re: [PATCH iwl-net v5] ixgbevf: fix link speed reporting for Hyper-V E610 VFs
Date: Tue, 1 Sep 2026 13:34:16 +0200	[thread overview]
Message-ID: <d423e711-a38d-4d68-9395-60c371e8e8ff@intel.com> (raw)
In-Reply-To: <20260826143950.2385891-1-tomasz.lichwala@linux.intel.com>

On 8/26/26 16:39, Tomasz Lichwala wrote:
> When an E610 VF is running under Hyper-V, the VFLINKS register does not
> carry valid link speed. The existing code reads speed from VFLINKS, which
> does not reflect the actual negotiated speed. This results in ethtool
> reporting a stale or incorrect link speed.
> 
> The Hyper-V synthetic NIC exposes the actual link status through
> emulated PCI config space at offset 0x209 in VFLINKS register format.
> Read and decode link status from there when checking link on E610 VFs.
> 
> To avoid generating unnecessary VMBus transactions on every watchdog
> cycle, read the PCI config register on demand when ethtool or sysfs
> queries link speed, rather than polling it periodically. The cached
> value is used by the watchdog and link state notifications as before.
> 
> Guard the PCI config space read with IS_ENABLED(CONFIG_PCI_MMCONFIG),
> since accessing offsets above 256 requires MMCONFIG support.
> 
> Fixes: 4c44b450c69b ("ixgbevf: Add support for Intel(R) E610 device")
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> Signed-off-by: Tomasz Lichwala <tomasz.lichwala@linux.intel.com>

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>

> ---

next time please add something like "Notes for AI reviewer:" before such
notes :)

> Note on IS_ENABLED(CONFIG_PCI_MMCONFIG): this guard is kept intentionally
> for consistency with ixgbevf_hv_reset_hw_vf() which uses the same pattern
> to access emulated PCI config space at offset 0x201. Both functions read
> extended config space offsets (>256) that require MMCONFIG on x86. Hyper-V
> E610 VFs are currently only deployed on x86 where CONFIG_PCI_MMCONFIG is
> always enabled. If ARM64 Hyper-V support becomes relevant, both functions
> should be updated together.
> 
> Note on watchdog race: the mbx_lock serializes concurrent check_link calls
> so ethtool and watchdog cannot execute check_link simultaneously. The
> ethtool response reads adapter->link_speed immediately after check_link
> returns (same function, same thread) and always reports the fresh value.
> The watchdog's pre-existing pattern of caching adapter fields into locals
> before the lock applies to all HV VF types and is not introduced by this
> patch.
> 
> v5:
>   - Use subsystem device ID check instead of mac type to ensure the
>     on-demand ethtool read only triggers for Hyper-V VFs, not bare-metal


      reply	other threads:[~2026-09-01 11:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 14:39 [PATCH iwl-net v5] ixgbevf: fix link speed reporting for Hyper-V E610 VFs Tomasz Lichwala
2026-09-01 11:34 ` Przemek Kitszel [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=d423e711-a38d-4d68-9395-60c371e8e8ff@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=marcin.szycik@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=tomasz.lichwala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.