rdma/mlx5_dv: stamp RoCE IPv4 TOS from SL on RTR - #5
Merged
Merged
Conversation
rdma_set_option TOS only programs the SQ. mlx5_dv moves the QP itself, so ConnectX builds the RoCEv2 IP header from AV traffic_class, which rdma_init_qp_attr often leaves 0. Fill TOS = SL<<5 when the AV is present. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rdma_set_option(RDMA_OPTION_ID_TOS)only programs SL / the NIC SQ (tx_prio3). mlx5_dv then moves the QP withibv_modify_qp, and ConnectX builds the RoCEv2 IPv4 header from the RTR AVtraffic_class.rdma_init_qp_attroften leaves that field 0, so the leaftrust dscpparks writes in Q0 even when host prio 3 is busy.traffic_classis unset, settraffic_class = SL << 5(SL 3 → TOS 96 / DSCP 24). Both initiatorcomplete_connectand nvmfacceptuse this helper.Test plan
--with-rdma=mlx5_dvand pin into IM.xe-1/1/5egress-queues 3 on the same-leaf worker-9 moves with write IO (not only hosttx_prio3).Made with Cursor