net/mlx5: DR, Skip rehash for tables with byte mask zero
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / steering / dr_ste.c
index 4efe1b0be4a84b2cee79a5d0f9052c37edebacb1..80680765d59cfeaa0d36253e2bdb460b180779fc 100644 (file)
@@ -671,7 +671,7 @@ static void dr_ste_set_ctrl(struct mlx5dr_ste_htbl *htbl)
 
        htbl->ctrl.may_grow = true;
 
-       if (htbl->chunk_size == DR_CHUNK_SIZE_MAX - 1)
+       if (htbl->chunk_size == DR_CHUNK_SIZE_MAX - 1 || !htbl->byte_mask)
                htbl->ctrl.may_grow = false;
 
        /* Threshold is 50%, one is added to table of size 1 */