mlx5dv_dci_stream_id_reset(3)
π mlx5dv_dci_stream_id_reset β bestie's guide to un-flopping a stream_id
okay so real talk, this one lives in the mlx5dv manual section (section 3, the library-calls girlies β¨), and it's called mlx5dv_dci_stream_id_reset. Say that five times fast, I dare you. π«Ά
β¨ NAME β¨
mlx5dv_dci_stream_id_reset β resets the stream_id of a given DCI QP. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <infiniband/mlx5dv.h>
int mlx5dv_dci_stream_id_reset(struct ibv_qp *qp, uint16_t stream_id);
π¦ DESCRIPTION π¦
so this is the function SW (that's you, bestie π) calls to reset an errored stream_id inside the HW DCI context. like, the stream_id is going through it and you're here to help it heal. π§
here's the situation: on a work completion with error, the application should call ibv_query_qp() to check whether the QP got moved to an error state, or whether it's still operational (chilling in RTS state). and if it's still in RTS? that means the specific stream_id that caused the completion with error is the one in error state. not the whole QP. just that one stream. main character energy but make it a problem π.
errors that are stream related will only flush that stream_id's work request β because they're handled in order in the send queue, no skipping the line, periodt. once all of that stream_id's WR's are flushed, the application should reset the errored stream_id by calling mlx5dv_dci_stream_id_reset(). and the work requests for the other stream_id's? they keep getting processed by the QP, totally unbothered, living their best lives. π
β οΈ important lore: the DCI QP will move to an error state and stop operating once the number of uniquestream_ids in error reaches the DCI QP'slog_num_erroredstreams, which is defined by SW. so like, don't just let them pile up, okay? π
and how do you even find which stream_id is the guilty one? the application should use the wr_id in the ibv_wc to find the stream_id from its private context. iykyk. π₯
π ARGUMENTS π
qpβ theibv_qpobject to issue the action on. the QP in question, the one we're doing the thing to. πstream_idβ the DCI stream channel id that needs to be reset. yeah. that one. the one that needs the reset. π
β RETURN VALUE β
returns 0 on success β slay, we love a clean zero β¨ β or the value of errno on failure, which is telling you the failure reason. ngl, when it fails it's giving "read the errno, bestie". π
π AUTHOR π
Lior Nahmanson <liorna@nvidia.com> β icon, legend, the moment. π«Ά
and that's the page, fr fr π β brought to you by the mlx5dv_dci_stream_id_reset(3) manual page in the mlx5dv manual. no extra date or version stamp was doing the rounds down at the bottom, just the page name twice, so consider this your cute sign-off instead. bye bestie, go reset those stream_ids responsibly πππ¦
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- ubuntu jammy: libibverbs-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms