net/mlx5e: xsk: dynamically allocate mlx5e_channel_param
authorArnd Bergmann <arnd@arndb.de>
Tue, 23 Jul 2019 12:02:26 +0000 (12:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jul 2019 20:39:43 +0000 (13:39 -0700)
commit658688ce6c936254c34ea1f31549ec62439574aa
treeed3156da79609e9054bc52ae4acec6e94b8f65c4
parentc9b6c56d52bea8adbf10ae0b9e4a7b88017c6f27
net/mlx5e: xsk: dynamically allocate mlx5e_channel_param

The structure is too large to put on the stack, resulting in a
warning on 32-bit ARM:

drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c:59:5: error: stack frame size of 1344 bytes in function
      'mlx5e_open_xsk' [-Werror,-Wframe-larger-than=]

Use kvzalloc() instead.

Fixes: a038e9794541 ("net/mlx5e: Add XSK zero-copy support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c