OSDN Git Service

RDMA/hns: WARN_ON if get a reserved sl from users
authorWeihang Li <liweihang@huawei.com>
Fri, 11 Dec 2020 01:37:31 +0000 (09:37 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 11 Dec 2020 19:21:34 +0000 (15:21 -0400)
commitf75506833eed65cc537293508b7edd5788d67e23
treedab0184c12bd8a58149e4cf126476ca20b1c741f
parent94a8c4dfcdb2b4fcb3dfafc39c1033a0b4637c86
RDMA/hns: WARN_ON if get a reserved sl from users

According to the RoCE v1 specification, the sl (service level) 0-7 are
mapped directly to priorities 0-7 respectively, sl 8-15 are reserved. The
driver should verify whether the value of sl is larger than 7, if so, an
exception should be returned.

Link: https://lore.kernel.org/r/1607650657-35992-6-git-send-email-liweihang@huawei.com
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c