RDMA/hns: Add atomic support
authorLijun Ou <oulijun@huawei.com>
Sat, 22 Sep 2018 08:21:06 +0000 (16:21 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 26 Sep 2018 20:59:13 +0000 (14:59 -0600)
commit384f881851127dd834a2733f91999b859a5ffddb
treec84963aecea006719dec769a4f3249126a1b49f1
parentb9c1ea40e8bbd2ce8bf975ec9cf42817021cadb6
RDMA/hns: Add atomic support

This patch adds atomic operations for hip08, includes fetchadd and cmpswap
operation.  In order to enable atomic, the driver needs to do the
following steps:

1. Enable the atomic caps for RoCE device
2. Post the wqe context of atomic type
3. Configure the atomic type of mtpt

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h
drivers/infiniband/hw/hns/hns_roce_main.c