Md Haris Iqbal
41db63a7ef
RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its stats
...
When get_next_path_min_inflight is called to select the next path, it
iterates over the list of available rtrs_clt_sess (paths). It then reads
the number of inflight IOs for that path to select one which has the least
inflight IO.
But it may so happen that rtrs_clt_sess (path) is no longer in the
connected state because closing or error recovery paths can change the status
of the rtrs_clt_Sess.
For example, the client sent the heart-beat and did not get the
response, it would change the session status and stop IO processing.
The added checking of this patch can prevent accessing the broken path
and generating duplicated error messages.
It is ok if the status is changed after checking the status because
the error recovery path does not free memory and only tries to
reconnection. And also it is ok if the session is closed after checking
the status because closing the session changes the session status and
flush all IO beforing free memory. If the session is being accessed for
IO processing, the closing session will wait.
Fixes: 6a98d71dae ("RDMA/rtrs: client: main functionality")
Link: https://lore.kernel.org/r/20210528113018.52290-13-jinpu.wang@ionos.com
Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com >
Reviewed-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:52:58 -03:00
Guoqing Jiang
7a2e0888b0
RDMA/rtrs-clt: Remove redundant 'break'
...
It is duplicated with the very next line
Link: https://lore.kernel.org/r/20210528113018.52290-12-jinpu.wang@ionos.com
Signed-off-by: Guoqing Jiang <guoqing.jiang@ionos.com >
Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com >
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:52:58 -03:00
Guoqing Jiang
0aedfb695f
RDMA/rtrs-srv: Kill __rtrs_srv_change_state
...
No need since the only user is rtrs_srv_change_state.
Link: https://lore.kernel.org/r/20210528113018.52290-11-jinpu.wang@ionos.com
Signed-off-by: Guoqing Jiang <guoqing.jiang@ionos.com >
Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com >
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:52:58 -03:00
Guoqing Jiang
b0c633c482
RDMA/rtrs-clt: Kill rtrs_clt_disconnect_from_sysfs
...
The function is just a wrapper of rtrs_clt_close_conns, let's call
rtrs_clt_close_conns directly.
Link: https://lore.kernel.org/r/20210528113018.52290-10-jinpu.wang@ionos.com
Signed-off-by: Guoqing Jiang <guoqing.jiang@ionos.com >
Signed-off-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:52:58 -03:00
Guoqing Jiang
5e82ac7c00
RDMA/rtrs-clt: Kill rtrs_clt_{start,stop}_hb
...
The two wrappers are not needed since we can call rtrs_{start,stop}_hb
directly.
Link: https://lore.kernel.org/r/20210528113018.52290-9-jinpu.wang@ionos.com
Signed-off-by: Guoqing Jiang <guoqing.jiang@ionos.com >
Signed-off-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:52:58 -03:00
Dima Stepanov
2d612f0d3d
RDMA/rtrs: Use strscpy instead of strlcpy
...
During checkpatch analyzing the following warning message was found:
WARNING:STRLCPY: Prefer strscpy over strlcpy - see:
https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Fix it by using strscpy calls instead of strlcpy.
Link: https://lore.kernel.org/r/20210528113018.52290-8-jinpu.wang@ionos.com
Signed-off-by: Dima Stepanov <dmitrii.stepanov@ionos.com >
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:52:58 -03:00
Gioh Kim
3f3d0eabc1
RDMA/rtrs: Define MIN_CHUNK_SIZE
...
Define MIN_CHUNK_SIZE to replace the hard-coding number.
We need 4k for metadata, so MIN_CHUNK_SIZE should be at least 8k.
Link: https://lore.kernel.org/r/20210528113018.52290-7-jinpu.wang@ionos.com
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:52:58 -03:00
Gioh Kim
3a98ea7041
RDMA/rtrs: Change MAX_SESS_QUEUE_DEPTH
...
Max IB immediate data size is 2^28 (MAX_IMM_PAYL_BITS)
and the minimum chunk size is 4096 (2^12).
Therefore the maximum sess_queue_depth is 65536 (2^16).
Link: https://lore.kernel.org/r/20210528113018.52290-6-jinpu.wang@ionos.com
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jack Wang <jinpu.wang@ionos.com >
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:52:58 -03:00
Guoqing Jiang
485f2fb1a0
RDMA/rtrs-srv: Clean up the code in __rtrs_srv_change_state
...
No need to use double switch to check the change of state everywhere,
let's change them to "if" to reduce size.
Link: https://lore.kernel.org/r/20210528113018.52290-5-jinpu.wang@ionos.com
Signed-off-by: Guoqing Jiang <guoqing.jiang@ionos.com >
Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com >
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:52:58 -03:00
Md Haris Iqbal
6564b11031
RDMA/rtrs-srv: Add error messages for cases when failing RDMA connection
...
It was difficult to find out why it failed to establish RDMA
connection. This patch adds some messages to show which function
has failed why.
Link: https://lore.kernel.org/r/20210528113018.52290-4-jinpu.wang@ionos.com
Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com >
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:52:41 -03:00
Gioh Kim
21c6f5674b
RDMA/rtrs-clt: Remove MAX_SESS_QUEUE_DEPTH from rtrs_send_sess_info
...
Client receives queue_depth value from server. There is no need
to use MAX_SESS_QUEUE_DEPTH value.
Link: https://lore.kernel.org/r/20210528113018.52290-3-jinpu.wang@ionos.com
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:43:39 -03:00
Guoqing Jiang
cfbeb0b9bb
RDMA/rtrs-srv: Kill reject_w_econnreset label
...
We can goto reject_w_err label after initialize err with -ECONNRESET.
Link: https://lore.kernel.org/r/20210528113018.52290-2-jinpu.wang@ionos.com
Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com >
Signed-off-by: Guoqing Jiang <guoqing.jiang@ionos.com >
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:43:38 -03:00
YueHaibing
33e8234600
RDMA/srp: Use DEVICE_ATTR_*() macros
...
Use DEVICE_ATTR_*() helpers instead of plain DEVICE_ATTR, which makes the
code a bit shorter and easier to read.
Link: https://lore.kernel.org/r/20210528125750.20788-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:40:29 -03:00
YueHaibing
c5b8eaf8af
RDMA/core: Use the DEVICE_ATTR_RO macro
...
Use the DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which
makes the code a bit shorter and easier to read.
Link: https://lore.kernel.org/r/20210526132949.20184-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:39:51 -03:00
YueHaibing
1f8f60f35f
IB/ipoib: Use DEVICE_ATTR_*() macros
...
Use DEVICE_ATTR_*() helper instead of plain DEVICE_ATTR, which makes the
code a bit shorter and easier to read.
Link: https://lore.kernel.org/r/20210526132753.3092-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:39:16 -03:00
Håkon Bugge
d58c23c925
IB/core: Only update PKEY and GID caches on respective events
...
Both the PKEY and GID tables in an HCA can hold in the order of hundreds
entries. Reading them is expensive. Partly because the API for retrieving
them only returns a single entry at a time. Further, on certain
implementations, e.g., CX-3, the VFs are paravirtualized in this respect
and have to rely on the PF driver to perform the read. This again demands
VF to PF communication.
IB Core's cache is refreshed on all events. Hence, filter the refresh of
the PKEY and GID caches based on the event received being
IB_EVENT_PKEY_CHANGE and IB_EVENT_GID_CHANGE respectively.
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Link: https://lore.kernel.org/r/1621964949-28484-1-git-send-email-haakon.bugge@oracle.com
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:26:16 -03:00
Xi Wang
3f0d979efb
RDMA/hns: Refactor capability configuration flow of VF
...
The capbability configurations of PFs and VFs are coupled. Decoupling them
by abstracting some functions and reorganizing the configuration process.
Link: https://lore.kernel.org/r/1621860428-58009-1-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com >
Signed-off-by: Yixing Liu <liuyixing1@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:25:37 -03:00
Max Gurtovoy
221442ea0f
IB/isert: set rdma cm afonly flag
...
This will allow both IPv4 and IPv6 sockets to bind a single port at the
same time. Same behaviour is implemented in NVMe/RDMA target.
Link: https://lore.kernel.org/r/20210524085225.29064-1-mgurtovoy@nvidia.com
Reviewed-by: Alaa Hleihel <alaa@nvidia.com >
Reviewed-by: Israel Rukshin <israelr@nvidia.com >
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com >
Reviewed-by: Sagi Grimberg <sagi@grimberg.me >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:24:52 -03:00
Bart Van Assche
ad215aaea4
RDMA/srp: Make struct scsi_cmnd and struct srp_request adjacent
...
Define .init_cmd_priv and .exit_cmd_priv callback functions in struct
scsi_host_template. Set .cmd_size such that the SCSI core allocates
per-command private data. Use scsi_cmd_priv() to access that private
data. Remove the req_ring pointer from struct srp_rdma_ch since it is no
longer necessary. Convert srp_alloc_req_data() and srp_free_req_data()
into functions that initialize one instance of the SRP-private command
data. This is a micro-optimization since this patch removes several
pointer dereferences from the hot path.
Note: due to commit e73a5e8e80 ("scsi: core: Only return started
requests from scsi_host_find_tag()"), it is no longer necessary to protect
the completion path against duplicate responses.
Link: https://lore.kernel.org/r/20210524041211.9480-6-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:21:21 -03:00
Bart Van Assche
7ec2e27a3a
RDMA/srp: Fix a recently introduced memory leak
...
Only allocate a memory registration list if it will be used and if it will
be freed.
Link: https://lore.kernel.org/r/20210524041211.9480-5-bvanassche@acm.org
Reviewed-by: Max Gurtovoy <maxg@mellanox.com >
Fixes: f273ad4f8d ("RDMA/srp: Remove support for FMR memory registration")
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:21:21 -03:00
Bart Van Assche
6dc26498e1
RDMA/srp: Apply the __packed attribute to members instead of structures
...
Applying the __packed attribute to an entire data structure results in
suboptimal code on architectures that do not support unaligned accesses.
Hence apply the __packed attribute only to those data members that are
not naturally aligned.
Link: https://lore.kernel.org/r/20210524041211.9480-4-bvanassche@acm.org
Cc: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:21:20 -03:00
Bart Van Assche
c838de1af1
RDMA/srp: Add more structure size checks
...
Before modifying how the __packed attribute is used, add compile time
size checks for the structures that will be modified.
Link: https://lore.kernel.org/r/20210524041211.9480-3-bvanassche@acm.org
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Cc: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:21:20 -03:00
Bart Van Assche
17bb6b6bb5
IB/hfi1: Move a function from a header file into a .c file
...
Since ib_get_len() only has one caller, move it from a header file into a
.c file. Additionally, remove the superfluous u16 cast. That cast was
introduced by commit 7dafbab375 ("IB/hfi1: Add functions to parse BTH/IB
headers").
Link: https://lore.kernel.org/r/20210524041211.9480-2-bvanassche@acm.org
Cc: Don Hiatt <don.hiatt@intel.com >
Cc: Dennis Dalessandro <dennis.dalessandro@intel.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:21:20 -03:00
Xi Wang
68e11a6086
RDMA/hns: Clean the hardware related code for HEM
...
Move the HIP06 related code to the hw v1 source file for HEM.
Link: https://lore.kernel.org/r/1621589395-2435-6-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:13:58 -03:00
Weihang Li
82eb481da6
RDMA/hns: Use refcount_t APIs for HEM
...
refcount_t is better than integer for reference counting, it will WARN on
overflow/underflow and avoid use-after-free risks.
Link: https://lore.kernel.org/r/1621589395-2435-5-git-send-email-liweihang@huawei.com
Signed-off-by: Weihang Li <liweihang@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:13:58 -03:00
Xi Wang
5e6370d7cc
RDMA/hns: Fix wrong timer context buffer page size
...
The HEM page size for QPC timer and CQC timer is always 4K and there's no
need to calculate a different size by the hns driver, otherwise the ROCEE
may access an invalid address.
Fixes: 719d13415f ("RDMA/hns: Remove duplicated hem page size config code")
Link: https://lore.kernel.org/r/1621589395-2435-4-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:13:57 -03:00
Xi Wang
1f704d8cc0
RDMA/hns: Refactor root BT allocation for MTR
...
Split the hem_list_alloc_root_bt() into serval small functions to make the
code flow more clear.
Link: https://lore.kernel.org/r/1621589395-2435-3-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:13:57 -03:00
Xi Wang
7b0006db68
RDMA/hns: Optimize the base address table config for MTR
...
The base address table is allocated by dma allocator, and the size is
always aligned to PAGE_SIZE. If a fixed size is used to allocate the
table, the number of base address entries stored in the table will be
smaller than that can actually stored.
Link: https://lore.kernel.org/r/1621589395-2435-2-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-28 20:13:57 -03:00
Maor Gottlieb
9ecf6ac17c
RDMA/mlx5: Take qp type from mlx5_ib_qp
...
Change all the places in the mlx5_ib driver to take the qp type from the
mlx5_ib_qp struct, except the QP initialization flow. It will ensure that
we check the right QP type also for vendor specific QPs.
Link: https://lore.kernel.org/r/b2e16cd65b59cd24fa81c01c7989248da44e58ea.1621413899.git.leonro@nvidia.com
Signed-off-by: Maor Gottlieb <maorg@nvidia.com >
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-26 16:49:42 -03:00
Lang Cheng
331859d320
RDMA/hns: Remove unused CMDQ member
...
The hcr_mutex was used to serialize mailbox post. Now that mailbox
supports concurrency, this variable is no longer useful.
Fixes: a389d016c0 ("RDMA/hns: Enable all CMDQ context")
Link: https://lore.kernel.org/r/1621482876-35780-4-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 12:39:29 -03:00
Lang Cheng
21090b5d8c
RDMA/hns: Remove Receive Queue of CMDQ
...
The CRQ of CMDQ is unused, so remove code about it.
Link: https://lore.kernel.org/r/1621482876-35780-3-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 12:39:29 -03:00
Lang Cheng
4511624a35
RDMA/hns: Rename CMDQ head/tail pointer to PI/CI
...
The same name represents opposite meanings in new/old driver, it is hard
to maintain, so rename them to PI/CI.
Link: https://lore.kernel.org/r/1621482876-35780-2-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 12:39:29 -03:00
Xi Wang
b6989da85a
RDMA/hns: Refactor extend link table allocation
...
The timeout link table works in HIP08 ES version and the hns driver only
support the CS version for HIP08, so delete the related code. Then
simplify the buffer allocation for link table to make the code more
readable.
Link: https://lore.kernel.org/r/1621481751-27375-1-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 12:39:05 -03:00
Tian Tao
800de3f557
RDMA/cxgb4: Remove useless assignments
...
If go to the err label, abort will be assigned a value of 1, so there is
no need to assign a value of 1 here.
Link: https://lore.kernel.org/r/1621503577-18093-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Tian Tao <tiantao6@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 12:28:21 -03:00
Shaokun Zhang
12a7a99662
IB/hfi1: Remove the repeated declaration
...
Function 'init_credit_return' and 'sc_return_credits' are declared twice,
remove the repeated declaration.
Link: https://lore.kernel.org/r/1621417415-3772-1-git-send-email-zhangshaokun@hisilicon.com
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 12:28:21 -03:00
Guenter Roeck
6dc760027d
RDMA/bnxt_re: Drop unnecessary NULL checks after container_of
...
The result of container_of() operations is never NULL unless the first
element of the embedding structure is extracted. This is either not the
case here, or the pointer passed to container_of() is known to be not
NULL. The NULL checks are therefore unnecessary and misleading.
Remove them.
The channges in this patch were made automatically with the following
Coccinelle script.
@@
type t;
identifier v;
statement s;
@@
<+...
(
t v = container_of(...);
|
v = container_of(...);
)
...
when != v
- if (\( !v \| v == NULL \) ) s
...+>
Link: https://lore.kernel.org/r/20210514153606.1377119-1-linux@roeck-us.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 12:01:00 -03:00
Lang Cheng
cd5b010fff
RDMA/rxe: Remove unused parameter udata
...
The old version of ib_umem_get() need these udata as a parameter but now
they are unnecessary.
Fixes: c320e527e1 ("IB: Allow calls to ib_umem_get from kernel ULPs")
Link: https://lore.kernel.org/r/1620807142-39157-5-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Reviewed-by: Zhu Yanjun <zyjzyj2000@gmail.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 11:52:17 -03:00
Lang Cheng
0bedd3d005
RDMA/mlx5: Remove unused parameter udata
...
The old version of ib_umem_get() need these udata as a parameter but now
they are unnecessary.
Fixes: c320e527e1 ("IB: Allow calls to ib_umem_get from kernel ULPs")
Link: https://lore.kernel.org/r/1620807142-39157-4-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Acked-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 11:52:17 -03:00
Lang Cheng
aca496fb61
RDMA/mlx4: Remove unused parameter udata
...
The old version of ib_umem_get() need these udata as a parameter but now
they are unnecessary.
Fixes: c320e527e1 ("IB: Allow calls to ib_umem_get from kernel ULPs")
Link: https://lore.kernel.org/r/1620807142-39157-3-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 11:52:17 -03:00
Lang Cheng
69e0a42f3f
RDMA/hns: Remove unused parameter udata
...
The old version of ib_umem_get() need these udata as a parameter but now
they are unnecessary.
Fixes: c320e527e1 ("IB: Allow calls to ib_umem_get from kernel ULPs")
Link: https://lore.kernel.org/r/1620807142-39157-2-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 11:52:16 -03:00
Sergey Gorenko
c906b86e9c
RDMA/mlx5: Add SQD2RTS bit to the alloc ucontext response
...
The new bit in the comp_mask is needed to mark that kernel supports
SQD2RTS transition for the modify QP command.
Link: https://lore.kernel.org/r/7ce705fedac1b2b8e3a2f4013e04244dc5946344.1620641808.git.leonro@nvidia.com
Reviewed-by: Evgenii Kochetov <evgeniik@nvidia.com >
Signed-off-by: Sergey Gorenko <sergeygo@nvidia.com >
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 11:41:07 -03:00
Sergey Gorenko
021c1f24f0
RDMA/mlx5: Support SQD2RTS for modify QP
...
The transition of the QP state from SQD to RTS is allowed by the IB
specification. The hardware also supports that, but it is not
implemented in mlx5_ib.
This commit adds SQD2RTS command to the modify QP in mlx5_ib to support
the missing feature. The feature is required by the signature pipelining
API that will be added to rdma-core.
Link: https://lore.kernel.org/r/ab4876360bfba0e9d64a5e8599438e32e0cb351e.1620641808.git.leonro@nvidia.com
Reviewed-by: Evgenii Kochetov <evgeniik@nvidia.com >
Signed-off-by: Sergey Gorenko <sergeygo@nvidia.com >
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-20 11:41:07 -03:00
Zhen Lei
620ccaaa46
IB/hfi1: Delete an unneeded bool conversion
...
The result of an expression consisting of a single relational operator is
already of the bool type and does not need to be evaluated explicitly.
No functional change.
Link: https://lore.kernel.org/r/20210510120635.3636-1-thunder.leizhen@huawei.com
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-11 16:56:55 -03:00
Wan Jiabing
7c6c2f5337
RDMA: Remove unnecessary struct declaration
...
The declaration of struct ib_grh is uncessary here, because it is defined
at line 766.
Link: https://lore.kernel.org/r/20210510062843.15707-1-wanjiabing@vivo.com
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-11 14:44:17 -03:00
Leon Romanovsky
16149eddd3
RDMA/core: Remove never used ib_modify_wq function call
...
The function ib_modify_wq() is not used, so remove it.
Link: https://lore.kernel.org/r/c5e48d517b9163fe4f9ffd224050b83fdb3571c6.1620552935.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-11 14:43:58 -03:00
Yang Li
74ec242473
IB/srpt: Remove redundant assignment to ret
...
Variable 'ret' is set to -ENOMEM but this value is never read as it is
overwritten with a new value later on, hence it is a redundant assignment
and can be removed
In 'commit b79fafac70 ("target: make queue_tm_rsp() return void")'
srpt_queue_response() has been changed to return void, so after "goto
out", there is no need to return ret.
Clean up the following clang-analyzer warning:
drivers/infiniband/ulp/srpt/ib_srpt.c:2860:3: warning: Value stored to
'ret' is never read [clang-analyzer-deadcode.DeadStores]
Fixes: b99f8e4d7b ("IB/srpt: convert to the generic RDMA READ/WRITE API")
Link: https://lore.kernel.org/r/1620296105-121964-1-git-send-email-yang.lee@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-11 13:42:17 -03:00
Yang Li
e6a1f8c696
RDMA/mlx5: Remove redundant assignment to ret
...
Variable 'ret' is set to the rerurn value of function
mlx5_mr_cache_alloc() but this value is never read as it is overwritten
with a new value later on, hence it is a redundant assignment and can be
removed
Clean up the following clang-analyzer warning:
drivers/infiniband/hw/mlx5/odp.c:421:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
Fixes: e6fb246cca ("RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()")
Link: https://lore.kernel.org/r/1620296001-120406-1-git-send-email-yang.lee@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-11 13:41:03 -03:00
Xiaofei Tan
e3d65124ce
RDMA/ucma: Cleanup to reduce duplicate code
...
The lable "err1" does the same thing as the branch of copy_to_user()
failed in the function ucma_create_id(). Just jump to the label directly
to reduce duplicate code.
Link: https://lore.kernel.org/r/1620291106-3675-1-git-send-email-tanxiaofei@huawei.com
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-11 13:17:26 -03:00
Yixian Liu
591f762b27
RDMA/hns: Remove the condition of light load for posting DWQE
...
Even in the case of heavy load, direct WQE can still be posted. The
hardware will decide whether to drop the DWQE or not. Thus, the limit
needs to be removed.
Fixes: 01584a5edc ("RDMA/hns: Add support of direct wqe")
Link: https://lore.kernel.org/r/1619593950-29414-1-git-send-email-liweihang@huawei.com
Signed-off-by: Yixian Liu <liuyixian@huawei.com >
Signed-off-by: Weihang Li <liweihang@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-05-11 13:15:22 -03:00
Linus Torvalds
6efb943b86
Linux 5.13-rc1
2021-05-09 14:17:44 -07:00