Christophe JAILLET
f86dbc9fc5
IB/hfi1: Use bitmap_zalloc() when applicable
...
Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid
some open-coded arithmetic in allocator arguments.
Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.
Link: https://lore.kernel.org/r/d46c6bc1869b8869244fa71943d2cad4104b3668.1637869925.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-29 14:33:55 -04:00
Christophe JAILLET
0c83da72d0
RDMA/mlx4: Use bitmap_alloc() when applicable
...
Use 'bitmap_alloc()' to simplify code, improve the semantic and avoid some
open-coded arithmetic in allocator arguments.
Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.
Link: https://lore.kernel.org/r/4c93b4e02f5d784ddfd3efd4af9e673b9117d641.1637869328.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-29 14:33:55 -04:00
Christophe JAILLET
e02d9cc2f8
RDMA/ocrdma: Simplify code in 'ocrdma_search_mmap()'
...
'pd_bitmap' does not need to be const. Without it, it is possible to use
this variable when calling '__set_bit()'. This is less verbose and more
logical.
Link: https://lore.kernel.org/r/ec5cab9611ba062adea4cf8c98a63406ed510a71.1637868728.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-29 14:33:55 -04:00
Christophe JAILLET
27c2f5029a
RDMA/ocrdma: Use bitmap_zalloc() when applicable
...
Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid
some open-coded arithmetic in allocator arguments.
Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.
Link: https://lore.kernel.org/r/b157f9e1586fb4d1083cb4058d7ac81b10bb86d7.1637868728.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-29 14:33:55 -04:00
Kamal Heib
0e938533d9
RDMA/bnxt_re: Remove dynamic pkey table
...
The RoCE spec requires RoCE devices to support only the default pkey.
However the bnxt_re driver maintains a 0xFFFF entry pkey table and uses
only the first entry. Remove the pkey table and hard code a table of
length one hard wired with the default pkey.
Link: https://lore.kernel.org/r/20211125033615.483750-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Reviewed-by: Devesh Sharma <devesh.s.sharma@oracle.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-25 13:35:51 -04:00
Christophe JAILLET
223b4d5c87
RDMA/cxgb4: Use non-atomic bitmap functions when possible
...
The accesses to the 'alloc->table' bitmap are protected by the
'alloc->lock' spinlock, so no concurrent accesses can happen.
So prefer the non-atomic '__[set|clear]_bit()' functions to save a few
cycles.
Link: https://lore.kernel.org/r/0c1c4505ca32f5ba4126e3e324041da191513ef2.1637789139.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-25 13:29:06 -04:00
Christophe JAILLET
967a578af0
RDMA/cxgb4: Use bitmap_set() when applicable
...
The 'alloc->table' bitmap has just been allocated, so this is safe to use
the faster and non-atomic 'bitmap_set()' function. There is no need to
hand-write it.
Link: https://lore.kernel.org/r/fd978b837935ed04863ffecfd495c4601a986df6.1637789139.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-25 13:29:06 -04:00
Christophe JAILLET
d4fdc383c0
RDMA/cxgb4: Use bitmap_zalloc() when applicable
...
Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid
some open-coded arithmetic in allocator arguments.
Using the 'zalloc' version of the allocator also saves a now useless
'bitmap_zero()' call.
Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.
While at it, remove an extra space in a statement just a few lines above.
Link: https://lore.kernel.org/r/e396c4aa16cd8945d43877570a8f6d926cea555a.1637789139.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-25 13:29:06 -04:00
Christophe JAILLET
675e2694fc
IB/mthca: Use non-atomic bitmap functions when possible in 'mthca_mr.c'
...
In 'mthca_buddy_init()', the 'buddy->bits[n]' bitmap has just been
allocated, so no concurrent accesses can occur.
The other accesses to the 'buddy->bits[n]' bitmap are protected by the
'buddy->lock' spinlock, so no concurrent accesses can occur.
So prefer the non-atomic '__[set|clear]_bit()' functions to save a few
cycles.
Link: https://lore.kernel.org/r/a19b88ccdbc03972fd97306b998731814283041f.1637785902.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-25 13:29:06 -04:00
Christophe JAILLET
19453f34cf
IB/mthca: Use non-atomic bitmap functions when possible in 'mthca_allocator.c'
...
The accesses to the 'alloc->table' bitmap are protected by the
'alloc->lock' spinlock, so no concurrent accesses can happen.
So prefer the non-atomic '__[set|clear]_bit()' functions to save a few
cycles.
Link: https://lore.kernel.org/r/5f909ca1284fa4d2cf13952b08b9e303b656c968.1637785902.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-25 13:29:06 -04:00
Christophe JAILLET
a277f38321
IB/mthca: Use bitmap_set() when applicable
...
The 'alloc->table' bitmap has just been allocated, so this is safe to use
the faster and non-atomic 'bitmap_set()' function. There is no need to
hand-write it.
Link: https://lore.kernel.org/r/f1bd33f6ea6c8ad519a222db6e9aa17c55610557.1637785902.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-25 13:29:05 -04:00
Christophe JAILLET
12d1e2f3c5
IB/mthca: Use bitmap_zalloc() when applicable
...
Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid
some open-coded arithmetic in allocator arguments.
Using the 'zalloc' version of the allocator also saves a now useless
'bitmap_zero()' call.
Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.
Link: https://lore.kernel.org/r/ea9031e28f453bc179033740f66f0c19293fcf0b.1637785902.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-25 13:29:05 -04:00
Xinhao Liu
9c3631d170
RDMA/hns: Remove magic number
...
Don't use unintelligible constants.
Link: https://lore.kernel.org/r/20211119140208.40416-10-liangwenpeng@huawei.com
Signed-off-by: Xinhao Liu <liuxinhao5@hisilicon.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-19 14:13:44 -04:00
Yixing Liu
3183559376
RDMA/hns: Remove macros that are no longer used
...
These macros are no longer used, so remove them.
Link: https://lore.kernel.org/r/20211119140208.40416-9-liangwenpeng@huawei.com
Signed-off-by: Yixing Liu <liuyixing1@huawei.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-19 14:13:44 -04:00
Xinhao Liu
6cb6a6cbcd
RDMA/hns: Correctly initialize the members of Array[][]
...
Each member of Array[][] should be initialized on a separate line.
Link: https://lore.kernel.org/r/20211119140208.40416-7-liangwenpeng@huawei.com
Signed-off-by: Xinhao Liu <liuxinhao@huawei.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-19 14:13:44 -04:00
Xinhao Liu
d147583ec8
RDMA/hns: Correct the type of variables participating in the shift operation
...
The type of the variable participating in the shift operation should be an
unsigned type instead of a signed type.
Link: https://lore.kernel.org/r/20211119140208.40416-5-liangwenpeng@huawei.com
Signed-off-by: Xinhao Liu <liuxinhao5@hisilicon.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-19 14:13:18 -04:00
Xinhao Liu
3aecfc3802
RDMA/hns: Replace tab with space in the right-side comments
...
There should be a space between the code and the comment on the right.
Link: https://lore.kernel.org/r/20211119140208.40416-4-liangwenpeng@huawei.com
Signed-off-by: Xinhao Liu <liuxinhao5@hisilicon.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-19 14:13:18 -04:00
Xinhao Liu
ea393549a3
RDMA/hns: Correct the print format to be consistent with the variable type
...
The print format should be consistent with the variable type.
Link: https://lore.kernel.org/r/20211119140208.40416-3-liangwenpeng@huawei.com
Signed-off-by: Xinhao Liu <liuxinhao5@hisilicon.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-19 14:13:18 -04:00
Xinhao Liu
994baacc6b
RDMA/hns: Correct the hex print format
...
The hex printf format should be "0xff" instead of "ff".
Link: https://lore.kernel.org/r/20211119140208.40416-2-liangwenpeng@huawei.com
Signed-off-by: Xinhao Liu <liuxinhao5@hisilicon.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-19 14:13:17 -04:00
Dan Carpenter
10f2d1cbf8
RDMA/usnic: Clean up usnic_ib_alloc_pd()
...
Remove the unnecessary "umem_pd" variable. And usnic_uiom_alloc_pd()
never returns NULL so remove the NULL check.
Link: https://lore.kernel.org/r/20211118113924.GH1147@kili
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-19 12:02:30 -04:00
Kamal Heib
46c87b4277
RDMA/cxgb4: Use helper function to set GUIDs
...
Use the addrconf_addr_eui48() helper function to set the GUIDs, Also make
sure the GUIDs are valid EUI-64 identifiers.
Link: https://lore.kernel.org/r/20211118100456.45423-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-19 11:44:21 -04:00
Kamal Heib
2a67fcfa0d
RDMA/hns: Validate the pkey index
...
Before query pkey, make sure that the queried index is valid.
Fixes: 9a4435375c ("IB/hns: Add driver files for hns RoCE driver")
Link: https://lore.kernel.org/r/20211117145954.123893-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-17 16:52:18 -04:00
Kamal Heib
679f2b7552
RDMA/ocrdma: Use helper function to set GUIDs
...
Use addrconf_addr_eui48() helper function to set the GUIDs and remove the
driver specific version.
Link: https://lore.kernel.org/r/20211117090205.96523-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-17 16:52:07 -04:00
Christophe JAILLET
a917dfb66c
RDMA/bnxt_re: Scan the whole bitmap when checking if "disabling RCFW with pending cmd-bit"
...
The 'cmdq->cmdq_bitmap' bitmap is 'rcfw->cmdq_depth' bits long. The size
stored in 'cmdq->bmap_size' is the size of the bitmap in bytes.
Remove this erroneous 'bmap_size' and use 'rcfw->cmdq_depth' directly in
'bnxt_qplib_disable_rcfw_channel()'. Otherwise some error messages may be
missing.
Other uses of 'cmdq_bitmap' already take into account 'rcfw->cmdq_depth'
directly.
Fixes: 1ac5a40479 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Link: https://lore.kernel.org/r/47ed717c3070a1d0f53e7b4c768a4fd11caf365d.1636707421.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-16 13:54:24 -04:00
Changcheng Deng
dd566d586f
RDMA/bnxt_re: Remove unneeded variable
...
Fix the following coccicheck review:
./drivers/infiniband/hw/bnxt_re/main.c: 896: 5-7: Unneeded variable
Remove unneeded variable used to store return value.
Link: https://lore.kernel.org/r/20211109113227.132596-1-deng.changcheng@zte.com.cn
Reported-by: Zeal Robot <zealci@zte.com.cn >
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn >
Reviewed-by: Devesh Sharma <devesh.s.sharma@oracle.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-16 13:54:24 -04:00
Kamal Heib
fc9d19e18a
RDMA/irdma: Use helper function to set GUIDs
...
Use the addrconf_addr_eui48() helper function to set the GUIDs for both
RoCE and iWARP modes, Also make sure the GUIDs are valid EUI-64
identifiers.
Link: https://lore.kernel.org/r/20211107212227.44610-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-16 13:54:24 -04:00
Linus Torvalds
25edbc383b
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
...
Pull rdma updates from Jason Gunthorpe:
"A typical collection of patches this cycle, mostly fixing with a few
new features:
- Fixes from static tools. clang warnings, dead code, unused
variable, coccinelle sweeps, etc
- Driver bug fixes and minor improvements in rxe, bnxt_re, hfi1,
mlx5, irdma, qedr
- rtrs ULP bug fixes an improvments
- Additional counters for bnxt_re
- Support verbs CQ notifications in EFA
- Continued reworking and fixing of rxe
- netlink control to enable/disable optional device counters
- rxe now can use AH objects for its UD path, fixing various bugs in
the process
- Add DMABUF support to EFA"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (103 commits)
RDMA/core: Require the driver to set the IOVA correctly during rereg_mr
RDMA/bnxt_re: Remove unsupported bnxt_re_modify_ah callback
RDMA/irdma: optimize rx path by removing unnecessary copy
RDMA/qed: Use helper function to set GUIDs
RDMA/hns: Use the core code to manage the fixed mmap entries
IB/opa_vnic: Rebranding of OPA VNIC driver to Cornelis Networks
IB/qib: Rebranding of qib driver to Cornelis Networks
IB/hfi1: Rebranding of hfi1 driver to Cornelis Networks
RDMA/bnxt_re: Use helper function to set GUIDs
RDMA/bnxt_re: Fix kernel panic when trying to access bnxt_re_stat_descs
RDMA/qedr: Fix NULL deref for query_qp on the GSI QP
RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility
RDMA/hns: Fix initial arm_st of CQ
RDMA/rxe: Make rxe_type_info static const
RDMA/rxe: Use 'bitmap_zalloc()' when applicable
RDMA/rxe: Save a few bytes from struct rxe_pool
RDMA/irdma: Remove the unused variable local_qp
RDMA/core: Fix missed initialization of rdma_hw_stats::lock
RDMA/efa: Add support for dmabuf memory regions
RDMA/umem: Allow pinned dmabuf umem usage
...
2021-11-03 08:05:59 -07:00
Kamal Heib
dd83f482d2
RDMA/bnxt_re: Remove unsupported bnxt_re_modify_ah callback
...
There is no need to return always zero for function which is not
supported, especially since 0 is the wrong return code.
Link: https://lore.kernel.org/r/20211102073054.410838-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-03 09:06:36 -03:00
Jason Gunthorpe
6a463bc9d9
Merge branch 'for-rc' into rdma.git for-next
...
Patches held over for a possible rc8.
* for-rc:
RDMA/qedr: Fix NULL deref for query_qp on the GSI QP
RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility
RDMA/hns: Fix initial arm_st of CQ
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-01 15:08:19 -03:00
Jason Gunthorpe
a2a2a69d14
Merge tag 'v5.15' into rdma.git for-next
...
Pull in the accepted for-rc patches as the next merge needs a newer base.
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-01 14:49:20 -03:00
Zhu Yanjun
9ed8110c9b
RDMA/irdma: optimize rx path by removing unnecessary copy
...
In the function irdma_post_recv, the function irdma_copy_sg_list is
not needed since the struct irdma_sge and ib_sge have the similar
member variables. The struct irdma_sge can be replaced with the
struct ib_sge totally.
This can increase the rx performance of irdma.
Link: https://lore.kernel.org/r/20211030104226.253346-1-yanjun.zhu@linux.dev
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev >
Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-11-01 14:39:33 -03:00
Chengchang Tang
6d202d9f70
RDMA/hns: Use the core code to manage the fixed mmap entries
...
Add a new implementation for mmap by using the new mmap entry API. This
makes way for further use of the dynamic mmap allocator in this driver.
Link: https://lore.kernel.org/r/20211028105640.1056-1-liangwenpeng@huawei.com
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com >
Signed-off-by: Yixing Liu <liuyixing1@huawei.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-29 14:07:31 -03:00
Scott Breyer
840f4ed2d4
IB/qib: Rebranding of qib driver to Cornelis Networks
...
Changes instances of Intel to Cornelis in identifying strings
Link: https://lore.kernel.org/r/20211028124606.26694.71567.stgit@awfm-01.cornelisnetworks.com
Signed-off-by: Scott Breyer <scott.breyer@cornelisnetworks.com >
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-29 13:30:43 -03:00
Scott Breyer
ddf65f28dd
IB/hfi1: Rebranding of hfi1 driver to Cornelis Networks
...
Changes instances of Intel to Cornelis in identifying strings
Link: https://lore.kernel.org/r/20211028124601.26694.35662.stgit@awfm-01.cornelisnetworks.com
Signed-off-by: Scott Breyer <scott.breyer@cornelisnetworks.com >
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-29 13:30:43 -03:00
Kamal Heib
493620b1c9
RDMA/bnxt_re: Use helper function to set GUIDs
...
Use addrconf_addr_eui48() helper function to set the GUIDs and remove the
driver specific version.
Link: https://lore.kernel.org/r/20211028094359.160407-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-29 13:24:09 -03:00
Kamal Heib
04567caf96
RDMA/bnxt_re: Fix kernel panic when trying to access bnxt_re_stat_descs
...
For some reason when introducing the fixed commit the "active_pds" and
"active_ahs" descriptors got dropped, which lead to the following panic
when trying to access the first entry in the descriptors.
bnxt_re: Broadcom NetXtreme-C/E RoCE Driver
BUG: kernel NULL pointer dereference, address: 0000000000000000
CPU: 2 PID: 594 Comm: kworker/u32:1 Not tainted 5.15.0-rc6+ #2
Hardware name: Dell Inc. PowerEdge R430/0CN7X8, BIOS 2.12.1 12/07/2020
Workqueue: bnxt_re bnxt_re_task [bnxt_re]
RIP: 0010:strlen+0x0/0x20
Code: 48 89 f9 74 09 48 83 c1 01 80 39 00 75 f7 31 d2 44 0f b6 04 16 44 88 04 11 48 83 c2 01 45 84 c0 75 ee c3 0f 1f 80 00 00 00 00 <80> 3f 00 74 10 48 89 f8 48 83 c0 01 80 31
RSP: 0018:ffffb25fc47dfbb0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000008100
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 00000000fffffff4 R09: 0000000000000000
R10: ffff8a05c71fc028 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: ffff8a05c3dee800
FS: 0000000000000000(0000) GS:ffff8a092fc40000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000048d3da001 CR4: 00000000001706e0
Call Trace:
kernfs_name_hash+0x12/0x80
kernfs_find_ns+0x35/0xd0
kernfs_remove_by_name_ns+0x32/0x90
remove_files+0x2b/0x60
create_files+0x1d3/0x1f0
internal_create_group+0x17b/0x1f0
internal_create_groups.part.0+0x3d/0xa0
setup_port+0x180/0x3b0 [ib_core]
? __cond_resched+0x16/0x40
? kmem_cache_alloc_trace+0x278/0x3d0
ib_setup_port_attrs+0x99/0x240 [ib_core]
ib_register_device+0xcc/0x160 [ib_core]
bnxt_re_task+0xba/0x170 [bnxt_re]
process_one_work+0x1eb/0x390
worker_thread+0x53/0x3d0
? process_one_work+0x390/0x390
kthread+0x10f/0x130
? set_kthread_struct+0x40/0x40
ret_from_fork+0x22/0x30
Fixes: 13f30b0fa0 ("RDMA/counter: Add a descriptor in struct rdma_hw_stats")
Link: https://lore.kernel.org/r/20211027205448.127821-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Reviewed-by: Devesh Sharma <devesh.s.sharma@oracle.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-29 12:10:33 -03:00
Alok Prasad
4f960393a0
RDMA/qedr: Fix NULL deref for query_qp on the GSI QP
...
This patch fixes a crash caused by querying the QP via netlink, and
corrects the state of GSI qp. GSI qp's have a NULL qed_qp.
The call trace is generated by:
$ rdma res show
BUG: kernel NULL pointer dereference, address: 0000000000000034
Hardware name: Dell Inc. PowerEdge R720/0M1GCR, BIOS 1.2.6 05/10/2012
RIP: 0010:qed_rdma_query_qp+0x33/0x1a0 [qed]
RSP: 0018:ffffba560a08f580 EFLAGS: 00010206
RAX: 0000000200000000 RBX: ffffba560a08f5b8 RCX: 0000000000000000
RDX: ffffba560a08f5b8 RSI: 0000000000000000 RDI: ffff9807ee458090
RBP: ffffba560a08f5a0 R08: 0000000000000000 R09: ffff9807890e7048
R10: ffffba560a08f658 R11: 0000000000000000 R12: 0000000000000000
R13: ffff9807ee458090 R14: ffff9807f0afb000 R15: ffffba560a08f7ec
FS: 00007fbbf8bfe740(0000) GS:ffff980aafa00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000034 CR3: 00000001720ba001 CR4: 00000000000606f0
Call Trace:
qedr_query_qp+0x82/0x360 [qedr]
ib_query_qp+0x34/0x40 [ib_core]
? ib_query_qp+0x34/0x40 [ib_core]
fill_res_qp_entry_query.isra.26+0x47/0x1d0 [ib_core]
? __nla_put+0x20/0x30
? nla_put+0x33/0x40
fill_res_qp_entry+0xe3/0x120 [ib_core]
res_get_common_dumpit+0x3f8/0x5d0 [ib_core]
? fill_res_cm_id_entry+0x1f0/0x1f0 [ib_core]
nldev_res_get_qp_dumpit+0x1a/0x20 [ib_core]
netlink_dump+0x156/0x2f0
__netlink_dump_start+0x1ab/0x260
rdma_nl_rcv+0x1de/0x330 [ib_core]
? nldev_res_get_cm_id_dumpit+0x20/0x20 [ib_core]
netlink_unicast+0x1b8/0x270
netlink_sendmsg+0x33e/0x470
sock_sendmsg+0x63/0x70
__sys_sendto+0x13f/0x180
? setup_sgl.isra.12+0x70/0xc0
__x64_sys_sendto+0x28/0x30
do_syscall_64+0x3a/0xb0
entry_SYSCALL_64_after_hwframe+0x44/0xae
Cc: stable@vger.kernel.org
Fixes: cecbcddf64 ("qedr: Add support for QP verbs")
Link: https://lore.kernel.org/r/20211027184329.18454-1-palok@marvell.com
Signed-off-by: Ariel Elior <aelior@marvell.com >
Signed-off-by: Shai Malin <smalin@marvell.com >
Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com >
Signed-off-by: Alok Prasad <palok@marvell.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-29 11:54:16 -03:00
Yixing Liu
0e60778efb
RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility
...
The upper limit of MAX_LP_MSG_LEN on HIP08 is 64K, and the upper limit on
HIP09 is 16K. Regardless of whether it is HIP08 or HIP09, only 16K will be
used. In order to ensure compatibility, it is unified to 16K.
Setting MAX_LP_MSG_LEN to 16K will not cause performance loss on HIP08.
Fixes: fbed9d2be2 ("RDMA/hns: Fix configuration of ack_req_freq in QPC")
Link: https://lore.kernel.org/r/20211029100537.27299-1-liangwenpeng@huawei.com
Signed-off-by: Yixing Liu <liuyixing1@huawei.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-29 11:51:47 -03:00
Haoyue Xu
571fb4fb78
RDMA/hns: Fix initial arm_st of CQ
...
We set the init CQ status to ARMED before. As a result, an unexpected CEQE
would be reported. Therefore, the init CQ status should be set to no_armed
rather than REG_NXT_CEQE.
Fixes: a5073d6054 ("RDMA/hns: Add eq support of hip08")
Link: https://lore.kernel.org/r/20211029095846.26732-1-liangwenpeng@huawei.com
Signed-off-by: Haoyue Xu <xuhaoyue1@hisilicon.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-29 11:51:34 -03:00
Jakub Kicinski
7df621a3ee
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
...
include/net/sock.h
7b50ecfcc6 ("net: Rename ->stream_memory_read to ->sock_is_readable")
4c1e34c0db ("vsock: Enable y2038 safe timeval for timeout")
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
0daa55d033 ("octeontx2-af: cn10k: debugfs for dumping LMTST map table")
e77bcdd1f6 ("octeontx2-af: Display all enabled PF VF rsrc_alloc entries.")
Adjacent code addition in both cases, keep both.
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2021-10-28 10:43:58 -07:00
Zhu Yanjun
50604757e7
RDMA/irdma: Remove the unused variable local_qp
...
Since the member variable local_qp is not used, remove it.
Link: https://lore.kernel.org/r/20211027175457.201822-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 >
2021-10-28 08:58:26 -03:00
Gal Pressman
66f4817b57
RDMA/efa: Add support for dmabuf memory regions
...
Implement a dmabuf importer for the EFA driver. As ODP is not supported,
the pinned dmabuf are used to prevent the move_notify callback from being
called.
Link: https://lore.kernel.org/r/20211012120903.96933-4-galpress@amazon.com
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-28 08:58:26 -03:00
Saeed Mahameed
573bce9e67
Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into net-next
...
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com >
2021-10-27 21:33:28 -07:00
Kamal Heib
e058953c0e
RDMA/qedr: Remove unsupported qedr_resize_cq callback
...
There is no need to return always zero for function which is not
supported, especially since 0 is the wrong return code.
Fixes: a7efd7773e ("qedr: Add support for PD,PKEY and CQ verbs")
Link: https://lore.kernel.org/r/20211025062632.3960-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-25 14:56:55 -03:00
Zhu Yanjun
86479f8a3f
RDMA/irdma: Remove the unused spin lock in struct irdma_qp_uk
...
The spin lock in struct irdma_qp_uk is not used. So remove it.
Link: https://lore.kernel.org/r/20211021230612.153812-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 >
2021-10-25 14:36:58 -03:00
Jakub Kicinski
fd92213e9a
RDMA: Constify netdev->dev_addr accesses
...
netdev->dev_addr will become const soon, make sure drivers propagate the
qualifier.
Link: https://lore.kernel.org/r/20211019182604.1441387-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
Reviewed-by: Leon Romanovsky <leonro@nvidia.com >
Acked-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-25 14:33:09 -03:00
Arnd Bergmann
97ad8c8c71
RDMA/mlx5: fix build error with INFINIBAND_USER_ACCESS=n
...
The mlx5_ib_fs_add_op_fc/mlx5_ib_fs_remove_op_fc functions are only
available when user access is enabled, without that we run into a link
error:
ERROR: modpost: "mlx5_ib_fs_add_op_fc" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined!
ERROR: modpost: "mlx5_ib_fs_remove_op_fc" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined!
Conditionally compiling the newly added code section makes it build,
though this is probably not a correct fix.
Fixes: a29b934ceb ("RDMA/mlx5: Add modify_op_stat() support")
Link: https://lore.kernel.org/r/20211019061602.3062196-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Acked-by: Leon Romanovsky <leonro@nvidia.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-25 14:16:05 -03:00
Leon Romanovsky
60dd57c747
Merge brank 'mlx5_mkey' into rdma.git for-next
...
A small series to clean up the mlx5 mkey code across the mlx5_core and
InfiniBand.
* branch 'mlx5_mkey':
RDMA/mlx5: Attach ndescs to mlx5_ib_mkey
RDMA/mlx5: Move struct mlx5_core_mkey to mlx5_ib
RDMA/mlx5: Replace struct mlx5_core_mkey by u32 key
RDMA/mlx5: Remove pd from struct mlx5_core_mkey
RDMA/mlx5: Remove size from struct mlx5_core_mkey
RDMA/mlx5: Remove iova from struct mlx5_core_mkey
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
2021-10-21 08:27:39 +03:00
Zhu Yanjun
dede33da0d
RDMA/irdma: Make irdma_uk_cq_init() return a void
...
The function irdma_uk_cq_init always returns 0, so make it void and delete
all the return value checks.
Link: https://lore.kernel.org/r/20211019153717.3836-1-yanjun.zhu@linux.dev
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev >
Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-20 19:54:16 -03:00
Mustafa Ismail
2dace185ca
RDMA/irdma: Do not hold qos mutex twice on QP resume
...
When irdma_ws_add fails, irdma_ws_remove is used to cleanup the leaf node.
This lead to holding the qos mutex twice in the QP resume path. Fix this
by avoiding the call to irdma_ws_remove and unwinding the error in
irdma_ws_add. This skips the call to irdma_tc_in_use function which is not
needed in the error unwind cases.
Fixes: 3ae331c751 ("RDMA/irdma: Add QoS definitions")
Link: https://lore.kernel.org/r/20211019151654.1943-2-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 >
2021-10-19 20:22:01 -03:00