Chengchang Tang
b65afbd2a0
RDMA/hns: Refactor the alloc_srqc()
...
Abstract the alloc_srqc() into several parts and separate the alloc_srqn()
from the alloc_srqc().
Link: https://lore.kernel.org/r/20220302064830.61706-9-liangwenpeng@huawei.com
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-03-04 17:36:32 -04:00
Wenpeng Liang
904de76c42
RDMA/hns: Clean up the return value check of hns_roce_alloc_cmd_mailbox()
...
hns_roce_alloc_cmd_mailbox() never returns NULL, so the check should be
IS_ERR(). And the error code should be converted as the function's return
value.
Link: https://lore.kernel.org/r/20220302064830.61706-8-liangwenpeng@huawei.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-03-04 17:36:32 -04:00
Chengchang Tang
cf7f8f5c1c
RDMA/hns: Remove similar code that configures the hardware contexts
...
Remove duplicate code for creating and destroying hardware contexts via
mailbox.
Link: https://lore.kernel.org/r/20220302064830.61706-7-liangwenpeng@huawei.com
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-03-04 17:36:31 -04:00
Chengchang Tang
162e29feab
RDMA/hns: Refactor mailbox functions
...
The current mailbox functions have too many parameters, making the code
difficult to maintain. So construct a new structure mbox_msg to pass the
information needed by mailbox.
Link: https://lore.kernel.org/r/20220302064830.61706-6-liangwenpeng@huawei.com
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-03-04 17:36:31 -04:00
Wenpeng Liang
e50cda2b9f
RDMA/hns: Fix the wrong type of parameter "op" of the mailbox
...
The "op" field of the mailbox occupies 8 bits, so the parameter "op"
should be of type u8.
Link: https://lore.kernel.org/r/20220302064830.61706-5-liangwenpeng@huawei.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-03-04 17:36:31 -04:00
Wenpeng Liang
479dc93ba7
RDMA/hns: Remove redundant parameter "mailbox" in the mailbox
...
The parameter "out_param" of the mailbox is always null when the context is
destroyed. So remove the function parameter "mailbox".
Link: https://lore.kernel.org/r/20220302064830.61706-4-liangwenpeng@huawei.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-03-04 17:36:31 -04:00
Chengchang Tang
0018ed4bb0
RDMA/hns: Remove fixed parameter “timeout” in the mailbox
...
The value of the function parameter “timeout” is unique. Therefore,
it is unnecessary to specify the parameter “timeout” value each time.
So remove it.
Link: https://lore.kernel.org/r/20220302064830.61706-3-liangwenpeng@huawei.com
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com >
Signed-off-by: Haoyue Xu <xuhaoyue1@hisilicon.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-03-04 17:36:30 -04:00
Chengchang Tang
5a32949d81
RDMA/hns: Remove the unused parameter "op_modifier" in mailbox
...
The parameter "op_modifier" is only used for HIP06. It is useless for HIP08
and later versions. After removing HIP06, this parameter is no longer used,
so remove it.
Link: https://lore.kernel.org/r/20220302064830.61706-2-liangwenpeng@huawei.com
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com >
Signed-off-by: Haoyue Xu <xuhaoyue1@hisilicon.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-03-04 17:36:30 -04:00
Yajun Deng
7c4a539ec3
RDMA/core: Fix ib_qp_usecnt_dec() called when error
...
ib_destroy_qp() would called by ib_create_qp_user() if error, the former
contains ib_qp_usecnt_dec(), but ib_qp_usecnt_inc() was not called before.
So move ib_qp_usecnt_inc() into create_qp().
Fixes: d2b10794fc ("RDMA/core: Create clean QP creations interface for uverbs")
Link: https://lore.kernel.org/r/20220303024232.2847388-1-yajun.deng@linux.dev
Signed-off-by: Yajun Deng <yajun.deng@linux.dev >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-03-04 17:30:31 -04:00
Mike Marciniszyn
b135e324d7
IB/hfi1: Allow larger MTU without AIP
...
The AIP code signals the phys_mtu in the following query_port()
fragment:
props->phys_mtu = HFI1_CAP_IS_KSET(AIP) ? hfi1_max_mtu :
ib_mtu_enum_to_int(props->max_mtu);
Using the largest MTU possible should not depend on AIP.
Fix by unconditionally using the hfi1_max_mtu value.
Fixes: 6d72344cf6 ("IB/ipoib: Increase ipoib Datagram mode MTU's upper limit")
Link: https://lore.kernel.org/r/1644348309-174874-1-git-send-email-mike.marciniszyn@cornelisnetworks.com
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com >
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-03-04 17:22:02 -04:00
Yajun Deng
a80501b891
RDMA/core: Remove unnecessary statements
...
The rdma_zalloc_drv_obj() in __ib_alloc_pd() would zero pd, it unnecessary
add NULL to the object in struct pd.
The uverbs_free_pd() already return busy if pd->usecnt is true, there is
no need to add a warning.
Link: https://lore.kernel.org/r/20220223074901.201506-1-yajun.deng@linux.dev
Signed-off-by: Yajun Deng <yajun.deng@linux.dev >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-28 13:57:24 -04:00
Mustafa Ismail
17850f2b0b
RDMA/irdma: Remove incorrect masking of PD
...
The PD id is masked with 0x7fff, while PD can be 18 bits for GEN2 HW.
Remove the masking as it should not be needed and can cause incorrect PD
id to be used.
Fixes: b48c24c2d7 ("RDMA/irdma: Implement device supported verb APIs")
Link: https://lore.kernel.org/r/20220225163211.127-4-shiraz.saleem@intel.com
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com >
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-28 12:07:40 -04:00
Mustafa Ismail
b200189626
RDMA/irdma: Fix Passthrough mode in VM
...
Using PCI_FUNC macro in a VM, when the device is in passthrough mode does
not provide the real function instance. This means that currently, devices
will not probe unless the instance in the VM matches the instance in the
host.
Fix this by getting the pf_id from the LAN during the probe.
Fixes: 8498a30e1b ("RDMA/irdma: Register auxiliary driver and implement private channel OPs")
Link: https://lore.kernel.org/r/20220225163211.127-3-shiraz.saleem@intel.com
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com >
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-28 12:07:40 -04:00
Mustafa Ismail
6702bc1474
RDMA/irdma: Fix netdev notifications for vlan's
...
Currently, events on vlan netdevs are being ignored. Fix this by finding
the real netdev and processing the notifications for vlan netdevs.
Fixes: 915cc7ac0f ("RDMA/irdma: Add miscellaneous utility definitions")
Link: https://lore.kernel.org/r/20220225163211.127-2-shiraz.saleem@intel.com
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com >
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-28 12:07:40 -04:00
Zhu Yanjun
ea7596c1e5
RDMA/irdma: Make irdma_create_mg_ctx return a void
...
The function irdma_create_mg_ctx always returns 0, so make it void and
delete the return value check.
Link: https://lore.kernel.org/r/20220224182832.3896686-1-yanjun.zhu@linux.dev
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev >
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-28 11:32:42 -04:00
Zhu Yanjun
884194ef26
RDMA/irdma: Move union irdma_sockaddr to header file
...
The union irdma_sockaddr is used frequently. So move it to the header
file.
Link: https://lore.kernel.org/r/20220223024252.3873736-4-yanjun.zhu@linux.dev
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 20:38:56 -04:00
Zhu Yanjun
8627da62cc
RDMA/irdma: Remove the unnecessary variable saddr
...
Firstly the variable saddr was to check the type of a network. Now the
variable net_type is used to do the same work. So it is removed.
Link: https://lore.kernel.org/r/20220223024252.3873736-3-yanjun.zhu@linux.dev
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 20:38:56 -04:00
Zhu Yanjun
80005c43d4
RDMA/irdma: Use net_type to check network type
...
The member variable net_type is to check the type of network.
Link: https://lore.kernel.org/r/20220223024252.3873736-2-yanjun.zhu@linux.dev
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 20:38:56 -04:00
Bob Pearson
6090a0c4c7
RDMA/rxe: Cleanup rxe_mcast.c
...
Finish adding subroutine comment headers to subroutines in
rxe_mcast.c. Make minor api change cleanups.
Link: https://lore.kernel.org/r/20220223230706.50332-5-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 20:29:15 -04:00
Bob Pearson
a181c4c81a
RDMA/rxe: Collect cleanup mca code in a subroutine
...
Collect cleanup code for struct rxe_mca into a subroutine,
__rxe_cleanup_mca() called in rxe_detach_mcg() in rxe_mcast.c.
Link: https://lore.kernel.org/r/20220223230706.50332-4-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 20:29:15 -04:00
Bob Pearson
4a4f107347
RDMA/rxe: Collect mca init code in a subroutine
...
Collect initialization code for struct rxe_mca into a subroutine,
__rxe_init_mca(), to cleanup rxe_attach_mcg() in rxe_mcast.c. Check
limit on total number of attached qp's.
Link: https://lore.kernel.org/r/20220223230706.50332-3-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 20:29:15 -04:00
Bob Pearson
6a8a2e473b
RDMA/rxe: Warn if mcast memory is not freed
...
Print a warning if memory allocated by mcast
is not cleared when the rxe driver is unloaded.
Link: https://lore.kernel.org/r/20220223230706.50332-2-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 20:29:15 -04:00
Shiraz Saleem
2322d17abf
RDMA/irdma: Remove excess error variables
...
As irdma_status_code is replaced with an int, there is no need for two
variables to hold error codes.
Remove the excess variable in functions where this occurs. Also, remove
any redundant initializations which are no longer needed.
Link: https://lore.kernel.org/r/20220217151851.1518-4-shiraz.saleem@intel.com
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 15:24:19 -04:00
Shiraz Saleem
45225a93cc
RDMA/irdma: Propagate error codes
...
All functions now return linux error codes. Propagate the return from
these functions as opposed to converting them to generic values.
Link: https://lore.kernel.org/r/20220217151851.1518-3-shiraz.saleem@intel.com
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 15:24:18 -04:00
Shiraz Saleem
2c4b14ea95
RDMA/irdma: Remove enum irdma_status_code
...
Replace use of custom irdma_status_code with linux error codes.
Remove enum irdma_status_code and header in which its defined.
Link: https://lore.kernel.org/r/20220217151851.1518-2-shiraz.saleem@intel.com
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 15:24:18 -04:00
Bart Van Assche
4eaa29b45e
RDMA/ib_srp: Add more documentation
...
Make it more clear what the different ib_srp data structures represent.
Link: https://lore.kernel.org/r/20220215210511.28303-2-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 15:13:23 -04:00
Aharon Landau
77528e2aed
RDMA/mlx5: Reorder calls to pcie_relaxed_ordering_enabled()
...
The mkc is the key for the mkey cache, hence, created in each attempt to
get a cache mkey, while pcie_relaxed_ordering_enabled() is called during
the setting of the mkc, but used only for cases where
IB_ACCESS_RELAXED_ORDERING is set.
pcie_relaxed_ordering_enabled() is an expensive call (26 us). Reorder the
code so the driver will call it only when it is needed.
Link: https://lore.kernel.org/r/684be1366cb1d4f05aa3e78986205e4bc410443a.1644947594.git.leonro@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com >
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 14:59:13 -04:00
Aharon Landau
9ee2516c43
RDMA/mlx5: Store ndescs instead of the translation table size
...
Currently, ent->xlt stores the translation table size. This data should
not be stored in the cache entry but be written directly to the mailbox.
Store ndescs instead, and deduce the translation table size from it
according to the access mode.
Link: https://lore.kernel.org/r/e9dbfaa1f279793a6bd28ee5a31cb4f0f0d70f05.1644947594.git.leonro@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com >
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 14:59:13 -04:00
Aharon Landau
56561ac6b2
RDMA/mlx5: Merge similar flows of allocating MR from the cache
...
When allocating a MR from the cache, the driver calls to get_cache_mr(),
and in case of failure, retries with create_cache_mr(). This is the flow
of mlx5_mr_cache_alloc(), so use it instead.
Link: https://lore.kernel.org/r/53c85fcd4de6ec9de0b8e6cbb1bf5d5fe19900c3.1644947594.git.leonro@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com >
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 14:59:13 -04:00
Aharon Landau
2f0e60d5e9
RDMA/mlx5: Fix the flow of a miss in the allocation of a cache ODP MR
...
When an ODP MR cache entry is empty and trying to allocate it, increment
the ent->miss counter and call to queue_adjust_cache_locked() to verify
the entry is balanced.
Fixes: aad719dcf3 ("RDMA/mlx5: Allow MRs to be created in the cache synchronously")
Link: https://lore.kernel.org/r/09503e295276dcacc92cb1d8aef1ad0961c99dc1.1644947594.git.leonro@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com >
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 14:59:13 -04:00
Aharon Landau
185b982678
RDMA/mlx5: Remove redundant work in struct mlx5_cache_ent
...
delayed_cache_work_func() and the cache_work_func() are both wrappers of
__cache_work_func(). Instead of having a special not delayed work, use the
delayed work with delay = 0.
Link: https://lore.kernel.org/r/18b6ae205e75f087aa4a2a05c81ea8b66d8d88dc.1644947594.git.leonro@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com >
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-23 14:59:13 -04:00
Håkon Bugge
748663c8cc
IB/cma: Allow XRC INI QPs to set their local ACK timeout
...
XRC INI QPs should be able to adjust their local ACK timeout.
Fixes: 2c1619edef ("IB/cma: Define option to set ack timeout and pack tos_set")
Link: https://lore.kernel.org/r/1644421175-31943-1-git-send-email-haakon.bugge@oracle.com
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com >
Suggested-by: Avneesh Pant <avneesh.pant@oracle.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-17 11:51:12 -04:00
Bob Pearson
3810c1a1cb
RDMA/rxe: Remove mcg from rxe pools
...
Finish removing mcg from rxe pools. Replace rxe pools ref counting by
kref's. Replace rxe_alloc by kzalloc.
Link: https://lore.kernel.org/r/20220208211644.123457-8-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-16 12:11:29 -04:00
Bob Pearson
d2ccf0411d
RDMA/rxe: Remove key'ed object support
...
Now that rxe_mcast.c has it's own red-black tree support there is no
longer any requirement for key'ed objects in rxe pools. This patch removes
the key APIs and related code.
Link: https://lore.kernel.org/r/20220208211644.123457-7-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-16 12:10:17 -04:00
Bob Pearson
8a0a5fe0c4
RDMA/rxe: Replace pool key by rxe->mcg_tree
...
Continuing to decouple mcg from rxe pools. Create red-black tree code in
rxe_mcast.c to hold mcg index. Replace pool key calls by calls to local
red-black routines.
Link: https://lore.kernel.org/r/20220208211644.123457-6-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-16 12:06:35 -04:00
Bob Pearson
8a99c81f12
RDMA/rxe: Replace int num_qp by atomic_t qp_num
...
Replace int num_qp in struct rxe_mcg by atomic_t qp_num.
Link: https://lore.kernel.org/r/20220208211644.123457-5-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-16 12:01:22 -04:00
Bob Pearson
5bc15d1f7e
RDMA/rxe: Replace grp by mcg, mce by mca
...
Replace 'grp' by 'mcg', 'mce' by 'mca'. Shorten subroutine names in
rxe_mcast.c. These name uses are more in line with other object names
used.
Link: https://lore.kernel.org/r/20220208211644.123457-4-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-16 12:01:19 -04:00
Bob Pearson
d572405518
RDMA/rxe: Use kzmalloc/kfree for mca
...
Remove rxe_mca (was rxe_mc_elem) from rxe pools and use kzmalloc and kfree
to allocate and free in rxe_mcast.c. Call kzalloc outside of spinlocks to
avoid having to use GFP_ATOMIC.
Link: https://lore.kernel.org/r/20220208211644.123457-3-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-16 11:59:11 -04:00
Bob Pearson
9fd0eb7c3c
RDMA/rxe: Move mcg_lock to rxe
...
Replace mcg->mcg_lock and mc_grp_pool->pool_lock by rxe->mcg_lock. This
is the first step of several intended to decouple the mc_grp and mc_elem
objects from the rxe pool code.
Link: https://lore.kernel.org/r/20220208211644.123457-2-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-16 11:55:28 -04:00
Bob Pearson
a099b08599
RDMA/rxe: Revert changes from irqsave to bh locks
...
A previous patch replaced all irqsave locks in rxe with bh locks. This
ran into problems because rdmacm has a bad habit of calling rdma verbs
APIs while disabling irqs. This is not allowed during spin_unlock_bh()
causing programs that use rdmacm to fail. This patch reverts the changes
to locks that had this problem or got dragged into the same mess. After
this patch blktests/check -q srp now runs correctly.
Link: https://lore.kernel.org/r/20220215194448.44369-1-rpearsonhpe@gmail.com
Fixes: 21adfa7a3c ("RDMA/rxe: Replace irqsave locks with bh locks")
Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev >
Reported-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Tested-by: Bart Van Assche <bvanassche@acm.org >
Acked-by: Zhu Yanjun <zyjzyj2000@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-16 11:51:28 -04:00
Yury Norov
3c8bc3954d
RDMA/hfi: Replace cpumask_weight with cpumask_empty where appropriate
...
drivers/infiniband/hw/hfi1/affinity.c code calls cpumask_weight() to check
if any bit of a given cpumask is set. We can do it more efficiently with
cpumask_empty() because cpumask_empty() stops traversing the cpumask as
soon as it finds first set bit, while cpumask_weight() counts all bits
unconditionally.
Link: https://lore.kernel.org/r/20220210224933.379149-20-yury.norov@gmail.com
Signed-off-by: Yury Norov <yury.norov@gmail.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-11 15:07:30 -04:00
Jason Gunthorpe
2f1b2820b5
Merge branch 'irdma_dscp' into rdma.git for-next
...
Shiraz Saleem says:
====================
Add support for DSCP QoS
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux iwl-next
====================
Link: https://lore.kernel.org/r/20220207235921.1303522-1-anthony.l.nguyen@intel.com/
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-08 12:55:27 -04:00
Mustafa Ismail
4b860c9169
RDMA/irdma: Add support for DSCP
...
Add DSCP support for the Intel Ethernet 800 Series devices. Setup VSI
DSCP info when PCI driver indicates DSCP mode during driver probe or as
notification event.
Link: https://lore.kernel.org/r/20220202191921.1638-4-shiraz.saleem@intel.com
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com >
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-08 12:54:47 -04:00
Mustafa Ismail
8348305532
RDMA/irdma: Refactor DCB bits in prep for DSCP support
...
Rename dcb flag to dcb_vlan_mode in irdma_device struct. Add a new helper
function, irdma_set_qos_info, to set the VSI QoS information passed by the
PCI driver.
Link: https://lore.kernel.org/r/20220202191921.1638-3-shiraz.saleem@intel.com
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com >
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-08 12:54:47 -04:00
Xiao Yang
b1377cc37f
RDMA/rxe: Check the last packet by RXE_END_MASK
...
It's wrong to check the last packet by RXE_COMP_MASK because the flag is
to indicate if responder needs to generate a completion.
Fixes: 9fcd67d177 ("IB/rxe: increment msn only when completing a request")
Fixes: 8700e3e7c4 ("Soft RoCE driver")
Link: https://lore.kernel.org/r/20211229034438.1854908-1-yangx.jy@fujitsu.com
Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-08 11:54:38 -04:00
Dave Ertman
b794eecb2a
ice: add support for DSCP QoS for IDC
...
The ice driver provides QoS information to auxiliary drivers
through the exported function ice_get_qos_params. This function
doesn't currently support L3 DSCP QoS.
Add the necessary defines, structure elements and code to support
DSCP QoS through the IIDC functions.
Signed-off-by: Dave Ertman <david.m.ertman@intel.com >
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com >
2022-02-03 15:22:03 -08:00
Colin Ian King
0d9c00117b
RDMA/mlx4: remove redundant assignment to variable nreq
...
Variable nreq is being assigned a value that is never read. The assignment
is redundant and can be removed.
Link: https://lore.kernel.org/r/20220130225747.8114-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-02-01 10:55:43 -04:00
Bob Pearson
d3f6899b0b
RDMA/rxe: Remove qp->grp_lock and qp->grp_list
...
Since it is no longer required to cleanup attachments to multicast
groups when a QP is destroyed qp->grp_lock and qp->grp_list are
no longer needed and are removed.
Link: https://lore.kernel.org/r/20220127213755.31697-7-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-01-28 14:33:28 -04:00
Bob Pearson
8a7fa872ff
RDMA/rxe: Remove rxe_drop_all_macst_groups
...
With o10-2.2.3 enforced rxe_drop_all_mcast_groups is completely
unnecessary. Remove it and references to it.
Link: https://lore.kernel.org/r/20220127213755.31697-6-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-01-28 14:33:28 -04:00
Bob Pearson
f9f4846057
RDMA/rxe: Enforce IBA o10-2.2.3
...
Add code to check if a QP is attached to one or more multicast groups
when destroy_qp is called and return an error if so.
Link: https://lore.kernel.org/r/20220127213755.31697-5-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-01-28 14:33:28 -04:00