]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: xsk: Flush RQ on XSK activation to save memory
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Sun, 2 Oct 2022 04:56:18 +0000 (21:56 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 3 Oct 2022 23:55:26 +0000 (16:55 -0700)
commit9d350e2f856a83e5d8f085bb90d242aaf24f2551
treeafc83e8c72d80a0b85b1c100d6cb84c68696274c
parent8e688da29d0ba6c7f73a58d43d90011904ceae79
net/mlx5e: xsk: Flush RQ on XSK activation to save memory

The regular RQ remains open after opening an XSK socket, in order to
guarantee that closing the XSK socket never fails due to an error when
reopening the regular RQ.

To save memory, the regular RQ can be deactivated and flushed, releasing
all pages, when an XSK socket is open.

Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/pool.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c