aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-02-28 06:59:16 +0000
committerDavid S. Miller <davem@davemloft.net>2019-03-01 21:44:10 -0800
commitf9b274ce014421899b62cb0e41e5e7b72773782b (patch)
tree042dec71261460a457ca5fa3b7272f432863bca3 /drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
parentswitchdev: Remove unused transaction item queue (diff)
downloadlinux-dev-f9b274ce014421899b62cb0e41e5e7b72773782b.tar.xz
linux-dev-f9b274ce014421899b62cb0e41e5e7b72773782b.zip
mlxsw: spectrum_acl: Push rehash dw struct into rehash sub-struct
More rehash related fields are going to come. Push "dw" into sub-struct that will accommodate the others as well. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
index c9d9cded1724..e2699373dfa7 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
@@ -192,7 +192,9 @@ struct mlxsw_sp_acl_tcam_vregion {
struct mlxsw_afk_key_info *key_info;
struct mlxsw_sp_acl_tcam *tcam;
struct mlxsw_sp_acl_tcam_vgroup *vgroup;
- struct delayed_work rehash_dw;
+ struct {
+ struct delayed_work dw;
+ } rehash;
struct mlxsw_sp *mlxsw_sp;
bool failed_rollback; /* Indicates failed rollback during migration */
unsigned int ref_count;
@@ -718,7 +720,7 @@ mlxsw_sp_acl_tcam_vregion_rehash_work_schedule(struct mlxsw_sp_acl_tcam_vregion
if (!interval)
return;
- mlxsw_core_schedule_dw(&vregion->rehash_dw,
+ mlxsw_core_schedule_dw(&vregion->rehash.dw,
msecs_to_jiffies(interval));
}
@@ -730,7 +732,7 @@ static void mlxsw_sp_acl_tcam_vregion_rehash_work(struct work_struct *work)
{
struct mlxsw_sp_acl_tcam_vregion *vregion =
container_of(work, struct mlxsw_sp_acl_tcam_vregion,
- rehash_dw.work);
+ rehash.dw.work);
mlxsw_sp_acl_tcam_vregion_rehash(vregion->mlxsw_sp, vregion);
mlxsw_sp_acl_tcam_vregion_rehash_work_schedule(vregion);
@@ -778,7 +780,7 @@ mlxsw_sp_acl_tcam_vregion_create(struct mlxsw_sp *mlxsw_sp,
if (vgroup->vregion_rehash_enabled && ops->region_rehash_hints_get) {
/* Create the delayed work for vregion periodic rehash */
- INIT_DELAYED_WORK(&vregion->rehash_dw,
+ INIT_DELAYED_WORK(&vregion->rehash.dw,
mlxsw_sp_acl_tcam_vregion_rehash_work);
mlxsw_sp_acl_tcam_vregion_rehash_work_schedule(vregion);
mutex_lock(&tcam->lock);
@@ -809,7 +811,7 @@ mlxsw_sp_acl_tcam_vregion_destroy(struct mlxsw_sp *mlxsw_sp,
mutex_lock(&tcam->lock);
list_del(&vregion->tlist);
mutex_unlock(&tcam->lock);
- cancel_delayed_work_sync(&vregion->rehash_dw);
+ cancel_delayed_work_sync(&vregion->rehash.dw);
}
mlxsw_sp_acl_tcam_vgroup_vregion_detach(mlxsw_sp, vregion);
if (vregion->region2)
@@ -847,9 +849,9 @@ int mlxsw_sp_acl_tcam_vregion_rehash_intrvl_set(struct mlxsw_sp *mlxsw_sp,
mutex_lock(&tcam->lock);
list_for_each_entry(vregion, &tcam->vregion_list, tlist) {
if (val)
- mlxsw_core_schedule_dw(&vregion->rehash_dw, 0);
+ mlxsw_core_schedule_dw(&vregion->rehash.dw, 0);
else
- cancel_delayed_work_sync(&vregion->rehash_dw);
+ cancel_delayed_work_sync(&vregion->rehash.dw);
}
mutex_unlock(&tcam->lock);
return 0;