net/mlx4_en: Print page allocator information

After Initialization of page_alloc, print actual allocated page
size and number of frags it contains. prints is done only when drv
message level is set on the interface.

Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ido Shamay 2015-02-03 17:57:19 +02:00 committed by David S. Miller
parent 1c755cc5be
commit b110d2ce49
1 changed files with 4 additions and 0 deletions

View File

@ -162,6 +162,10 @@ static int mlx4_en_init_allocator(struct mlx4_en_priv *priv,
if (mlx4_alloc_pages(priv, &ring->page_alloc[i], if (mlx4_alloc_pages(priv, &ring->page_alloc[i],
frag_info, GFP_KERNEL | __GFP_COLD)) frag_info, GFP_KERNEL | __GFP_COLD))
goto out; goto out;
en_dbg(DRV, priv, " frag %d allocator: - size:%d frags:%d\n",
i, ring->page_alloc[i].page_size,
atomic_read(&ring->page_alloc[i].page->_count));
} }
return 0; return 0;