]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mlxsw: spectrum_acl: Do not invalidate already invalid ACL groups
authorIdo Schimmel <idosch@mellanox.com>
Mon, 19 Mar 2018 07:51:03 +0000 (09:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Mar 2018 16:11:02 +0000 (12:11 -0400)
When a new ACL group is created its region (ACL) list is initially
empty. Thus, the call to mlxsw_sp_acl_tcam_group_update() would
basically invalidate an already invalid (non-existent) group.

Remove the unnecessary call and make the function symmetric to its del()
counterpart.

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>
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c

index c6e180c2be1e825e394662b38b8374c7c4c6e252..ad1b548e3cace26f149ec9b9ac7eea1e493f8b6e 100644 (file)
@@ -228,10 +228,6 @@ mlxsw_sp_acl_tcam_group_add(struct mlxsw_sp *mlxsw_sp,
        if (err)
                return err;
 
-       err = mlxsw_sp_acl_tcam_group_update(mlxsw_sp, group);
-       if (err)
-               goto err_group_update;
-
        err = rhashtable_init(&group->chunk_ht,
                              &mlxsw_sp_acl_tcam_chunk_ht_params);
        if (err)
@@ -240,7 +236,6 @@ mlxsw_sp_acl_tcam_group_add(struct mlxsw_sp *mlxsw_sp,
        return 0;
 
 err_rhashtable_init:
-err_group_update:
        mlxsw_sp_acl_tcam_group_id_put(tcam, group->id);
        return err;
 }