- 20 Sep, 2022 5 commits
-
-
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 3 commits
-
-
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>
-
Li Zhijian authored
They could be triggered by user APIs with invalid parameters. Signed-off-by:
Li Zhijian <lizhijian@fujitsu.com> Link: https://lore.kernel.org/r/1662518901-2-2-git-send-email-lizhijian@fujitsu.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Li Zhijian authored
struct ib_qp_cap { u32 max_send_wr; u32 max_recv_wr; u32 max_send_sge; u32 max_recv_sge; u32 max_inline_data; ... To avoid getting a negative value from dmesg: [410580.579965] rdma_rxe: invalid send sge = 65535 > 32 [410580.583818] rdma_rxe: invalid send wr = -1 > 1048576 [410582.771323] rdma_rxe: invalid recv sge = 65535 > 32 [410582.775310] rdma_rxe: invalid recv wr = -1 > 1048576 Signed-off-by:
Li Zhijian <lizhijian@fujitsu.com> Link: https://lore.kernel.org/r/1662518901-2-1-git-send-email-lizhijian@fujitsu.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 06 Sep, 2022 3 commits
-
-
Guoqing Jiang authored
Let's call try_cmpxchg directly for the same purpose. Signed-off-by:
Guoqing Jiang <guoqing.jiang@linux.dev> Link: https://lore.kernel.org/r/20220903040252.29397-1-guoqing.jiang@linux.devSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Guoqing Jiang authored
No need to iterate all paths after find one connected path. Signed-off-by:
Guoqing Jiang <guoqing.jiang@linux.dev> Link: https://lore.kernel.org/r/20220902101922.26273-3-guoqing.jiang@linux.devSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Guoqing Jiang authored
The maximum queue_depth should be 65535 per check_module_params, also update other relevant comments. Signed-off-by:
Guoqing Jiang <guoqing.jiang@linux.dev> Link: https://lore.kernel.org/r/20220902101922.26273-2-guoqing.jiang@linux.devSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 05 Sep, 2022 4 commits
-
-
ye xingchen authored
Return the value set_link_state() directly instead of storing it in another redundant variable. Reported-by:
Zeal Robot <zealci@zte.com.cn> Signed-off-by:
ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/20220901074209.313004-1-ye.xingchen@zte.com.cnSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Leon Romanovsky authored
Perform merge of Mellanox shared branch. * mlx5-next: RDMA/mlx5: Move function mlx5_core_query_ib_ppcnt() to mlx5_ib
-
Chris Mi authored
This patch doesn't change any functionality, but move one function to mlx5_ib because it is not used by mlx5_core. The actual fix is in the next patch. Reviewed-by:
Roi Dayan <roid@nvidia.com> Signed-off-by:
Chris Mi <cmi@nvidia.com> Link: https://lore.kernel.org/r/fd47b9138412bd94ed30f838026cbb4cf3878150.1661763871.git.leonro@nvidia.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
Bodong Wang authored
Query eswitch functions returns information of the external host PF(if it exists). It can be used to check if DEVX is running on ECPF. Reviewed-by:
Erez Shitrit <erezsh@nvidia.com> Reviewed-by:
Saeed Mahameed <saeedm@nvidia.com> Signed-off-by:
Bodong Wang <bodong@mellanox.com> Link: https://lore.kernel.org/r/4265925178ab3224dc1d3e3784bb312d808edca5.1661763785.git.leonro@nvidia.comSigned-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 01 Sep, 2022 1 commit
-
-
Tom Talpey authored
The SoftiWARP Kconfig is missing "select" for CRYPTO and CRYPTO_CRC32C. In addition, it improperly "depends on" LIBCRC32C, this should be a "select", similar to net/sctp and others. As a dependency, SIW fails to appear in generic configurations. Link: https://lore.kernel.org/r/d366bf02-3271-754f-fc68-1a84016d0e19@talpey.comSigned-off-by:
Tom Talpey <tom@talpey.com> Acked-by:
Bernard Metzler <bmt@zurich.ibm.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 31 Aug, 2022 4 commits
-
-
Daisuke Matsuda authored
An incoming Read request causes multiple Read responses. If a user MR to copy data from is unavailable or responder cannot send a reply, then the error messages can be printed for each response attempt, resulting in message overflow. Link: https://lore.kernel.org/r/20220829071218.1639065-1-matsuda-daisuke@fujitsu.comSigned-off-by:
Daisuke Matsuda <matsuda-daisuke@fujitsu.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Zhu Yanjun authored
The member variable obj in struct rxe_task is not needed. So remove it to save memory. Link: https://lore.kernel.org/r/20220822011615.805603-4-yanjun.zhu@linux.devSigned-off-by:
Zhu Yanjun <yanjun.zhu@linux.dev> Reviewed-by:
Li Zhijian <lizhijian@fujitsu.com> Reviewed-by:
Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Zhu Yanjun authored
When sock_create_kern in the function rxe_qp_init_req fails, qp->sk is set to NULL. Then the function rxe_create_qp will call rxe_qp_do_cleanup to handle allocated resource. Before handling qp->sk, this variable should be checked. Fixes: 8700e3e7 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20220822011615.805603-3-yanjun.zhu@linux.devSigned-off-by:
Zhu Yanjun <yanjun.zhu@linux.dev> Reviewed-by:
Li Zhijian <lizhijian@fujitsu.com> Reviewed-by:
Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Zhu Yanjun authored
When rxe_queue_init in the function rxe_qp_init_req fails, both qp->req.task.func and qp->req.task.arg are not initialized. Because of creation of qp fails, the function rxe_create_qp will call rxe_qp_do_cleanup to handle allocated resource. Before calling __rxe_do_task, both qp->req.task.func and qp->req.task.arg should be checked. Fixes: 8700e3e7 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20220822011615.805603-2-yanjun.zhu@linux.dev Reported-by: syzbot+ab99dc4c6e961eed8b8e@syzkaller.appspotmail.com Signed-off-by:
Zhu Yanjun <yanjun.zhu@linux.dev> Reviewed-by:
Li Zhijian <lizhijian@fujitsu.com> Reviewed-by:
Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 30 Aug, 2022 5 commits
-
-
Wenpeng Liang authored
The value of doorbell_qpn is always equal to qpn on current hardware versions. So remove it. Link: https://lore.kernel.org/r/20220829105021.1427804-5-liangwenpeng@huawei.comSigned-off-by:
Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Mark Zhang authored
Move the device and service_id match code at the top of cm_insert_listen() and cm_find_listen() into the final else branch. Link: https://lore.kernel.org/r/20220819090859.957943-4-markzhang@nvidia.comSigned-off-by:
Mark Zhang <markzhang@nvidia.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Mark Zhang authored
The service_mask is always ~cpu_to_be64(0), so the result is always a NOP when it is &'d with a service_id. Remove it for simplicity. Link: https://lore.kernel.org/r/20220819090859.957943-3-markzhang@nvidia.comSigned-off-by:
Mark Zhang <markzhang@nvidia.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Mark Zhang authored
Remove the service_mask parameter of ib_cm_listen(), as all callers use 0. Link: https://lore.kernel.org/r/20220819090859.957943-2-markzhang@nvidia.comSigned-off-by:
Mark Zhang <markzhang@nvidia.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Guoqing Jiang authored
Since process_{read,write} already prints direction info if ctx->ops.rdma_ev fails, no need to pass 'dir'. Link: https://lore.kernel.org/r/20220826081117.21687-1-guoqing.jiang@linux.devSigned-off-by:
Guoqing Jiang <guoqing.jiang@linux.dev> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 29 Aug, 2022 1 commit
-
-
Daisuke Matsuda authored
Commit 1e755506 ("Revert "RDMA/rxe: Create duplicate mapping tables for FMRs"") brought back the member 'va' to struct rxe_mr. However, it is actually used by nobody and thus can be removed. Fixes: 1e755506 ("Revert "RDMA/rxe: Create duplicate mapping tables for FMRs"") Link: https://lore.kernel.org/r/20220829012335.1212697-1-matsuda-daisuke@fujitsu.comSigned-off-by:
Daisuke Matsuda <matsuda-daisuke@fujitsu.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 28 Aug, 2022 5 commits
-
-
Yunsheng Lin authored
'device' argument is never used since rdma_build_skb() is introduced, so remove it. Link: https://lore.kernel.org/r/20220826143215.18111-1-linyunsheng@huawei.comSigned-off-by:
Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Bart Van Assche authored
Simplify the SRP driver by using the attribute group mechanism instead of calling device_create_file() explicitly. Link: https://lore.kernel.org/r/20220825213900.864587-5-bvanassche@acm.orgSigned-off-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Bart Van Assche authored
Instead of ignoring dev_set_name() failure, handle dev_set_name() failure. Convert a device_register() call into device_initialize() and device_add() calls. Link: https://lore.kernel.org/r/20220825213900.864587-4-bvanassche@acm.orgReported-by:
Bo Liu <liubo03@inspur.com> Signed-off-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Bart Van Assche authored
Move the kfree(host) calls into srp_release_dev(). Convert a device_unregister() call into a device_del() and a device_put() call. Remove the host->released completion object. This patch prepares for handling dev_set_name() failure in srp_add_port(). Link: https://lore.kernel.org/r/20220825213900.864587-3-bvanassche@acm.orgSigned-off-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Bart Van Assche authored
device_register() always calls device_initialize() so calling device_del() is safe even if device_register() fails. Implement the following advice from the comment block above device_register(): "NOTE: _Never_ directly free @dev after calling this function, even if it returned an error! Always use put_device() to give up the reference initialized in this function instead." Keep the kfree() call in the error path since srp_release_dev() does not free the host. Link: https://lore.kernel.org/r/20220825213900.864587-2-bvanassche@acm.orgSigned-off-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 24 Aug, 2022 1 commit
-
-
Wenpeng Liang authored
The MR raw restrack attributes come from the queue context maintained by the ROCEE. For example: $ rdma res show mr dev hns_0 mrn 6 -dd -jp -r [ { "ifindex": 4, "ifname": "hns_0", "data": [ 1,0,0,0,2,0,0,0,0,3,0,0,0,0,2,0,0,0,0,0,32,0,0,0,2,0,0,0, 2,0,0,0,0,0,0,0 ] } ] Link: https://lore.kernel.org/r/20220822104455.2311053-8-liangwenpeng@huawei.comSigned-off-by:
Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 23 Aug, 2022 7 commits
-
-
Wenpeng Liang authored
The MR restrack attributes come from the queue information maintained by the driver. For example: $ rdma res show mr dev hns_0 mrn 6 -dd -jp [ { "ifindex": 4, "ifname": "hns_0", "mrn": 6, "rkey": "300", "lkey": "300", "mrlen": 131072, "pdn": 8, "pid": 1524, "comm": "ib_send_bw" }, "drv_pbl_hop_num": 2, "drv_ba_pg_shift": 14, "drv_buf_pg_shift": 12 } Link: https://lore.kernel.org/r/20220822104455.2311053-7-liangwenpeng@huawei.comSigned-off-by:
Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Wenpeng Liang authored
The QP raw restrack attributes come from the queue context maintained by the ROCEE. For example: $ rdma res show qp link hns_0 -jp -dd -r [ { "ifindex": 4, "ifname": "hns_0", "data": [ 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, 5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,255,156,0,0,63,156,0,0, 7,0,0,0,1,0,0,0,9,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,156,0, 0,0,0,0,0 ] } ] Link: https://lore.kernel.org/r/20220822104455.2311053-6-liangwenpeng@huawei.comSigned-off-by:
Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Wenpeng Liang authored
The QP restrack attributes come from the queue information maintained by the driver. For example: $ rdma res show qp link hns_0 lqpn 41 -jp -dd [ { "ifindex": 4, "ifname": "hns_0", "port": 1, "lqpn": 41, "rqpn": 40, "type": "RC", "state": "RTR", "rq-psn": 12474738, "sq-psn": 0, "path-mig-state": "ARMED", "pdn": 9, "pid": 1523, "comm": "ib_send_bw" }, "drv_sq_wqe_cnt": 128, "drv_sq_max_gs": 1, "drv_rq_wqe_cnt": 512, "drv_rq_max_gs": 2, "drv_ext_sge_sge_cnt": 0 } Link: https://lore.kernel.org/r/20220822104455.2311053-5-liangwenpeng@huawei.comSigned-off-by:
Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Wenpeng Liang authored
The CQ raw restrack attributes come from the queue context maintained by the ROCEE. For example: $ rdma res show cq dev hns_0 cqn 14 -dd -jp -r [ { "ifindex": 4, "ifname": "hns_0", "data": [ 1,0,0,0,7,0,0,0,0,0,0,0,0,82,6,0,0,82,6,0,0,82,6,0, 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, 6,0,0,0,0,0,0,0 ] } ] Link: https://lore.kernel.org/r/20220822104455.2311053-4-liangwenpeng@huawei.comSigned-off-by:
Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Wenpeng Liang authored
Remove the resttrack attributes from the queue context held by ROCEE, and add the resttrack attributes from the queue information maintained by the driver. For example: $ rdma res show cq dev hns_0 cqn 14 -dd -jp [ { "ifindex": 4, "ifname": "hns_0", "cqn": 14, "cqe": 127, "users": 1, "adaptive-moderation": false, "ctxn": 8, "pid": 1524, "comm": "ib_send_bw" }, "drv_cq_depth": 128, "drv_cons_index": 0, "drv_cqe_size": 32, "drv_arm_sn": 1 } Link: https://lore.kernel.org/r/20220822104455.2311053-3-liangwenpeng@huawei.comSigned-off-by:
Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Wenpeng Liang authored
There is no need to use a dedicated DXF file and DFX structure to manage the interface of the query queue context. Link: https://lore.kernel.org/r/20220822104455.2311053-2-liangwenpeng@huawei.comSigned-off-by:
Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
Daisuke Matsuda authored
rdma/ib_umem.h and rdma/ib_verbs.h are included by rdma/ib_umem_odp.h. This patch removes the redundant entries. Link: https://lore.kernel.org/r/20220823025131.862811-1-matsuda-daisuke@fujitsu.comSigned-off-by:
Daisuke Matsuda <matsuda-daisuke@fujitsu.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-
- 21 Aug, 2022 1 commit
-
-
Wolfram Sang authored
Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Link: https://lore.kernel.org/r/20220818210018.6841-1-wsa+renesas@sang-engineering.comSigned-off-by:
Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by:
Leon Romanovsky <leon@kernel.org>
-