From 6a40109275626267ebf413ceda81c64719b5c431 Mon Sep 17 00:00:00 2001 From: Rahul Rameshbabu Date: Wed, 8 Mar 2023 08:18:22 -0800 Subject: [PATCH] net/mlx5: Update cyclecounter shift value to improve ptp free running mode precision Multiplier values are equivalent to 2^(shift constant) since all mlx5 devices advertise a 1Ghz frequency for the internal timer. The previous shift constant of 23 led to internal timer adjustments only taking place when the provided adjustment values were greater than or equal to ~120 ppb or ~7864 scaled ppm. Using a shift constant of 31 enables adjustments when an adjustment parameter is greater than or equal to ~0.47 ppb or ~30.8 scaled ppm. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Bar Shapira Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c index 4c9a402110595..932fbc843c692 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c @@ -39,7 +39,7 @@ #include "clock.h" enum { - MLX5_CYCLES_SHIFT = 23 + MLX5_CYCLES_SHIFT = 31 }; enum { -- 2.30.2