- 27 4月, 2023 6 次提交
-
-
由 Junxian Huang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6Z4E9 --------------------------------------------------------------- Currently, bond_grp is attached to only one hr_dev corresponding to a slave in RoCE bonding, which is called main_hr_dev in the driver. When a non-main_hr_dev try to obtain its bond_grp, the driver has to find the main_hr_dev, and then obtain the bond_grp, which leads to a complicated code. Applying this patch, bond_grp is removed from struct hns_roce_dev. hr_dev can obtain bond_grp by XArray, where die_info and bond_grp are stored according to bus number. With this change, hr_dev can get its bond_grp directly without depending on main_hr_dev, and the code logic can be simplified. Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com>
-
由 Junxian Huang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6Z4E9 --------------------------------------------------------------- This patch assigns initial value when variable is defined in HNS RoCE Bonding driver, instead of doing so on a new line. Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com>
-
由 Junxian Huang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6Z4E9 --------------------------------------------------------------- In hns_roce_slave_dec(), bond_state will be changed to HNS_ROCE_BOND_REGISTERING right before the current main_hr_dev is being removed from bond group. When the slave decrease operation is over, bond_state will be changed to HNS_ROCE_BOND_IS_BONDED in the end of this function. So the assignment to bond_state in the beginning of the function is useless and should be deleted. Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com>
-
由 Junxian Huang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6Z4E9 --------------------------------------------------------------- This patch provides the ability to map an integer ID to a bond group pointer by: 1. adding a new struct hns_roce_die_info to store the pointers and IDs of bond groups on a specific I/O die. 2. applying XArray to map the bus number to the die info struct. Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com>
-
由 Junxian Huang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6Z4E9 --------------------------------------------------------------- Currently, bond_work, the struct of delayed work for RoCE bonding, is attached to hns_roce_dev. During setting bond, hns_roce_dev will be uninited and the pending works will be canceled. This patch moves bond_work from hns_roce_dev to hns_roce_bond_group so that the pending works can be executed after setting bond rather than being cancelled. Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com>
-
由 Luoyouming 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6WAZI --------------------------------------------------------------- Support driver gets the num_xrcds and reserved_xrcds from firmware. Signed-off-by: NLuoyouming <luoyouming@huawei.com> Signed-off-by: NChengchang Tang <tangchengchang@huawei.com>
-
- 17 4月, 2023 1 次提交
-
-
由 Yixing Liu 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/I6VLLM --------------------------------------------------------------- Added SVE DWQE flag to control libhns SVE DWQE function. Signed-off-by: NYixing Liu <liuyixing1@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com>
-
- 13 4月, 2023 2 次提交
-
-
由 Yixing Liu 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6N1G4 --------------------------------------------------------------- This patch supports to configure congestion control algorithm based on QP granulariy. The configuration will be sent to driver from user space. And then driver configures the selected algorithm into QPC. The current XRC type QP cannot deliver the configured algorithm to kernel space, so the driver will set the default algorithm for XRC type QP. And the default algorithm type is controlled by the firmware. Signed-off-by: NYixing Liu <liuyixing1@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com>
-
由 Yixing Liu 提交于
driver inclusion category: cleanup bugzilla: https://gitee.com/openeuler/kernel/issues/I6N1G4 --------------------------------------------------------------- The currently used abbreviation of cong cannot clearly indicate the meaning, so the full name congest is used instead. Signed-off-by: NYixing Liu <liuyixing1@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com>
-
- 31 3月, 2023 3 次提交
-
-
由 Chengchang Tang 提交于
mainline inclusion from mainline-v6.2-rc1 commit 667d6164 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6RO6S CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=667d6164b84884c64de3fc18670cd5a98b0b10cf ---------------------------------------------------------------------- The error code is fixed to EIO when CMD fails to excute. This patch converts the error status reported by firmware to linux errno. Fixes: a04ff739 ("RDMA/hns: Add command queue support for hip08 RoCE driver") Link: https://lore.kernel.org/r/20221126102911.2921820-6-xuhaoyue1@hisilicon.comSigned-off-by: NChengchang Tang <tangchengchang@huawei.com> Signed-off-by: NHaoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by: NJason Gunthorpe <jgg@nvidia.com> Signed-off-by: NZhou Juan <nnuzj07170227@163.com>
-
由 Zhengchao Shao 提交于
mainline inclusion from mainline-v6.2-rc1 commit a115aa00 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6RP11 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a115aa00b18f7b8982b8f458149632caf64a862a ---------------------------------------------------------------------- When hns_roce_mr_enable() failed in hns_roce_alloc_mr(), mr_key is not released. Compiled test only. Fixes: 9b2cf76c ("RDMA/hns: Optimize PBL buffer allocation process") Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com> Link: https://lore.kernel.org/r/20221119070834.48502-1-shaozhengchao@huawei.comSigned-off-by: NLeon Romanovsky <leon@kernel.org> Signed-off-by: NZhou Juan <nnuzj07170227@163.com>
-
由 Yangyang Li 提交于
mainline inclusion from mainline-v6.1-rc4 commit 9e272ed6 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6ROBG CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9e272ed69ad6f6952fafd0599d6993575512408e ---------------------------------------------------------------------- When function reset and local invalidate are mixed, HNS RoCEE may hang. Before introducing the cause of the problem, two hardware internal concepts need to be introduced: 1. Execution queue: The queue of hardware execution instructions, function reset and local invalidate are queued for execution in this queue. 2.Local queue: A queue that stores local operation instructions. The instructions in the local queue will be sent to the execution queue for execution. The instructions in the local queue will not be removed until the execution is completed. The reason for the problem is as follows: 1. There is a function reset instruction in the execution queue, which is currently being executed. A necessary condition for the successful execution of function reset is: the hardware pipeline needs to empty the instructions that were not completed before; 2. A local invalidate instruction at the head of the local queue is sent to the execution queue. Now there are two instructions in the execution queue, the first is the function reset instruction, and the second is the local invalidate instruction, which will be executed in se quence; 3. The user has issued many local invalidate operations, causing the local queue to be filled up. 4. The user still has a new local operation command and is queuing to enter the local queue. But the local queue is full and cannot receive new instructions, this instruction is temporarily stored at the hardware pipeline. 5. The function reset has been waiting for the instruction before the hardware pipeline stage is drained. The hardware pipeline stage also caches a local invalidate instruction, so the function reset cannot be completed, and the instructions after it cannot be executed. These factors together cause the execution logic deadlock of the hardware, and the consequence is that RoCEE will not have any response. Considering that the local operation command may potentially cause RoCEE to hang, this feature is no longer supported. Fixes: e93df010 ("RDMA/hns: Support local invalidate for hip08 in kernel space") Signed-off-by: NYangyang Li <liyangyang20@huawei.com> Signed-off-by: NWenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: NHaoyue Xu <xuhaoyue1@hisilicon.com> Link: https://lore.kernel.org/r/20221024083814.1089722-2-xuhaoyue1@hisilicon.comSigned-off-by: NLeon Romanovsky <leon@kernel.org> Signed-off-by: NZhou Juan <nnuzj07170227@163.com>
-
- 28 3月, 2023 1 次提交
-
-
由 Yixing Liu 提交于
maillist inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6K9B6 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/commit/?id=faa63656fc36 --------------------------------------------------------------- The current resource query for vf caps is driven by the driver, which is unreasonable. This patch adds a new command HNS_ROCE_OPC_QUERY_VF_CAPS_NUM to support obtaining vf caps information from firmware. Signed-off-by: NYixing Liu <liuyixing1@huawei.com> Signed-off-by: NHaoyue Xu <xuhaoyue1@hisilicon.com> Link: https://lore.kernel.org/r/20230304091555.2241298-2-xuhaoyue1@hisilicon.comSigned-off-by: NLeon Romanovsky <leon@kernel.org> Signed-off-by: NJuan Zhou <zhoujuan51@h-partners.com>
-
- 13 3月, 2023 1 次提交
-
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6J5O7 --------------------------------------------------------------- hns roce support 4 congestion control algorithms. Each algorihm involves multiple parameters. This patch add port sysfs directory for each algorithm, which allows users to modify the parameters of these algorithms. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com>
-
- 09 3月, 2023 1 次提交
-
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6GSZL --------------------------------------------------------------- Add more dfx cnt to help diagnosis. And this stats could be got by sysfs or rdmatool. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com>
-
- 02 3月, 2023 1 次提交
-
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I6GSZL --------------------------------------------------------------- Support query hns HW stats to help debugging several issues. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com>
-
- 15 2月, 2023 3 次提交
-
-
由 Junxian Huang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6F1IQ --------------------------------------------------------------- In this patch, the following constraints are added: 1. RoCE Bonding cannot be set with a PF which enables VF; 2. A PF in RoCE Bonding cannot enable RoCE VF. Fixes: 6ba084e0 ("RDMA/hns: add constraints for bonding-unsupported situations") Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: bugfix bugzilla:https://gitee.com/openeuler/kernel/issues/I6F3ZA --------------------------------------------------------------------------- The queried AH attr is invalid. This patch fix it. This problem is found by rdma-core test test_mr_rereg_pd ERROR: test_mr_rereg_pd (tests.test_mr.MRTest) Test that cover rereg MR's PD with this flow: ---------------------------------------------------------------------- Traceback (most recent call last): File "./tests/test_mr.py", line 157, in test_mr_rereg_pd self.restate_qps() File "./tests/test_mr.py", line 113, in restate_qps self.server.qp.to_rts(self.server_qp_attr) File "qp.pyx", line 1137, in pyverbs.qp.QP.to_rts File "qp.pyx", line 1123, in pyverbs.qp.QP.to_rtr pyverbs.pyverbs_error.PyverbsRDMAError: Failed to modify QP state to RTR. Errno: 22, Invalid argument Fixes: 926a01dc ("RDMA/hns: Add QP operations support for hip08 SoC") Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Guofeng Yue 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6F3ZU --------------------------------------------------------------- In the reset scenario, if the kernel receives the reset signal, it needs to notify the user space to stop ring doorbell. Signed-off-by: NYixing Liu <liuyixing1@huawei.com> Signed-off-by: NGuofeng Yue <yueguofeng@hisilicon.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 13 2月, 2023 2 次提交
-
-
由 Chris Mi 提交于
stable inclusion from stable-v5.10.143 commit a00b1b10e0a60474c2a60ef84f4d4736f7051535 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0U6 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a00b1b10e0a60474c2a60ef84f4d4736f7051535 -------------------------------- [ Upstream commit 74b30b3a ] When accessing Ports Performance Counters Register (PPCNT), local port must be one if it is Function-Per-Port HCA that HCA_CAP.num_ports is 1. The offending patch can change the local port to other values when accessing PPCNT after enabling switchdev mode. The following syndrome will be printed: # cat /sys/class/infiniband/rdmap4s0f0/ports/2/counters/* # dmesg mlx5_core 0000:04:00.0: mlx5_cmd_check:756:(pid 12450): ACCESS_REG(0x805) op_mod(0x1) failed, status bad parameter(0x3), syndrome (0x1e5585) Fix it by setting local port to one for Function-Per-Port HCA. Fixes: 210b1f78 ("IB/mlx5: When not in dual port RoCE mode, use provided port as native") Reviewed-by: NMark Bloch <mbloch@nvidia.com> Signed-off-by: NChris Mi <cmi@nvidia.com> Link: https://lore.kernel.org/r/6c5086c295c76211169e58dbd610fb0402360bab.1661763459.git.leonro@nvidia.comSigned-off-by: NLeon Romanovsky <leon@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com> Reviewed-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Wenpeng Liang 提交于
stable inclusion from stable-v5.10.143 commit e198c0857032ceac643f2c58a114cf1ded672b28 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0U6 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e198c0857032ceac643f2c58a114cf1ded672b28 -------------------------------- [ Upstream commit 0c8b5d62 ] The value of qp->rq.wqe_shift of HIP08 is always determined by the number of sge. So delete the wrong branch. Fixes: cfc85f3e ("RDMA/hns: Add profile support for hip08 driver") Fixes: 926a01dc ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/20220829105021.1427804-3-liangwenpeng@huawei.comSigned-off-by: NWenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: NLeon Romanovsky <leon@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com> Reviewed-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 08 12月, 2022 4 次提交
-
-
由 Junxian Huang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I63IM5 --------------------------------------------------------------------------- This patch deletes some used variables, encapsulates repeated codes in a new function get_upper_dev_from_ndev and adjusts the structure of hns_roce_bond_event to make the logic clearer. Fixes: e62a2027 ("RDMA/hns: support RoCE bonding") Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Junxian Huang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I63IM5 --------------------------------------------------------------------------- Applying this patch, RoCE driver will not set bond when NIC sets bond in a mode not supported for RoCE bonding, with VF slaves or with slaves from different I/O die. Fixes: e62a2027 ("RDMA/hns: support RoCE bonding") Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Junxian Huang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I63IM5 --------------------------------------------------------------------------- In the existing hns RoCE code, ib_dev->ops.get_netdev is not set, which cause that only one slave will be assigned IP-based GID in RoCE bonding mode 1. This patch adds hns_roce_get_netdev() and set the function to ib_dev->ops.get_netdev so that IB-Core can assign GID to different net device according to the active slave in mode 1. Fixes: e62a2027 ("RDMA/hns: support RoCE bonding") Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Junxian Huang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I63IM5 --------------------------------------------------------------------------- When setting RoCE Bonding, a new hr_dev will be registered as "hns_bond_xx". In the process, the bonding thread will try to acquire rtnl_lock() while holding roce_bond_mutex. However, it's possible that another thread running bond_netdev_notify_work() grabs rtnl_lock() before the bonding thread, and call the bonding notifier function, in which the thread will try to acquire roce_bond_mutex, finally leading to a dead lock. As the event informer notifier_call_chain() will not call the next notifier function until the current one returns, there is no need to use a mutex in the bonding notifier function. Thus, remove roce_bond_mutex in hns_roce_bond_event() and the dead lock can be avoided. Fixes: e62a2027 ("RDMA/hns: support RoCE bonding") Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 30 11月, 2022 11 次提交
-
-
由 Chengchang Tang 提交于
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- read_poll_timeout() in MBX may cause sleep, especially at reset, the probability becomes higher. In other words, it is not safe to use MBX in an atomic context. In order to ensure the atomicity of QPC setup, DCA will use locks to protect the QPC setup operation in DCA ATTACH_MEM phase(i.e. post_send/post_recv). This results in the above-mentioned problem at reset. Replace read_poll_timeout() with read_poll_timeout_atomic() to avoid MBX operation sleep in an atomic context(). Fixes: 306b8c76 ("RDMA/hns: Do not destroy QP resources in the hw resetting phase") Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- Use the shared memory to store the DCA status by getting the max qp num from uctx alloc param. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- This patch synchonize DCA code from CI and is based on RFC v2 from the community including DCA kernel suuport and debugfs support. Add a group of debugfs files for DCA memory pool statistics. The debugfs entries for DCA memory statistics include: hns_roce/<ibdev_name>/dca/qp : show all DCA QPs for each device. hns_roce/<ibdev_name>/dca/pool : show all DCA mem for each device. hns_roce/<ibdev_name>/<pid>/qp : show all active DCA QPs for one process. hns_roce/<ibdev_name>/<pid>/mstats : show DCA mem info for one process. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- This patch add DCA support for kernel space. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- If a uQP works in DCA mode, the userspace driver need to get the buffer's address in DCA memory pool by calling the 'HNS_IB_METHOD_DCA_MEM_QUERY' method after the QP was attached by calling the 'HNS_IB_METHOD_DCA_MEM_ATTACH' method. This method will return the DCA mem object's key and the offset to let the userspace driver get the WQE's virtual address in DCA memory pool. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- If a uQP works in DCA mode, the userspace driver needs to drop the WQE buffer by calling the 'HNS_IB_METHOD_DCA_MEM_DETACH' method when the QP's CI is equal to PI, that means, the hns ROCEE will not access the WQE's buffer at this time, and the userspace driver can free this WQE's buffer. This method will start an worker queue to recycle the WQE buffer in kernel space, if the WQE buffer is indeed not being accessed by hns ROCEE, the worker will change the pages' state as free in DCA memory pool. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- Add a new command to update the configuration of WQE buffer addressing to QPC in DCA mode. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- If a uQP works as DCA mode, the userspace driver need config the WQE buffer by calling the 'HNS_IB_METHOD_DCA_MEM_ATTACH' method before filling the WQE. This method will allocate a group of pages from DCA memory pool and write the configuration of addressing to QPC. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- If the userspace driver assign a NULL to the field of 'buf_addr' in 'struct hns_roce_ib_create_qp' when creating QP, this means the kernel driver need setup the QP as DCA mode. So add a QP capability bit in response to indicate the userspace driver that the DCA mode has been enabled. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- If no QP is using a DCA mem object, the userspace driver can destroy it. So add a new method 'HNS_IB_METHOD_DCA_MEM_SHRINK' to allow the userspace dirver to remove an object from DCA memory pool. If a DCA mem object has been shrunk, the userspace driver can destroy it by 'HNS_IB_METHOD_DCA_MEM_DEREG' method and free the buffer which is allocated in userspace. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Chengchang Tang 提交于
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63KVU ---------------------------------------------------------- The hip09 introduces the DCA(Dynamic context attachment) feature which supports many RC QPs to share the WQE buffer in a memory pool, this will reduce the memory consumption when there are too many QPs are inactive. If a QP enables DCA feature, the WQE's buffer will not be allocated when creating. But when the users start to post WRs, the hns driver will allocate a buffer from the memory pool and then fill WQEs which tagged with this QP's number. The hns ROCEE will stop accessing the WQE buffer when the user polled all of the CQEs for a DCA QP, then the driver will recycle this WQE's buffer to the memory pool. This patch adds a group of methods to support the user space register buffers to a memory pool which belongs to the user context. The hns kernel driver will update the pages state in this pool when the user calling the post/poll methods and the user driver can get the QP's WQE buffer address by the key and offset which queried from kernel. Signed-off-by: NChengchang Tang <tangchengchang@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 21 11月, 2022 3 次提交
-
-
由 Wenpeng Liang 提交于
driver inclusion category: Bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I61RNU ---------------------------------------------------------- Use urt to run the open xrc qp business, and the following error occurs: Create qp failed. because the driver does not have an ex_cmd flag, related ioctl() or syscall() will fail to execute. so add open xrc qp cmd flag. Fixes: ae394640 ("RDMA/hns: Add support for XRC on HIP09") Signed-off-by: NWenpeng Liang <liangwenpeng@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Yixing Liu 提交于
driver inclusion category: Bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I61F1Q -------------------------------------------------------------- Running roce v1 business on fpga, the following error occurs: hns3 0000:35:00.0 hns_0: local work queue 0x2 catast error, sub_event type is: 4 This is because the sl transmitted by the roce v1 service driver after set dscp is incorrect, which makes the sl of db inconsistent with the sl of qpc, resulting in an sl error on the hardware. Fixes: 11ef2ec6 ("RDMA/hns: Support DSCP of userspace") Signed-off-by: NYixing Liu <liuyixing1@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Yixing Liu 提交于
driver inclusion category: Bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I61FED ----------------------------------------------------------- When it is roce v1, if the traffic_class value exceeds 63, the following error will appear: modify qp to 2 state failed(22) Failed to create AH This is because the driver intercepts the over-spec value in set dscp, and there is no need to obtain dscp for roce v1, so the driver does not intercept v1. Fixes: 11ef2ec6 ("RDMA/hns: Support DSCP of userspace") Signed-off-by: NYixing Liu <liuyixing1@huawei.com> Reviewed-by: NYangyang Li <liyangyang20@huawei.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 18 11月, 2022 1 次提交
-
-
由 Maor Gottlieb 提交于
stable inclusion from stable-v5.10.137 commit 53da1f0fa0e2e197df1a95729a15b27f7b2b911c category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=53da1f0fa0e2e197df1a95729a15b27f7b2b911c -------------------------------- [ Upstream commit c9776457 ] Add missing check for return value when calling to mlx5_ib_ft_type_to_namespace, even though it can't really fail in this specific call. Fixes: 52438be4 ("RDMA/mlx5: Allow inserting a steering rule to the FDB") Link: https://lore.kernel.org/r/7b9ceda217d9368a51dc47a46b769bad4af9ac92.1659256069.git.leonro@nvidia.comReviewed-by: NItay Aveksis <itayav@nvidia.com> Signed-off-by: NMaor Gottlieb <maorg@nvidia.com> Signed-off-by: NLeon Romanovsky <leonro@nvidia.com> Signed-off-by: NJason Gunthorpe <jgg@nvidia.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com>
-