RDMA/hns: Optimize the wr opcode conversion from ib to hns
authorXi Wang <wangxi11@huawei.com>
Tue, 10 Mar 2020 11:18:02 +0000 (19:18 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 18 Mar 2020 13:23:12 +0000 (10:23 -0300)
commite363f7de4e60eedbf7af126ed14d10ffb110c697
tree1c7dd7c028f58bd84fb590567ec6142d4eb4ddd6
parent00a59d30f3f953b4dbfffcae96e927e62533e6cf
RDMA/hns: Optimize the wr opcode conversion from ib to hns

Simplify the wr opcode conversion from ib to hns by using a map table
instead of the switch-case statement.

Link: https://lore.kernel.org/r/1583839084-31579-4-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c