Patch "RDMA/mlx5: Set GRH fields in query QP on RoCE" has been added to the 5.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    RDMA/mlx5: Set GRH fields in query QP on RoCE

to the 5.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rdma-mlx5-set-grh-fields-in-query-qp-on-roce.patch
and it can be found in the queue-5.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2914f04285781034fb5e507cef4601828c951ec0
Author: Aharon Landau <aharonl@xxxxxxxxxxxx>
Date:   Mon Apr 13 16:20:28 2020 +0300

    RDMA/mlx5: Set GRH fields in query QP on RoCE
    
    commit 2d7e3ff7b6f2c614eb21d0dc348957a47eaffb57 upstream.
    
    GRH fields such as sgid_index, hop limit, et. are set in the QP context
    when QP is created/modified.
    
    Currently, when query QP is performed, we fill the GRH fields only if the
    GRH bit is set in the QP context, but this bit is not set for RoCE. Adjust
    the check so we will set all relevant data for the RoCE too.
    
    Since this data is returned to userspace, the below is an ABI regression.
    
    Fixes: d8966fcd4c25 ("IB/core: Use rdma_ah_attr accessor functions")
    Link: https://lore.kernel.org/r/20200413132028.930109-1-leon@xxxxxxxxxx
    Signed-off-by: Aharon Landau <aharonl@xxxxxxxxxxxx>
    Reviewed-by: Maor Gottlieb <maorg@xxxxxxxxxxxx>
    Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 8fe149e808af1..245fef36ab4cb 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -5545,7 +5545,9 @@ static void to_rdma_ah_attr(struct mlx5_ib_dev *ibdev,
 	rdma_ah_set_path_bits(ah_attr, path->grh_mlid & 0x7f);
 	rdma_ah_set_static_rate(ah_attr,
 				path->static_rate ? path->static_rate - 5 : 0);
-	if (path->grh_mlid & (1 << 7)) {
+
+	if (path->grh_mlid & (1 << 7) ||
+	    ah_attr->type == RDMA_AH_ATTR_TYPE_ROCE) {
 		u32 tc_fl = be32_to_cpu(path->tclass_flowlabel);
 
 		rdma_ah_set_grh(ah_attr, NULL,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux