net/mlx5: Rate limit page not found error messages
authorEran Ben Elisha <eranbe@mellanox.com>
Sun, 19 Apr 2020 07:20:40 +0000 (10:20 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 30 Apr 2020 17:10:44 +0000 (10:10 -0700)
Thousands of pages are released with free_addr() function. In case of
buggy sync between FW and driver on released address, the log will be
flooded with error messages. Use mlx5_core_warn_rl() to limit it.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c

index c39907c641a00e0d828f53b9f5bd68fad974c64d..c790d6e3d204c34268bb39006c6dc4d34786f8ff 100644 (file)
@@ -206,7 +206,7 @@ static void free_addr(struct mlx5_core_dev *dev, u64 addr)
 
        fwp = find_fw_page(dev, addr & MLX5_U64_4K_PAGE_MASK);
        if (!fwp) {
-               mlx5_core_warn(dev, "page not found\n");
+               mlx5_core_warn_rl(dev, "page not found\n");
                return;
        }
        free_fwp(dev, fwp);