summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorPraveen Kumar Kannoju <praveen.kannoju@oracle.com>2026-06-15 17:17:59 +0000
committerLeon Romanovsky <leon@kernel.org>2026-07-13 04:32:59 -0400
commit9539e6196604715a93972e4ac31378b358a16767 (patch)
tree843eb5007e8e6de9e74f9d8e275f991a77fe9c32 /tools/perf/scripts/python/stackcollapse.py
parent15ae32c4a3551c4c9da457370bdfdd65d171e512 (diff)
IB/mlx4: delete allocated id_map_entry while sending REJ
The mlx4 CM paravirtualization layer rewrites a VF's local communication ID to a PF-visible ID when CM MADs are sent from the VF. For messages that start or advance a connection from the VF side, such as REQ, REP, MRA and SIDR_REQ, mlx4_ib_multiplex_cm_handler() allocates an id_map_entry when no existing mapping is found. A REJ is different because it is a terminal response to an already known exchange. It should either find an existing id_map_entry, rewrite the local communication ID, and schedule that entry for deletion, or it should pass through unchanged when no mapping exists. Some REJ messages, such as rejects for an inbound REQ before an MRA or REP was sent, do not have an id_map_entry because their local_comm_id is zero. Timeout REJ messages are handled in the initial lookup branch, but a lookup miss there must not fall through to id_map_alloc(); such a miss means there is no existing mapping to translate or delete for the REJ. Commit 227a0e142e37 ("IB/mlx4: Add support for REJ due to timeout") added the timeout REJ case to the initial branch so an outgoing timeout REJ could reuse the id_map_entry that was created when the VF's REQ was multiplexed. Reusing that entry is the useful part: it rewrites the timeout REJ local_comm_id to the same PF-visible ID that was sent in the REQ. If the lookup misses, allocating a new id_map_entry does not help because the peer has never seen that new PF-visible ID, and REJ is not starting a new exchange. Keep timeout REJ handling in the initial lookup branch, but return before allocation if no mapping is found. Handle the other REJ cases with the same lookup-only behavior. When a mapping is found, translate the local communication ID and schedule delayed deletion, as is already done for DREQ and for received REJ in the demux path. When no mapping is found, keep the existing pass-through behavior. Signed-off-by: Praveen Kumar Kannoju <praveen.kannoju@oracle.com> Link: https://patch.msgid.link/20260615171759.557425-1-praveen.kannoju@oracle.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions