On Wed, Mar 04, 2026 at 09:42:32AM +0100, Aleksandr Loktionov wrote:
> ixgbe_get_drvinfo() calls ixgbe_refresh_fw_version() on every ethtool
> query for e610 adapters.  That ends up in ixgbe_discover_flash_size(),
> which bisects the full 16 MB NVM space issuing one ACI command per
> step (~20 ms each, ~24 steps total = ~500 ms).
> 
> Profiling on an idle E610-XAT2 system with telegraf scraping ethtool
> stats every 10 seconds:
> 
>   kretprobe:ixgbe_get_drvinfo took 527603 us
>   kretprobe:ixgbe_get_drvinfo took 523978 us
>   kretprobe:ixgbe_get_drvinfo took 552975 us
>   kretprobe:ice_get_drvinfo   took       3 us
>   kretprobe:igb_get_drvinfo   took       2 us
>   kretprobe:i40e_get_drvinfo  took       5 us
> 
> The half-second stall happens under the RTNL lock, causing visible
> latency on ip-link and friends.
> 
> The FW version can only change after an EMPR reset.  All flash data is
> already populated at probe time and the cached adapter->eeprom_id is
> what get_drvinfo should be returning.  The only place that needs to
> trigger a re-read is ixgbe_devlink_reload_empr_finish(), right after
> the EMPR completes and new firmware is running.  Additionally, refresh
> the FW version in ixgbe_reinit_locked() so that any PF that undergoes a
> reinit after an EMPR (e.g. triggered by another PF's devlink reload)
> also picks up the new version in adapter->eeprom_id.
> 
> ixgbe_devlink_info_get() keeps its refresh call for explicit
> "devlink dev info" queries, which is fine given those are user-initiated.
> 
> Fixes: c9e563cae19e ("ixgbe: add support for devlink reload")
> Co-developed-by: Jedrzej Jagielski <[email protected]>
> Signed-off-by: Jedrzej Jagielski <[email protected]>
> Signed-off-by: Aleksandr Loktionov <[email protected]>

Reviewed-by: Simon Horman <[email protected]>

Reply via email to