]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/hns: Fix RoCEv1 failure due to DSCP
authorJunxian Huang <huangjunxian6@hisilicon.com>
Sun, 4 Jan 2026 06:40:56 +0000 (14:40 +0800)
committerLeon Romanovsky <leon@kernel.org>
Sun, 4 Jan 2026 15:09:51 +0000 (10:09 -0500)
commit84bd5d60f0a2b9c763c5e6d0b3d8f4f61f6c5470
treef6e68922488ea0e6ef0bff988a8fece836765fcf
parent8cda8acbb1f8c6c0fec45b7166bb558b5af59da8
RDMA/hns: Fix RoCEv1 failure due to DSCP

DSCP is not supported in RoCEv1, but get_dscp() is still called. If
get_dscp() returns an error, it'll eventually cause create_ah to fail
even when using RoCEv1.

Correct the return value and avoid calling get_dscp() when using
RoCEv1.

Fixes: ee20cc17e9d8 ("RDMA/hns: Support DSCP")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20260104064057.1582216-4-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_ah.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.c