]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/rxe: Fix __bth_set_resv6a
authorzhenwei pi <pizhenwei@bytedance.com>
Thu, 22 Aug 2024 06:52:23 +0000 (14:52 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 23 Aug 2024 14:42:38 +0000 (11:42 -0300)
__bth_set_resv6a is used to clear BIT [24, 29] of rxe_bth::qpn, the
wrong expression leads other BITs into 1.

Link: https://patch.msgid.link/r/20240822065223.1117056-4-pizhenwei@bytedance.com
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_hdr.h

index 46f82b27fcd2f540ed32d7495f530164b2d2e452..1f0322491d8c1d2d28958f545c982eb5f8a655a2 100644 (file)
@@ -234,7 +234,7 @@ static inline void __bth_set_resv6a(void *arg)
 {
        struct rxe_bth *bth = arg;
 
-       bth->qpn = cpu_to_be32(~BTH_RESV6A_MASK);
+       bth->qpn &= cpu_to_be32(~BTH_RESV6A_MASK);
 }
 
 static inline int __bth_ack(void *arg)