An error occurred fetching the project authors.
- 04 Apr, 2018 2 commits
-
-
Parav Pandit authored
Now that ib_gid_attr contains device, port and index, simplify the provider APIs add_gid() and del_gid() to use device, port and index fields from the ib_gid_attr attributes structure. Signed-off-by:
Parav Pandit <parav@mellanox.com> Signed-off-by:
Leon Romanovsky <leonro@mellanox.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com>
-
Parav Pandit authored
ib_query_gid() fetches the GID from the software cache maintained in ib_core for RoCE ports. Therefore, simplify the provider drivers for RoCE to treat query_gid() callback as never called for RoCE, and only require non-RoCE devices to implement it. Signed-off-by:
Parav Pandit <parav@mellanox.com> Signed-off-by:
Leon Romanovsky <leonro@mellanox.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com>
-
- 19 Mar, 2018 2 commits
-
-
Matan Barak authored
Extending uverbs_ioctl header with driver_id and another reserved field. driver_id should be used in order to identify the driver. Since every driver could have its own parsing tree, this is necessary for strace support. Downstream patches take off the EXPERIMENTAL flag from the ioctl() IB support and thus we add some reserved fields for future usage. Reviewed-by:
Yishai Hadas <yishaih@mellanox.com> Signed-off-by:
Matan Barak <matanb@mellanox.com> Signed-off-by:
Leon Romanovsky <leonro@mellanox.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com>
-
Yixian Liu authored
The data in resp will be copied from kernel to userspace, thus it needs to be initialized to zeros to avoid copying uninited stack memory. Reported-by:
Dan Carpenter <dan.carpenter@oracle.com> Fixes: e088a685 ("RDMA/hns: Support rq record doorbell for the user space") Signed-off-by:
Yixian Liu <liuyixian@huawei.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com>
-
- 13 Mar, 2018 2 commits
-
-
Yixian Liu authored
This patch updates to support rq record doorbell for the kernel space. Signed-off-by:
Yixian Liu <liuyixian@huawei.com> Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Yixian Liu authored
This patch adds interfaces and definitions to support the rq record doorbell for the user space. Signed-off-by:
Yixian Liu <liuyixian@huawei.com> Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 14 Feb, 2018 1 commit
-
-
oulijun authored
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:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com>
-
- 05 Feb, 2018 1 commit
-
-
oulijun authored
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:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 01 Feb, 2018 1 commit
-
-
oulijun authored
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:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com>
-
- 22 Dec, 2017 1 commit
-
-
Yixian Liu authored
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:
Yixian Liu <liuyixian@huawei.com> Reviewed-by:
Lijun Ou <oulijun@huawei.com> Reviewed-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com>
-
- 10 Nov, 2017 4 commits
-
-
oulijun authored
The TRRL(Target RDMA Read/aTOMIC List) record the information of receiving RDMA READ or ATOMIC operation in hip08. It will be used the hardware. The driver need to assign a continuous physical address for trrl_ba field of qp context. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Yixian Liu <liuyixian@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu(Xavier) authored
The hardware vendors need to generate RoCEv1 or RoCEv2 packet according to the sgid type configured. Besides, update the gid table size for hip08 RoCE device. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Yixian Liu <liuyixian@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu(Xavier) authored
HNS_ROCE_CAP_FALG_ROCE_V1_V2 is added for selecting capability of RoCE in hns driver. When HNS_ROCE_CAP_FALG_ROCE_V1_V2 is set, driver will inform ib core that the related hns device can support RoCEv2, and ib core can generate the gid of the related type. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Yixian Liu <liuyixian@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu(Xavier) authored
This patch adds rereg mr support for hip08. Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Yixian Liu <liuyixian@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 25 Oct, 2017 1 commit
-
-
oulijun authored
It is needed to call modify cq API for modifying cq context fields for controlling event generation moderations. This patch mainly adds it. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 29 Sep, 2017 2 commits
-
-
Lijun Ou authored
The driver doesn't actually register an inetaddr notifier function, so there is no need to unregister it on shutdown. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu(Xavier) authored
When lp_qp_work is NULL, we should return ENOMEM. In order to do so, we had to make some upper layer functions return a value instead of being void type so we can propagate the error up the stack. This patch fixes the smatch error as below: drivers/infiniband/hw/hns/hns_roce_hw_v1.c:918 hns_roce_v1_recreate_lp_qp() error: potential null dereference 'lp_qp_work'. (kzalloc returns null) Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 27 Sep, 2017 6 commits
-
-
Wei Hu(Xavier) authored
This patch replaces condition statement to reduce usage of hardware version information in common driver. Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Shaobo Xu authored
In hip08, the SQWQE/SGE/RQWQE and CQE have different hop num and page size, so we need to manage the base address table of the SQWQE/SGE/RQWQE and CQE separately. This patch is to split CQE from MTT(SQWQE/SGE/RQWQE). Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu(Xavier) authored
The profile's content mainly set some specifications and obtain some hardware resources by implementing the relative commands. Because max sge num of send queue is not the same with receive queue in hip08, we modified the calculation of props->max_sge in query_device ops. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu(Xavier) authored
The command queue is the configuration queue. The software configures hardware by filling the commands into command queues. It includes command send queue and receive queue. In hip08 RoCE engine, It supports to configure and query registers by command queue. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu(Xavier) authored
In order to support the scalability of the hardware version, the features irrelevant to the hardware will be located in the hns-roce.ko, and the hardware relevant operations will be located in hns_roce_hw_v1.ko or hns_roce_hw_v2.ko based on the series chips. The hip08 RoCE engine is a PCI device, hip06 RoCE engine is a platform device. In order to support both platform device and PCI device, We replace &hr_dev->pdev->dev with hr_dev->dev in hns-roce.ko as belows: Before modification: struct device *dev = hr_dev->dev; After modification: struct device *dev = &hr_dev->pdev->dev; The related structure: struct hns_roce_dev { ... struct platform_device *pdev; struct pci_dev *pci_dev; struct device *dev; ... } Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu(Xavier) authored
The hardware relevant definitions and operations are implemented in hns_roce_hw_v* file. According to the diversity chips, the file is named as hns_roce_hw_v1.c or hns_roce_hw_v2.c etc. The general software process flow, common structures and allocated algorithms are implemented in other files located in hns roce driver. In order to support the scalability of the hardware version, the common driver features are in the hns-roce.ko, and the hardware relevant operations are in hns_roce_hw_v1.ko or hns_roce_hw_v2.ko based on the series chips. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 18 Jul, 2017 1 commit
-
-
oulijun authored
When modified the MAC address used hns_roce_mac function, we release and create reserved qp again, It is not necessary to use spin_lock_bh and spin_unlock_bh in handle_en_event, Otherwise, it will occur a error. This patch mainly fixes it. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 19 Feb, 2017 1 commit
-
-
Arnd Bergmann authored
I ran into a build error on arm64 randconfig testing: infiniband/hw/hns/hns_roce_main.c:539:1: error: data definition has no type or storage class [-Werror] infiniband/hw/hns/hns_roce_main.c:539:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int] infiniband/hw/hns/hns_roce_main.c:539:1: error: parameter names (without types) in function declaration [-Werror] infiniband/hw/hns/hns_roce_main.c:979:226: error: data definition has no type or storage class [-Werror] infiniband/hw/hns/hns_roce_main.c:979:226: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int] infiniband/hw/hns/hns_roce_main.c:979:1: error: parameter names (without types) in function declaration [-Werror] Including the module.h makes it build again. Fixes: 9a443537 ("IB/hns: Add driver files for hns RoCE driver") Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 14 Feb, 2017 1 commit
-
-
Or Gerlitz authored
Change the drivers to call ib_query_port in their get port immutable handler instead of their own query port handler. Doing this required to set the core cap flags of this device before the ib_query_port call is made, since the IB core might need these caps to serve the port query. Drivers are ensured by the IB core that the port attributes passed to the port query verb implementation are zero, and hence we removed the zeroing from the drivers. This patch doesn't add any new functionality. Signed-off-by:
Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by:
Matan Barak <matanb@mellanox.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org> Reviewed-by:
Steve Wise <swise@opengridcomputing.com> Acked-by:
Adit Ranadive <aditr@vmware.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 24 Jan, 2017 1 commit
-
-
Bart Van Assche authored
Prepare for removal of ib_device.dma_device. Signed-off-by:
Bart Van Assche <bart.vanassche@sandisk.com> Cc: Lijun Ou <oulijun@huawei.com> Cc: Wei Hu(Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 03 Dec, 2016 8 commits
-
-
Leon Romanovsky authored
This patch moves HNS vendor's specific structures to common UAPI folder which will be visible to all consumers. Signed-off-by:
Leon Romanovsky <leon@kernel.org> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Lijun Ou authored
This patch mainly fix the name for IB device in order to match with libhns. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu (Xavier) authored
It deleted the redundant memset operation because the memory allocated by ib_alloc_device has been set zero. Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu (Xavier) authored
In hns_roce driver, we need not call iboe_get_mtu to reduce IB headers from effective IBoE MTU because hr_dev->caps.max_mtu has already been reduced. Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Shaobo Xu authored
If the resources of mr are freed while executing the user case, hardware can not been notified in hip06 SoC. Then hardware will hold on when it reads the payload by the PA which has been released. In order to slove this problem, RoCE driver creates 8 reserved loopback QPs to ensure zero wqe when free mr. When the mac address is reset, in order to avoid loopback failure, we need to release the reserved loopback QPs and recreate them. Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Reviewed-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Salil authored
This patch correct the comment style errors caught by checkpatch.pl script Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Shaobo Xu authored
IB core has implemented the calculation of GIDs and the management of GID tables, and it is now responsible to supply query function for GIDs. So the calculation of GIDs and the management of GID tables in the RoCE driver is redundant. The patch is to implement the add_gid/del_gid to set the GIDs in the RoCE driver, remove the redundant calculation and management of GIDs in the notifier call of the net device and the inet, and update the query_gid. Signed-off-by:
Shaobo Xu <xushaobo2@huawei.com> Reviewed-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Wei Hu (Xavier) authored
This patch added the code for refreshing CQ CI using TPTR in hip06 SoC. We will send a doorbell to hardware for refreshing CQ CI when user succeed to poll a cqe. But it will be failed if the doorbell has been blocked. So hardware will read a special buffer called TPTR to get the lastest CI value when the cq is almost full. This patch support the special CI buffer as follows: a) Alloc the memory for TPTR in the hns_roce_tptr_init function and free it in hns_roce_tptr_free function, these two functions will be called in probe function and in the remove function. b) Add the code for computing offset(every cq need 2 bytes) and write the dma addr to every cq context to notice hardware in the function named hns_roce_v1_write_cqc. c) Add code for mapping TPTR buffer to user space in function named hns_roce_mmap. The mapping distinguish TPTR and UAR of user mode by vm_pgoff(0: UAR, 1: TPTR, others:invaild) in hip06. d) Alloc the code for refreshing CQ CI using TPTR in the function named hns_roce_v1_poll_cq. e) Add some variable definitions to the related structure. Signed-off-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Dongdong Huang(Donald) <hdd.huang@huawei.com> Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
- 03 Oct, 2016 5 commits
-
-
Lijun Ou authored
This lock will be used in query port interface, and will be called while IB device was registered to OFED framework/IB Core. So, the lock of iboe must be initiated before IB device was registered. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Signed-off-by:
Dongdong Huang(Donald) <hdd.huang@huawei.com> Reviewed-by:
Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Lijun Ou authored
The parameter named collapsed unused in hns_roce_cq_alloc. Also, parameter named doorbell_lock unsed in hns_roce_v1_cq_set_ci. This patch optimize these parameters. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Reviewed-by:
Wei Hu <xavier.huwei@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Lijun Ou authored
In the latest IB core version, it has some known issues with memory registration using the local_dma_lkey. Thus RoCE don't expose support for it, and remove device->local_dma_lkey which is introduced to working systems. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Reviewed-by:
Wei Hu <xavier.huwei@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Lijun Ou authored
According to the Infiniband spec, NodeGUID uniquely identifies a node. This must be initialized to some unique value. This patch adds the support to the HNS RoCE driver to fetch the NodeGUID value from DT or ACPI and then use this value to initialize the node_guid parameter of IB device. This value shall be used by RDMA CM. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Reviewed-by:
Wei Hu <xavier.huwei@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-
Lijun Ou authored
This patch adds get_netdev() function to the IB device. This shall be used to fetch netdev corresponding to the port number. This function would be called by IB core(Generic CM Agent) for example, when the RDMA connection is being established. Signed-off-by:
Lijun Ou <oulijun@huawei.com> Reviewed-by:
Wei Hu <xavier.huwei@huawei.com> Signed-off-by:
Salil Mehta <salil.mehta@huawei.com> Signed-off-by:
Doug Ledford <dledford@redhat.com>
-