> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Tomasz Lichwala
> Sent: Thursday, July 23, 2026 5:28 PM
> To: [email protected]
> Cc: Tomasz Lichwala <[email protected]>; Loktionov, Aleksandr
> <[email protected]>
> Subject: [Intel-wired-lan] [iwl-net v1] iavf: fix VF stats not updating due 
> to PTP
> command preemption
> 
> Since the introduction of PTP support in iavf, commit 7c01dbfc8a1c
> ("iavf: periodically cache PHC time"), the periodic PTP clock caching task 
> always
> provides a pending admin queue command, causing
> iavf_process_aq_command() to always return success and permanently
> preventing the stats fallback path from executing, which results in VF 
> statistics
> remaining at zero despite traffic flowing.
> 
> Fix this by making the stats request unconditional when the adapter is in the
> running state, rather than relying on it as a fallback when no other admin 
> queue
> commands were processed.
> 
> Fixes: 7c01dbfc8a1c ("iavf: periodically cache PHC time")
> Reviewed-by: Aleksandr Loktionov <[email protected]>
> Signed-off-by: Tomasz Lichwala <[email protected]>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 14 ++++----------
>  1 file changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c
> b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index f5697d9c97fe..a05bd61d7de1 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -2986,18 +2986,12 @@ static int iavf_watchdog_step(struct iavf_adapter
> *adapter)
>                               iavf_send_api_ver(adapter);
>                       }
>               } else {
> -                     int ret = iavf_process_aq_command(adapter);
> -
> -                     /* An error will be returned if no commands were
> -                      * processed; use this opportunity to update stats
> -                      * if the error isn't -ENOTSUPP
> -                      */
> -                     if (ret && ret != -EOPNOTSUPP &&
> -                         adapter->state == __IAVF_RUNNING)
> -                             iavf_request_stats(adapter);
> +                     iavf_process_aq_command(adapter);
>               }
> -             if (adapter->state == __IAVF_RUNNING)
> +             if (adapter->state == __IAVF_RUNNING) {
> +                     iavf_request_stats(adapter);
>                       iavf_detect_recover_hung(&adapter->vsi);
> +             }
>               break;
>       case __IAVF_REMOVE:
>       default:
> --
> 2.54.0

Tested-by: Rafal Romanowski <[email protected]>


Reply via email to