RDMA/hns: Update the value of qp type
authorLijun Ou <oulijun@huawei.com>
Mon, 6 Jan 2020 12:21:12 +0000 (20:21 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 7 Jan 2020 20:26:33 +0000 (16:26 -0400)
The values used to represent service type of RC and UD should be
interchanged according to design of hardware. And it's better to define
these types in enumeration than macros.

Link: https://lore.kernel.org/r/1578313276-29080-4-git-send-email-liweihang@huawei.com
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_device.h

index e447c40fee963aaef9c9efd7e05005196f61d050..21751e43aab3c8431d100847afc57f073c1d7a3d 100644 (file)
 #define NODE_DESC_SIZE                         64
 #define DB_REG_OFFSET                          0x1000
 
-#define SERV_TYPE_RC                           0
-#define SERV_TYPE_RD                           1
-#define SERV_TYPE_UC                           2
-#define SERV_TYPE_UD                           3
-
 /* Configure to HW for PAGE_SIZE larger than 4KB */
 #define PG_SHIFT_OFFSET                                (PAGE_SHIFT - 12)
 
  */
 #define EQ_DEPTH_COEFF                         2
 
+enum {
+       SERV_TYPE_RC,
+       SERV_TYPE_UC,
+       SERV_TYPE_RD,
+       SERV_TYPE_UD,
+};
+
 enum {
        HNS_ROCE_SUPPORT_RQ_RECORD_DB = 1 << 0,
        HNS_ROCE_SUPPORT_SQ_RECORD_DB = 1 << 1,