net/mlx5: Bridge, fix ageing time
Ageing time is not converted from clock_t to jiffies which results incorrect ageing timeout calculation in workqueue update task. Fix it by applying clock_t_to_jiffies() to provided value. Fixes: c636a0f0f3f0 ("net/mlx5: Bridge, dynamic entry ageing") Signed-off-by: Vlad Buslov <vladbu@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
c623c95afa
commit
6d8680da2e
@ -579,7 +579,7 @@ static struct mlx5_esw_bridge *mlx5_esw_bridge_create(int ifindex,
|
||||
xa_init(&bridge->vports);
|
||||
bridge->ifindex = ifindex;
|
||||
bridge->refcnt = 1;
|
||||
bridge->ageing_time = BR_DEFAULT_AGEING_TIME;
|
||||
bridge->ageing_time = clock_t_to_jiffies(BR_DEFAULT_AGEING_TIME);
|
||||
list_add(&bridge->list, &br_offloads->bridges);
|
||||
|
||||
return bridge;
|
||||
@ -1006,7 +1006,7 @@ int mlx5_esw_bridge_ageing_time_set(unsigned long ageing_time, struct mlx5_eswit
|
||||
if (!vport->bridge)
|
||||
return -EINVAL;
|
||||
|
||||
vport->bridge->ageing_time = ageing_time;
|
||||
vport->bridge->ageing_time = clock_t_to_jiffies(ageing_time);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user