- 27 Sep, 2022 17 commits
-
-
Yangyang Li authored
The max_srq_desc_sz is defined in the code, but never used, so delete this redundant variable. Link: https://lore.kernel.org/r/20220922123315.3732205-10-xuhaoyue1@hisilicon.comSigned-off-by:
Yangyang Li <liyangyang20@huawei.com> Signed-off-by:
Haoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Yangyang Li authored
The num_mtt_segs and max_extend_sg used to be used for HIP06, remove them since the HIP06 code has been removed. Link: https://lore.kernel.org/r/20220922123315.3732205-9-xuhaoyue1@hisilicon.comSigned-off-by:
Yangyang Li <liyangyang20@huawei.com> Signed-off-by:
Haoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Chengchang Tang authored
This parameter has never been used. Remove it to simplify the function. Link: https://lore.kernel.org/r/20220922123315.3732205-8-xuhaoyue1@hisilicon.comSigned-off-by:
Chengchang Tang <tangchengchang@huawei.com> Signed-off-by:
Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by:
Haoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Yunsheng Lin authored
As hns_roce_init_hem_table() is always called with use_lowmem being '1', and table->lowmem is set according to that argument, so remove table->lowmem too. Also, as the table->lowmem is used to indicate a dma buffer is allocated with GFP_HIGHUSER or GFP_KERNEL, and calling dma_alloc_coherent() with GFP_KERNEL seems like a common pattern. Link: https://lore.kernel.org/r/20220922123315.3732205-7-xuhaoyue1@hisilicon.comSigned-off-by:
Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by:
Haoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Yunsheng Lin authored
The 'bt_level' parameter is not used in hem_list_alloc_item(), so remove it. Link: https://lore.kernel.org/r/20220922123315.3732205-6-xuhaoyue1@hisilicon.comSigned-off-by:
Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by:
Haoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Yixing Liu authored
The attr_mask variable is not used in the function, so remove it. Link: https://lore.kernel.org/r/20220922123315.3732205-5-xuhaoyue1@hisilicon.comSigned-off-by:
Yixing Liu <liuyixing1@huawei.com> Signed-off-by:
Haoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Guofeng Yue authored
Delete () when using & to obtain an address. Link: https://lore.kernel.org/r/20220922123315.3732205-4-xuhaoyue1@hisilicon.comSigned-off-by:
Guofeng Yue <yueguofeng@hisilicon.com> Signed-off-by:
Haoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Guofeng Yue authored
Braces {} are not necessary for single statement blocks. Link: https://lore.kernel.org/r/20220922123315.3732205-3-xuhaoyue1@hisilicon.comSigned-off-by:
Guofeng Yue <yueguofeng@hisilicon.com> Signed-off-by:
Haoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Guofeng Yue authored
Fixed a spelling error for Asynchronous. Link: https://lore.kernel.org/r/20220922123315.3732205-2-xuhaoyue1@hisilicon.comSigned-off-by:
Guofeng Yue <yueguofeng@hisilicon.com> Signed-off-by:
Haoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Xiu Jianfeng authored
Add missing __init/__exit annotations to module init/exit funcs. Fixes: 0194621b ("IB/rdmavt: Create module framework and handle driver registration") Link: https://lore.kernel.org/r/20220924091457.52446-1-xiujianfeng@huawei.comSigned-off-by:
Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Bob Pearson authored
In include/uapi/rdma/rdma_user_rxe.h there are redundant copies of num_sge in the rxe_send_wr, rxe_recv_wqe, and rxe_dma_info. Only the ones in rxe_dma_info are actually used by the rxe kernel driver. The userspace would set these values, but the kernel never read them. This change has no affect on the current ABI and new or old versions of rdma-core operate correctly with new or old versions of the kernel rxe driver. Link: https://lore.kernel.org/r/20220913222716.18335-1-rpearsonhpe@gmail.comSigned-off-by:
Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Jason Gunthorpe authored
For mlx5 if ATS is enabled in the PCI config then the device will use ATS requests for only certain DMA operations. This has to be opted in by the SW side based on the mkey or umem settings. ATS slows down the PCI performance, so it should only be set in cases when it is needed. All of these cases revolve around optimizing PCI P2P transfers and avoiding bad cases where the bus just doesn't work. Link: https://lore.kernel.org/r/4-v1-bd147097458e+ede-umem_dmabuf_jgg@nvidia.comSigned-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Jason Gunthorpe authored
This is modeled after the similar EFA enablement in commit 66f4817b ("RDMA/efa: Add support for dmabuf memory regions"). Like EFA there is no support for revocation so we simply call the ib_umem_dmabuf_get_pinned() to obtain a umem instead of the normal ib_umem_get(). Everything else stays the same. Link: https://lore.kernel.org/r/3-v1-bd147097458e+ede-umem_dmabuf_jgg@nvidia.comSigned-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Jason Gunthorpe authored
This uses the same passing protocol as UVERBS_ATTR_FD (eg len = 0 data_s64 = fd), except that the FD is not required to be a uverbs object and the core code does not covert the FD to an object handle automatically. Access to the int fd is provided by uverbs_get_raw_fd(). Link: https://lore.kernel.org/r/2-v1-bd147097458e+ede-umem_dmabuf_jgg@nvidia.comSigned-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Jason Gunthorpe authored
Allows telling a mkey to use PCI ATS for DMA that flows through it. Link: https://lore.kernel.org/r/1-v1-bd147097458e+ede-umem_dmabuf_jgg@nvidia.comSigned-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Bob Pearson authored
Currently in resize_finish() in rxe_queue.c there is a loop which copies the entries in the original queue into a newly allocated queue. The termination logic for this loop is incorrect. The call to queue_next_index() updates cons but has no effect on whether the queue is empty. So if the queue starts out empty nothing is copied but if it is not then the loop will run forever. This patch changes the loop to compare the value of cons to the original producer index. Fixes: ae6e843f ("RDMA/rxe: Add memory barriers to kernel queues") Link: https://lore.kernel.org/r/20220825221446.6512-1-rpearsonhpe@gmail.comSigned-off-by:
Bob Pearson <rpearsonhpe@gmail.com> Reviewed-by:
Li Zhijian <lizhijian@fujitsu.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
Bob Pearson authored
Move setting of pd in mr objects ahead of any possible errors so that it will always be set in rxe_mr_cleanup() to avoid seg faults when rxe_put(mr_pd(mr)) is called. Fixes: cf403679 ("RDMA/rxe: Move mr cleanup code to rxe_mr_cleanup()") Link: https://lore.kernel.org/r/20220805183153.32007-2-rpearsonhpe@gmail.comSigned-off-by:
Bob Pearson <rpearsonhpe@gmail.com> Reviewed-by:
Li Zhijian <lizhijian@fujitsu.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
- 26 Sep, 2022 1 commit
-
-
Li Zhijian authored
Most code in send_ack() and send_atomic_ack() are duplicate, move them to a new helper send_common_ack(). In newer IBA spec, some opcodes require acknowledge with a zero-length read response, with this new helper, we can easily implement it later. Link: https://lore.kernel.org/r/1659335010-2-1-git-send-email-lizhijian@fujitsu.comSigned-off-by:
Li Zhijian <lizhijian@fujitsu.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com>
-
- 22 Sep, 2022 8 commits
-
-
Dan Carpenter authored
"&srq->pd->usecnt" and "&pd->usecnt" are different names for the same reference count. Use "&pd->usecnt" consistently for both the increment and decrement. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YyxFe3Pm0uzRuBkQ@kiliSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Mikhael Goikhman authored
Currently ib_srp module does not support devices with more than 256 ports. Switch from u8 to u32 to fix the problem. Fixes: 1fb7f897 ("RDMA: Support more than 255 rdma ports") Reviewed-by:
Shay Drory <shayd@nvidia.com> Signed-off-by:
Mikhael Goikhman <migo@nvidia.com> Link: https://lore.kernel.org/r/7d80d8844f1abb3a54170b7259f0a02be38080a6.1663747327.git.leonro@nvidia.comReviewed-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Daisuke Matsuda authored
rxe_mr and ib_mr have interchangeable members. Remove device specific members and use ones in the generic struct. Both 'iova' and 'length' are filled in ib_uverbs or ib_core layer after MR registration. Signed-off-by:
Daisuke Matsuda <matsuda-daisuke@fujitsu.com> Link: https://lore.kernel.org/r/20220921080844.1616883-2-matsuda-daisuke@fujitsu.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Daisuke Matsuda authored
Set 'iova' and 'length' on ib_mr in ib_uverbs and ib_core layers to let all drivers have the members filled. Also, this commit removes redundancy in the respective drivers. Previously, commit 04c0a5fc ("IB/uverbs: Set IOVA on IB MR in uverbs layer") changed to set 'iova', but seems to have missed 'length' and the ib_core layer at that time. Fixes: 04c0a5fc ("IB/uverbs: Set IOVA on IB MR in uverbs layer") Signed-off-by:
Daisuke Matsuda <matsuda-daisuke@fujitsu.com> Link: https://lore.kernel.org/r/20220921080844.1616883-1-matsuda-daisuke@fujitsu.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Mark Zhang authored
In inter-subnet cases, when inbound/outbound PRs are available, outbound_PR.dlid is used as the requestor's datapath DLID and inbound_PR.dlid is used as the responder's DLID. The inbound_PR.dlid is passed to responder side with the "ConnectReq.Primary_Local_Port_LID" field. With this solution the PERMISSIVE_LID is no longer used in Primary Local LID field. Signed-off-by:
Mark Zhang <markzhang@nvidia.com> Reviewed-by:
Mark Bloch <mbloch@nvidia.com> Link: https://lore.kernel.org/r/b3f6cac685bce9dde37c610be82e2c19d9e51d9e.1662631201.git.leonro@nvidia.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Mark Zhang authored
The responder should always use WC's SLID as the dlid, to follow the IB SPEC section "13.5.4.2 COMMON RESPONSE ACTIONS": A responder always takes the following actions in constructing a response packet: - The SLID of the received packet is used as the DLID in the response packet. Fixes: ac3a949f ("IB/CM: Set appropriate slid and dlid when handling CM request") Signed-off-by:
Mark Zhang <markzhang@nvidia.com> Reviewed-by:
Mark Bloch <mbloch@nvidia.com> Link: https://lore.kernel.org/r/cd17c240231e059d2fc07c17dfe555d548b917eb.1662631201.git.leonro@nvidia.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Mark Zhang authored
Support receiving inbound and outbound IB path records (along with GMP PathRecord) from user-space service through the RDMA netlink channel. The LIDs in these 3 PRs can be used in this way: 1. GMP PR: used as the standard local/remote LIDs; 2. DLID of outbound PR: Used as the "dlid" field for outbound traffic; 3. DLID of inbound PR: Used as the "dlid" field for outbound traffic in responder side. This is aimed to support adaptive routing. With current IB routing solution when a packet goes out it's assigned with a fixed DLID per target, meaning a fixed router will be used. The LIDs in inbound/outbound path records can be used to identify group of routers that allow communication with another subnet's entity. With them packets from an inter-subnet connection may travel through any router in the set to reach the target. As confirmed with Jason, when sending a netlink request, kernel uses LS_RESOLVE_PATH_USE_ALL so that the service knows kernel supports multiple PRs. Signed-off-by:
Mark Zhang <markzhang@nvidia.com> Reviewed-by:
Mark Bloch <mbloch@nvidia.com> Link: https://lore.kernel.org/r/2fa2b6c93c4c16c8915bac3cfc4f27be1d60519d.1662631201.git.leonro@nvidia.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Mark Zhang authored
This fields means the total number of primary and alternative paths, i.e.,: 0 - No primary nor alternate path is available; 1 - Only primary path is available; 2 - Both primary and alternate path are available. Rename it to avoid confusion as with follow patches primary path will support multiple path records. Signed-off-by:
Mark Zhang <markzhang@nvidia.com> Reviewed-by:
Mark Bloch <mbloch@nvidia.com> Link: https://lore.kernel.org/r/cbe424de63a56207870d70c5edce7c68e45f429e.1662631201.git.leonro@nvidia.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 21 Sep, 2022 1 commit
-
-
Cheng Xu authored
Hardware now support jumbo frame for RDMA. So we introduce a new CMDQ message to support mtu change notification. Signed-off-by:
Cheng Xu <chengyou@linux.alibaba.com> Link: https://lore.kernel.org/r/20220909093822.33868-5-chengyou@linux.alibaba.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 20 Sep, 2022 12 commits
-
-
Bernard Metzler authored
Delay QP destroy completion until all siw references to QP are dropped. The calling RDMA core will free QP structure after successful return from siw_qp_destroy() call, so siw must not hold any remaining reference to the QP upon return. A use-after-free was encountered in xfstest generic/460, while testing NFSoRDMA. Here, after a TCP connection drop by peer, the triggered siw_cm_work_handler got delayed until after QP destroy call, referencing a QP which has already freed. Fixes: 303ae1cd ("rdma/siw: application interface") Reported-by:
Olga Kornievskaia <kolga@netapp.com> Signed-off-by:
Bernard Metzler <bmt@zurich.ibm.com> Link: https://lore.kernel.org/r/20220920082503.224189-1-bmt@zurich.ibm.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Bernard Metzler authored
For header and trailer/padding processing, siw did not consume new skb data until minimum amount present to fill current header or trailer structure, including potential payload padding. Not consuming any data during upcall may cause a receive stall, since tcp_read_sock() is not upcalling again if no new data arrive. A NFSoRDMA client got stuck at RDMA Write reception of unaligned payload, if the current skb did contain only the expected 3 padding bytes, but not the 4 bytes CRC trailer. Expecting 4 more bytes already arrived in another skb, and not consuming those 3 bytes in the current upcall left the Write incomplete, waiting for the CRC forever. Fixes: 8b6a361b ("rdma/siw: receive path") Reported-by:
Olga Kornievskaia <kolga@netapp.com> Tested-by:
Olga Kornievskaia <kolga@netapp.com> Signed-off-by:
Bernard Metzler <bmt@zurich.ibm.com> Link: https://lore.kernel.org/r/20220920081202.223629-1-bmt@zurich.ibm.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Gaosheng Cui authored
rc_only_opcode and uc_only_opcode have been removed since commit b374e060 ("IB/hfi1: Consolidate pio control masks into single definition"), so remove them. Signed-off-by:
Gaosheng Cui <cuigaosheng1@huawei.com> Link: https://lore.kernel.org/r/20220911092325.3216513-1-cuigaosheng1@huawei.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Hangyu Hua authored
In preparation for FORTIFY_SOURCE performing run-time destination buffer bounds checking for memcpy(), specify the destination output buffer explicitly, instead of asking memcpy() to write past the end of what looked like a fixed-size object. Notice that srp_rsp[] is a pointer to a structure that contains flexible-array member data[]: struct srp_rsp { ... __be32 sense_data_len; __be32 resp_data_len; u8 data[]; }; link: https://github.com/KSPP/linux/issues/201Signed-off-by:
Hangyu Hua <hbh25y@gmail.com> Link: https://lore.kernel.org/r/20220909022943.8896-1-hbh25y@gmail.comReviewed-by:
Bart Van Assche <bvanassche@acm.org> Reviewed-by:
Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Cheng Xu authored
Some opcodes are used in hardware internally, and driver does not care about them. So, we change them to reserved opcodes in driver. Signed-off-by:
Cheng Xu <chengyou@linux.alibaba.com> Link: https://lore.kernel.org/r/20220909093822.33868-4-chengyou@linux.alibaba.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Cheng Xu authored
Many of erdma's includes are redundant, because they are already included indirectly by kernel headers or custom headers. So we remove all the unnecessary direct-includes. Besides, add linux/pci.h to erdma.h because it's also used in the file. Signed-off-by:
Cheng Xu <chengyou@linux.alibaba.com> Link: https://lore.kernel.org/r/20220909093822.33868-3-chengyou@linux.alibaba.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Cheng Xu authored
erdma_post_cmd_wait does not use the 'u64 *req' input parameter directly. So it is better to define it to 'void *req', and by this we can eliminate the casting when calling erdma_post_cmd_wait. Signed-off-by:
Cheng Xu <chengyou@linux.alibaba.com> Link: https://lore.kernel.org/r/20220909093822.33868-2-chengyou@linux.alibaba.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Bart Van Assche authored
Fix the code for converting a SCSI command pointer into an SRP request pointer. Cc: Xiao Yang <yangx.jy@fujitsu.com> Fixes: ad215aae ("RDMA/srp: Make struct scsi_cmnd and struct srp_request adjacent") Signed-off-by:
Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20220908233139.3042628-1-bvanassche@acm.orgSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
wangjianli authored
Delete the redundant word 'to'. Signed-off-by:
wangjianli <wangjianli@cdjrlc.com> Link: https://lore.kernel.org/r/20220908132036.42355-1-wangjianli@cdjrlc.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
wangjianli authored
Delete the redundant word 'to'. Signed-off-by:
wangjianli <wangjianli@cdjrlc.com> Link: https://lore.kernel.org/r/20220908131824.41106-1-wangjianli@cdjrlc.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Shiraz Saleem authored
Currently ib_copy_from_udata and ib_copy_to_udata could underfill the request and response buffer if the user-space passes an undersized value for udata->inlen or udata->outlen respectively [1] This could lead to undesirable behavior. Zero initing the buffer only goes as far as preventing using the buffer uninitialized. Validate udata->inlen and udata->outlen passed from user-space to ensure they are at least the required minimum size. [1] https://lore.kernel.org/linux-rdma/MWHPR11MB0029F37D40D9D4A993F8F549E9D79@MWHPR11MB0029.namprd11.prod.outlook.com/ Fixes: b48c24c2 ("RDMA/irdma: Implement device supported verb APIs") Reported-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Shiraz Saleem <shiraz.saleem@intel.com> Link: https://lore.kernel.org/r/20220907191324.1173-3-shiraz.saleem@intel.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Sindhu-Devale authored
A number of asynchronous event (AE) ids were not aligned to the correct flush_code and event_type. Fix these up so that the correct IBV error and event codes are returned to application. Also, add handling for new AE ids like IRDMA_AE_INVALID_REQUEST to return the correct WC error code. Fixes: 44d9e529 ("RDMA/irdma: Implement device initialization definitions") Signed-off-by:
Sindhu-Devale <sindhu.devale@intel.com> Signed-off-by:
Shiraz Saleem <shiraz.saleem@intel.com> Link: https://lore.kernel.org/r/20220907191324.1173-2-shiraz.saleem@intel.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 08 Sep, 2022 1 commit
-
-
Daisuke Matsuda authored
The same value is assigned to 'mr->ibmr.length'. Remove redundant one. Signed-off-by:
Daisuke Matsuda <matsuda-daisuke@fujitsu.com> Link: https://lore.kernel.org/r/20220908083058.3993700-1-matsuda-daisuke@fujitsu.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-