summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-03-08 19:17:10 +0300
committerDavid S. Miller <davem@davemloft.net>2017-03-09 20:54:46 +0300
commitacd7628de05c73118aab7ae4847a5b5b2c6999c9 (patch)
treecf5fdd8b5d863154c34126938872dab684c9aeda /drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
parentd85f6c14e967b0bddfa9712daa17d79e297d18b8 (diff)
downloadlinux-acd7628de05c73118aab7ae4847a5b5b2c6999c9.tar.xz
mlx4: reduce rx ring page_cache size
We only need to store the page and dma address. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mlx4_en.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4_en.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
index fc7b4da5d8c3..c98940c6acd0 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -268,9 +268,13 @@ struct mlx4_en_rx_alloc {
};
#define MLX4_EN_CACHE_SIZE (2 * NAPI_POLL_WEIGHT)
+
struct mlx4_en_page_cache {
u32 index;
- struct mlx4_en_rx_alloc buf[MLX4_EN_CACHE_SIZE];
+ struct {
+ struct page *page;
+ dma_addr_t dma;
+ } buf[MLX4_EN_CACHE_SIZE];
};
struct mlx4_en_priv;