kernel_samsung_a53x/drivers/infiniband/core
Michael Guralnik 6cf4a83aa2 IB/core: Implement a limit on UMAD receive List
[ Upstream commit ca0b44e20a6f3032224599f02e7c8fb49525c894 ]

The existing behavior of ib_umad, which maintains received MAD
packets in an unbounded list, poses a risk of uncontrolled growth.
As user-space applications extract packets from this list, the rate
of extraction may not match the rate of incoming packets, leading
to potential list overflow.

To address this, we introduce a limit to the size of the list. After
considering typical scenarios, such as OpenSM processing, which can
handle approximately 100k packets per second, and the 1-second retry
timeout for most packets, we set the list size limit to 200k. Packets
received beyond this limit are dropped, assuming they are likely timed
out by the time they are handled by user-space.

Notably, packets queued on the receive list due to reasons like
timed-out sends are preserved even when the list is full.

Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Reviewed-by: Mark Zhang <markzhang@nvidia.com>
Link: https://lore.kernel.org/r/7197cb58a7d9e78399008f25036205ceab07fbd5.1713268818.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 14:19:40 +01:00
..
addr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
agent.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
agent.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cgroup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cm.c RDMA/cm: Print the old state when cm_destroy_id gets timeout 2024-11-19 11:32:21 +01:00
cm_msgs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cm_trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cm_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cma_configfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cma_priv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cma_trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cma_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core_priv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
counters.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device.c RDMA/device: Fix a race between mad_client and cm_client init 2024-11-19 08:44:57 +01:00
ib_core_uverbs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iwcm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iwcm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iwpm_msg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iwpm_util.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iwpm_util.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lag.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mad.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mad_priv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mad_rmpp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mad_rmpp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mr_pool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
multicast.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nldev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opa_smi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
packer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rdma_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rdma_core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
restrack.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
restrack.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
roce_gid_mgmt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sa_query.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
security.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ucma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ud_header.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
umem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
umem_odp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
user_mad.c IB/core: Implement a limit on UMAD receive List 2024-11-19 14:19:40 +01:00
uverbs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_cmd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_ioctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_marshall.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types_async_fd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types_counters.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types_cq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types_dm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types_flow_action.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types_mr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types_qp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types_srq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_std_types_wq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uverbs_uapi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
verbs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00