]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: When changing XDP program without reset, take refs for XSK RQs
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Thu, 11 Feb 2021 13:51:11 +0000 (15:51 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 10 Mar 2021 19:01:53 +0000 (11:01 -0800)
commit55fd752b4bff1fa4aeea346447dd7a233efdbd73
tree21b59585d95e5d5a121b8cf2b3c38bcd035081a8
parentcb04a70cd0e2eab76253734597db97c5a47ea8f6
net/mlx5e: When changing XDP program without reset, take refs for XSK RQs

Each RQ (including XSK RQs) takes a reference to the XDP program. When
an XDP program is attached or detached, the channels and queues are
recreated, however, there is a special flow for changing an active XDP
program to another one. In that flow, channels and queues stay alive,
but the refcounts of the old and new XDP programs are adjusted. This
flow didn't increment refcount by the number of active XSK RQs, and this
commit fixes it.

Fixes: 40e89241b3e0 ("net/mlx5e: Add XSK zero-copy support")
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c