> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of 
> Przemyslaw Korba
> Sent: Thursday, May 7, 2026 6:51 AM
> To: [email protected]
> Cc: [email protected]; Nguyen, Anthony L <[email protected]>; 
> Kitszel, Przemyslaw <[email protected]>; Loktionov, Aleksandr 
> <[email protected]>; Kubalewski, 
> Arkadiusz <[email protected]>; Korba, Przemyslaw 
> <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-net] ice: support SBQ posted writes 
> with non-posted support for CGU
> 
> From: Karol Kolacinski <[email protected]>
> 
> Sideband queue (SBQ) is a HW queue with very short completion time. All SBQ 
> writes were posted by default, which means that the driver did not have to 
> wait for completion from the neighbor device, because > there was none. This 
> introduced unnecessary delays, where only those delays were "ensuring" that 
> the command is "completed" and this was a potential race condition.
> 
> Add the possibility to perform non-posted writes where it's necessary to wait 
> for completion, instead of relying on fake completion from the FW, where only 
> the delays are guarding the writes.
> 
> Flush the SBQ by reading address 0 from the PHY 0 before issuing SYNC command 
> to ensure that writes to all PHYs were completed and skip SBQ message 
> completion if it's posted.
> 
> To analyze if delays are gone, look for and compare time spent in 
> ice_sq_send_cmd — posted writes should return immediately after the wr32.
> That can be done for example by adjusting phc time with phc_ctl on E830 
> device, for less than 2 seconds to use this new mechanism. Without it, 
> command below will fail.
> 
> Reproduction steps:
> phc_ctl eth13 adj 1
> phc_ctl[4478170.994]: adjusted clock by 1.000000 seconds
> 
> Check trace for timing for comparisions:
> echo ice_sbq_send_cmd > /sys/kernel/debug/tracing/set_ftrace_filter
> echo function_graph > /sys/kernel/debug/tracing/current_tracer
> cat /sys/kernel/debug/tracing/trace
> 
> Tested on:
>   - Intel E830 NIC (FW version 1.00)
>   - Kernel 6.19.0+
> 
> Fixes: 8f5ee3c477a8 ("ice: add support for sideband messages")
> Signed-off-by: Karol Kolacinski <[email protected]>
> Signed-off-by: Przemyslaw Korba <[email protected]>
> Reviewed-by: Aleksandr Loktionov <[email protected]>
> Reviewed-by: Arkadiusz Kubalewski <[email protected]>
> ---
>  drivers/net/ethernet/intel/ice/ice_common.c   | 21 ++++--
>  drivers/net/ethernet/intel/ice/ice_controlq.c |  4 ++  
> drivers/net/ethernet/intel/ice/ice_controlq.h |  1 +
>  drivers/net/ethernet/intel/ice/ice_ptp_hw.c   | 64 +++++++++++--------
>  drivers/net/ethernet/intel/ice/ice_sbq_cmd.h  |  5 +-
>  5 files changed, 62 insertions(+), 33 deletions(-)


Tested-by: Alexander Nowlin <[email protected]>

Reply via email to