- 14 3月, 2018 2 次提交
-
-
由 Yixian Liu 提交于
This patch updates to support cq record doorbell for the user space. Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 Yixian Liu 提交于
This patch adds interfaces and definitions to support the rq record doorbell for the user space. Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 15 2月, 2018 4 次提交
-
-
由 Andy Shevchenko 提交于
There is no need to repeat the semantics of writel() and similar. Moreover sparse complains about this: drivers/infiniband/hw/hns/hns_roce_hw_v1.c:1690:22: expected unsigned long long val drivers/infiniband/hw/hns/hns_roce_hw_v1.c:1690:22: got restricted __le64 <noident> Fixing this by replacing __raw_write*(cpu_to_le*()) calls by plain write*() ones. Note, write*() accessors are little endian by definition. Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
It need to use free_pages function for free the memory allocated by __get_free_pages function. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 Yixian Liu 提交于
The QP can accept receive work requests only when the QP is in the states that allow them to be submitted. This patch updates the QP state judgement based on the specification. Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
When modifying mac address, it will trigger hns_roce_del_gid function and can't delete the default gid matched the index because the attribute of gid is null. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
- 05 2月, 2018 1 次提交
-
-
由 oulijun 提交于
The hip06 and hip08 run on a little endian ARM, it needs to revise the annotations to indicate that the HW uses little endian data in the various DMA buffers, and flow the necessary swaps throughout. The imm_data use big endian mode. The cpu_to_le32/le32_to_cpu swaps are no-op for this, which makes the only substantive change the handling of imm_data which is now mandatory swapped. This also keep match with the userspace hns driver and resolve the warning by sparse. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 02 2月, 2018 3 次提交
-
-
由 oulijun 提交于
The mtt_table is cleaned up during the err_unmap_cqe label, it is a mistake to duplicate the cleanup during the later unwind labels. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
This patch mainly fix some style warings matched with the new checkpatch requirement. The warning as follows: WARNING: function definition argument 'struct hns_roce_cq *' should also have an identifier name Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
The double not-operator is unncessary when used in a boolean context. This patch removes them. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
- 19 1月, 2018 1 次提交
-
-
由 weiyongjun (A) 提交于
devm_ioremap_resource() already checks if the resource is NULL, so remove the unnecessary platform_get_resource() error check. Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Reviewed-by: NLeon Romanovsky <leonro@mellanox.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 17 1月, 2018 7 次提交
-
-
由 oulijun 提交于
This patch assign a guid(Global Unique identifer) value to the hip08 device. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Reviewed-by: NLeon Romanovsky <leonro@mellanox.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
If the port is a RoCEv2 port, the remote port address and QP information which returned for UD will be modified. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
Because pkey is fixed for hip08 RoCE, it needs to assign zero for pkey_index of wc. otherwise, it will happen an error when establishing connection by communication management mechanism. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
This patch mainly configure the fields of sq wqe of ud type when posting wr of gsi qp type. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
It needs to Assign the values for some fields in qp context when qp type is gsi qp type in hip08. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
The gsi qp and rc qp use the same qp context structure and the created flow, only differentiate them by qpn and qp type. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
When modifying qp from init to init, it need to assign the cqn of send cq for tx cqn field of qp context. Otherwise, it will cause a mistake when the send and recv cq sizes are different. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
- 16 1月, 2018 1 次提交
-
-
由 Jason Gunthorpe 提交于
This matches the changes made recently to the userspace hns driver when it was made sparse clean. See rdma-core commit bffd380cfe56 ("libhns: Make the provider sparse clean") wc->imm_data is not used in the kernel so this change has no practical impact. Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
- 04 1月, 2018 6 次提交
-
-
由 oulijun 提交于
It needs to create eight reserve QPs for resolving a bug of hip06. When deregistering mr, it will issue a rdma write for every reserve QPs. When modify qp from init to rtr, it needs to set the value of dest_qp_num. Otherwise, it will lead an error of freeing mr. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 Yixian Liu 提交于
The QP can accept send work requests only when the QP is in the states that allow them to be submitted. This patch updates the QP state judgement based on the specification. Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
When the length of sge is zero, the driver need to filter it Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
This patch refactors the code of setting access flags for RDMA operation as well as adds the scene when attr->max_dest_rd_atomic is zero. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
This patch fixes the usage with sr_max filed and rr_max of qp context when modify qp. Its modifications include: 1. Adjust location of filling sr_max filed of qpc 2. Only assign the number of responder resource if IB_QP_MAX_DEST_RD_ATOMIC bit is set 3. Only assign the number of outstanding resource if IB_QP_MAX_QP_RD_ATOMIC 4. Fix the assgin algorithms for the field of sr_max and rr_max of qp context Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Reviewed-by: NLeon Romanovsky <leonro@mellanox.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 oulijun 提交于
This patch mainly implement rq inline data feature for hip08 RoCE in kernel mode. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Reviewed-by: NLeon Romanovsky <leonro@mellanox.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
- 30 12月, 2017 1 次提交
-
-
由 Yixian Liu 提交于
This patch adds more detailed comments when we call the memory barrier function, such as rmb, wmb and mb. Three mb() callers are deleted since they are unnecessary. Suggested-by: NJason Gunthorpe <jgg@mellanox.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Reviewed-by: NLeon Romanovsky <leonro@mellanox.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
- 23 12月, 2017 2 次提交
-
-
由 Yixian Liu 提交于
This patch adds eq support for hip08. The eq table can be multi-hop addressed. Signed-off-by: NYixian Liu <liuyixian@huawei.com> Reviewed-by: NLijun Ou <oulijun@huawei.com> Reviewed-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 Yixian Liu 提交于
Considering the compatibility of supporting hip08's eq process and possible changes of data structure, this patch refactors the eq code structure of hip06. We move all the eq process code for hip06 from hns_roce_eq.c into hns_roce_hw_v1.c, and also for hns_roce_eq.h. With these changes, it will be convenient to add the eq support for later hardware version. Signed-off-by: NYixian Liu <liuyixian@huawei.com> Reviewed-by: NLijun Ou <oulijun@huawei.com> Reviewed-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
- 02 12月, 2017 3 次提交
-
-
由 Wei Hu\(Xavier\) 提交于
In general, dma_alloc_coherent() returns a CPU virtual address and a DMA address, and we have no guarantee that the underlying memory even has an associated struct page at all. This patch gets rid of the page operation after dma_alloc_coherent, and records the VA returned form dma_alloc_coherent in the struct of hem in hns RoCE driver. Fixes: 9a443537("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NXiping Zhang (Francis) <zhangxiping3@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 Wei Hu\(Xavier\) 提交于
In general dma_alloc_coherent() returns a CPU virtual address and a DMA address, and we have no guarantee that the virtual address is either in the linear map or vmalloc. It could be in some other special place. We have no guarantee that the underlying memory even has an associated struct page at all. In current code, there are incorrect usage as below: dma_alloc_coherent + virt_to_page + vmap. There will probably introduce coherency problem. This patch fixes it to get rid of virt_to_page and vmap calls at Leon's suggestion. The related link: https://lkml.org/lkml/2017/11/7/34 Fixes: 9a443537("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NXiping Zhang (Francis) <zhangxiping3@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
由 Wei Hu\(Xavier\) 提交于
If the smmu is enabled, the length of sg obtained from __iommu_map_sg_attrs is not 4kB. When the IOVA is set with the sg dma address, the IOVA will not be page continuous. so, the current code has MTPT configuration error that probably cause dma operation failure. In order to fix this issue, the IOVA should be calculated based on the sg length. Fixes: 3958cc56("RDMA/hns: Configure the MTPT in hip08") Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NXiping Zhang (Francis) <zhangxiping3@huawei.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
-
- 11 11月, 2017 9 次提交
-
-
由 oulijun 提交于
The cmd_sn field of CQ doorbell inits for 0. It should be increment on each first db rung after a completion Event. if the cmd_sn of notify doorbell Adjacent two times is the same, the hardware will distinguish it for the same notify request and update its type according to the priority level of next event and solicited event. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 oulijun 提交于
The calculation of hem index are different between hns_roce_table_get and hns_roce_table_find. When the table chunk size of TRRL is not divisible by object size, it will faile to find the trrl table. This patch is to update the calculation of the hem index in the hns_roce_table_find to the same as which in the hns_roce_table_get. Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 oulijun 提交于
the owner need to be set when posting sqwqe in hip08 RoCE. The owner be used according to the below algorithm: The value of owner should be 1 in the first lap, it should be 0 in the second lap and in turn. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 oulijun 提交于
In hip08 RoCE, it need to add the sq_invld_flg field in QP context for RoCE hardware. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 oulijun 提交于
The ack timeout's value in qp context shall be a 5-bit value and be assgined by users. When at of qpc is set zero, the timer is disabled. When attr_mask set for IB_QP_TIMEOUT, The ack timeout field is effective. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 oulijun 提交于
If the extend sges exist, the sq_cur_sge_blk_addr field in QPC (qp context) should be configured. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 oulijun 提交于
When sig_type of qpc is non-selectable, all sq's wqes will produce cqe and not depend on the cqe attribute of wqe. When sig_type of qpc is selectable, The cqe attribute of wqe will decide whether to produce the cqe. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 oulijun 提交于
When send flags is IB_SEND_SOLICITED, the se(solicated event) field of sqwqe will be set. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 oulijun 提交于
When post wr for mixed rdma operation, we need to use fence mechanism to keep the correct execute order. Signed-off-by: NLijun Ou <oulijun@huawei.com> Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: NShaobo Xu <xushaobo2@huawei.com> Signed-off-by: NYixian Liu <liuyixian@huawei.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-