Danit Goldberg
ff3195b3ed
IB/mlx4: Update HW GID table while adding vlan GID
...
When adding a new GID compare the vlan along with the GID and type. This
allows vlan's to have GIDs that alias each other, such as the default
GID. Otherwise they the GID cache view can become inconsistent with the HW
view.
Link: https://lore.kernel.org/r/20191115154457.247763-1-leon@kernel.org
Signed-off-by: Danit Goldberg <danitg@mellanox.com >
Reviewed-by: Parav Pandit <parav@mellanox.com >
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-19 15:58:55 -04:00
Christophe JAILLET
9067f2f0b4
RDMA/iw_cgxb4: Fix an error handling path in 'c4iw_connect()'
...
We should jump to fail3 in order to undo the 'xa_insert_irq()' call.
Link: https://lore.kernel.org/r/20190923190746.10964-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-17 10:37:00 -04:00
Christoph Hellwig
72b894b09a
IB/umem: remove the dmasync argument to ib_umem_get
...
The argument is always ignored, so remove it.
Link: https://lore.kernel.org/r/20191113073214.9514-3-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de >
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com >
Acked-by: Michal Kalderon <michal.kalderon@marvell.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-17 10:37:00 -04:00
David S. Miller
19b7e21c55
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
...
Lots of overlapping changes and parallel additions, stuff
like that.
Signed-off-by: David S. Miller <davem@davemloft.net >
2019-11-16 21:51:42 -08:00
Gal Pressman
64c264872b
RDMA/efa: Clear the admin command buffer prior to its submission
...
We cannot rely on the entry memcpy as we only copy the actual size of the
command, the rest of the bytes must be memset to zero.
Currently providing non-zero memory will not have any user visible impact.
However, since admin commands are extendable (in a backwards compatible
way) everything beyond the size of the command must be cleared to prevent
issues in the future.
Fixes: 0420e54256
("RDMA/efa: Implement functions that submit and complete admin commands")
Link: https://lore.kernel.org/r/20191112092608.46964-1-galpress@amazon.com
Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Reviewed-by: Firas JahJah <firasj@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-14 11:57:33 -04:00
Kamal Heib
9a5407d74c
RDMA/qedr: Make qedr_iw_load_qp() static
...
The function qedr_iw_load_qp() is only used in qedr_iw_cm.c
Fixes: 82af6d19d8
("RDMA/qedr: Fix synchronization methods and memory leaks in qedr")
Link: https://lore.kernel.org/r/20191110113645.20058-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Acked-by: Michal Kalderon <michal.kalderon@marvell.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-14 11:55:31 -04:00
Colin Ian King
6296665cee
RDMA/ocrdma: Fix spelling mistake in variable name
...
There is a spelling mistake in the variable nak_invalid_requst_errors,
rename it to nak_invalid_request_errors.
Link: https://lore.kernel.org/r/20191107224855.417647-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-14 11:51:42 -04:00
Viresh Kumar
7ee23491b3
RDMA/qib: Validate ->show()/store() callbacks before calling them
...
The permissions of the read-only or write-only sysfs files can be
changed (as root) and the user can then try to read a write-only file or
write to a read-only file which will lead to kernel crash here.
Protect against that by always validating the show/store callbacks.
Link: https://lore.kernel.org/r/d45cc26361a174ae12dbb86c994ef334d257924b.1573096807.git.viresh.kumar@linaro.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org >
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-14 11:49:15 -04:00
Pan Bian
da046d5f89
RDMA/i40iw: Fix potential use after free
...
Release variable dst after logging dst->error to avoid possible use after
free.
Link: https://lore.kernel.org/r/1573022651-37171-1-git-send-email-bianpan2016@163.com
Signed-off-by: Pan Bian <bianpan2016@163.com >
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-14 11:47:18 -04:00
Pan Bian
960657b732
RDMA/qedr: Fix potential use after free
...
Move the release operation after error log to avoid possible use after
free.
Link: https://lore.kernel.org/r/1573021434-18768-1-git-send-email-bianpan2016@163.com
Signed-off-by: Pan Bian <bianpan2016@163.com >
Acked-by: Michal Kalderon <michal.kalderon@marvell.com >
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-14 11:47:18 -04:00
Saeed Mahameed
c94ef13b04
Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux
...
1) New generic devlink param "enable_roce", for downstream devlink
reload support
2) Do vport ACL configuration on per vport basis when
enabling/disabling a vport. This enables to have vports enabled/disabled
outside of eswitch config for future
3) Split the code for legacy vs offloads mode and make it clear
4) Tide up vport locking and workqueue usage
5) Fix metadata enablement for ECPF
6) Make explicit use of VF property to publish IB_DEVICE_VIRTUAL_FUNCTION
7) E-Switch and flow steering core low level support and refactoring for
netfilter flowtables offload
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com >
2019-11-13 14:24:58 -08:00
Yevgeny Kliteynik
208d70f562
IB/mlx5: Support flow counters offset for bulk counters
...
Add support for flow steering counters action with a non-base counter
ID (offset) for bulk counters.
When creating a flow counter object, save the bulk value. This value is
used when a flow action with a non-base counter ID is requested - to
validate that the required offset is in the range of the allocated bulk.
Link: https://lore.kernel.org/r/20191103140723.77411-1-leon@kernel.org
Signed-off-by: Yevgeny Kliteynik <kliteyn@mellanox.com >
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Reviewed-by: Mark Bloch <markb@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-13 15:42:36 -04:00
Leon Romanovsky
e26e7b88f6
RDMA: Change MAD processing function to remove extra casting and parameter
...
All users of process_mad() converts input pointers from ib_mad_hdr to be
ib_mad, update the function declaration to use ib_mad directly.
Also remove not used input MAD size parameter.
Link: https://lore.kernel.org/r/20191029062745.7932-17-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Tested-By: Mike Marciniszyn <mike.marciniszyn@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-12 20:20:15 -04:00
Leon Romanovsky
333ee7e2d0
RDMA/hfi1: Delete unreachable code
...
All callers allocate MAD structures with proper sizes, there is no need to
recheck it.
Link: https://lore.kernel.org/r/20191029062745.7932-8-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-12 20:20:14 -04:00
Michael Guralnik
94de879c28
IB/mlx5: Load profile according to RoCE enablement state
...
When RoCE is disabled load mlx5_ib in raw_eth profile.
Clean pf_profile roce capability checks as it will not be used without
roce capability.
Signed-off-by: Michael Guralnik <michaelgur@mellanox.com >
Reviewed-by: Maor Gottlieb <maorg@mellanox.com >
Reviewed-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com >
2019-11-11 12:15:29 -08:00
Michael Guralnik
b5a498baf9
IB/mlx5: Rename profile and init methods
...
Rename uplink_rep_profile and its unique init and cleanup stages to
suit its upcoming use as the profile when RoCE is disabled.
Signed-off-by: Michael Guralnik <michaelgur@mellanox.com >
Reviewed-by: Maor Gottlieb <maorg@mellanox.com >
Reviewed-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com >
2019-11-11 12:15:29 -08:00
Wenpeng Liang
d11769fdc1
RDMA/hns: Modify appropriate printings
...
Modify some printings that is not in uniformed style, non-standard or with
spelling errors.
Link: https://lore.kernel.org/r/1572952082-6681-10-git-send-email-liweihang@hisilicon.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-08 16:37:55 -04:00
Yixian Liu
1ceb0b11a8
RDMA/hns: Fix non-standard error codes
...
It is better to return a linux error code than define a private constant.
Link: https://lore.kernel.org/r/1572952082-6681-9-git-send-email-liweihang@hisilicon.com
Signed-off-by: Yixian Liu <liuyixian@huawei.com >
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-08 16:37:54 -04:00
Lang Cheng
301cc7eb2c
RDMA/hns: Modify hns_roce_hw_v2_get_cfg to simplify the code
...
Merge base configuration of hr_dev into hns_roce_hw_v2_get_cfg(). In
addition, there is no need to return 0 at last, so we change return type
of it to void.
Link: https://lore.kernel.org/r/1572952082-6681-8-git-send-email-liweihang@hisilicon.com
Signed-off-by: Lang Cheng <chenglang@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-08 16:37:54 -04:00
Lang Cheng
880f133c60
RDMA/hns: Simplify doorbell initialization code
...
If a variable needs to be set to 0 before use, it can be directly
initialized to 0.
Link: https://lore.kernel.org/r/1572952082-6681-7-git-send-email-liweihang@hisilicon.com
Signed-off-by: Lang Cheng <chenglang@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-08 16:37:54 -04:00
Yixing Liu
6eef524201
RDMA/hns: Replace not intuitive function/macro names
...
Replace "sw2hw" and "hw2sw" which is hard to understand with "create" and
"destroy".
Link: https://lore.kernel.org/r/1572952082-6681-6-git-send-email-liweihang@hisilicon.com
Signed-off-by: Yixing Liu <liuyixing1@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-08 16:37:54 -04:00
Yixian Liu
d938d7856f
RDMA/hns: Modify fields of struct hns_roce_srq
...
Use wqe_cnt instead of max which means the queue size of srq, and remove
wqe_ctr which is not used.
Link: https://lore.kernel.org/r/1572952082-6681-5-git-send-email-liweihang@hisilicon.com
Signed-off-by: Yixian Liu <liuyixian@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-08 16:37:54 -04:00
Yixian Liu
03ccba5c2c
RDMA/hns: Delete unnecessary uar from hns_roce_cq
...
The uar information is already recorded in priv_uar of hns_roce_dev, there
is no need to record it in hns_roce_cq again.
Link: https://lore.kernel.org/r/1572952082-6681-4-git-send-email-liweihang@hisilicon.com
Signed-off-by: Yixian Liu <liuyixian@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-08 16:37:53 -04:00
Lang Cheng
16a11e0bff
RDMA/hns: Remove unnecessary structure hns_roce_sqp
...
Special QP have no differences with normal qp in data structure, so
definition of struct hns_roce_sqp should be removed and replaced by struct
hns_roce_qp.
Link: https://lore.kernel.org/r/1572952082-6681-3-git-send-email-liweihang@hisilicon.com
Signed-off-by: Lang Cheng <chenglang@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-08 16:37:53 -04:00
Yixian Liu
ec6adad0a1
RDMA/hns: Delete unnecessary variable max_post
...
There is no need to define max_post in hns_roce_wq, as it does same thing
as wqe_cnt.
Link: https://lore.kernel.org/r/1572952082-6681-2-git-send-email-liweihang@hisilicon.com
Signed-off-by: Yixian Liu <liuyixian@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-08 16:37:53 -04:00
Leon Romanovsky
ffa2fd1323
RDMA/mlx5: Rewrite MAD processing logic to be readable
...
Multiple "if"s and "||" make extension of process_mad() function
as a tedious task, rewrite that function to be more readable.
Link: https://lore.kernel.org/r/20191029062745.7932-14-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 16:00:06 -04:00
Leon Romanovsky
84b56d57cf
RDMA/ocrdma: Simplify process_mad function
...
Change the switch with one case into a simple if statement so the code is
less confusing.
Link: https://lore.kernel.org/r/20191029062745.7932-12-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 16:00:06 -04:00
Leon Romanovsky
dd0b0159f7
RDMA/mad: Do not check MAD sizes in roce and ib drivers
...
All callers for process_mad allocate MAD structures with proper sizes,
there is no need to recheck it.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 15:55:22 -04:00
Leon Romanovsky
6a42265c91
RDMA/ocrdma: Make ocrdma_pma_counters() return void
...
This function always returns 0, so just use void and remove the bogus
checking at the only call site.
Link: https://lore.kernel.org/r/20191029062745.7932-6-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 15:38:57 -04:00
Leon Romanovsky
be4a8d4673
RDMA/mad: Allocate zeroed MAD buffer
...
Ensure that MAD output buffer is zero-based allocated in all the callers
of process_mad and remove the various memset()'s from the drivers.
Link: https://lore.kernel.org/r/20191029062745.7932-3-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 15:38:28 -04:00
Leon Romanovsky
874e476ba9
RDMA/qib: Delete empty check_cc_key function
...
Function always returns zero, just delete it.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 15:25:24 -04:00
Leon Romanovsky
688eec9d3d
RDMA/qib: Delete extra line
...
Trivial cleanup to fix the following warning:
drivers/infiniband/hw/qib/qib_iba6120.c:1420: warning: bad line:
Fixes: f931551baf
("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
Link: https://lore.kernel.org/r/20191029062745.7932-15-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 15:19:33 -04:00
Wenpeng Liang
411c1e6774
RDMA/hns: Correct the value of srq_desc_size
...
srq_desc_size should be rounded up to pow of two before used, or related
calculation may cause allocating wrong size of memory for srq buffer.
Fixes: c7bcb13442
("RDMA/hns: Add SRQ support for hip08 kernel mode")
Link: https://lore.kernel.org/r/1572575610-52530-3-git-send-email-liweihang@hisilicon.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:37:02 -04:00
Sirong Wang
531eb45b3d
RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN
...
Size of pointer to buf field of struct hns_roce_hem_chunk should be
considered when calculating HNS_ROCE_HEM_CHUNK_LEN, or sg table size will
be larger than expected when allocating hem.
Fixes: 9a4435375c
("IB/hns: Add driver files for hns RoCE driver")
Link: https://lore.kernel.org/r/1572575610-52530-2-git-send-email-liweihang@hisilicon.com
Signed-off-by: Sirong Wang <wangsirong@huawei.com >
Signed-off-by: Weihang Li <liweihang@hisilicon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:37:02 -04:00
Kamal Heib
ad0593ec89
RDMA/qedr: Remove unsupported modify_port callback
...
There is no need to return always zero for function which is not
supported.
Fixes: ac1b36e55a
("qedr: Add support for user context verbs")
Link: https://lore.kernel.org/r/20191028155931.1114-5-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:30:24 -04:00
Kamal Heib
6135b71159
RDMA/ocrdma: Remove unsupported modify_port callback
...
There is no need to return always zero for function which is not
supported.
Fixes: fe2caefcdf
("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter")
Link: https://lore.kernel.org/r/20191028155931.1114-4-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:29:15 -04:00
Kamal Heib
25f3b49b92
RDMA/hns: Remove unsupported modify_port callback
...
There is no need to return always zero for function which is not
supported.
Fixes: 9a4435375c
("IB/hns: Add driver files for hns RoCE driver")
Link: https://lore.kernel.org/r/20191028155931.1114-3-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com >
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:29:15 -04:00
Kaike Wan
ce8e8087cf
IB/hfi1: TID RDMA WRITE should not return IB_WC_RNR_RETRY_EXC_ERR
...
Normal RDMA WRITE request never returns IB_WC_RNR_RETRY_EXC_ERR to ULPs
because it does not need post receive buffer on the responder side.
Consequently, as an enhancement to normal RDMA WRITE request inside the
hfi1 driver, TID RDMA WRITE request should not return such an error status
to ULPs, although it does receive RNR NAKs from the responder when TID
resources are not available. This behavior is violated when
qp->s_rnr_retry_cnt is set in current hfi1 implementation.
This patch enforces these semantics by avoiding any reaction to the updates
of the RNR QP attributes.
Fixes: 3c6cb20a0d
("IB/hfi1: Add TID RDMA WRITE functionality into RDMA verbs")
Link: https://lore.kernel.org/r/20191025195842.106825.71532.stgit@awfm-01.aw.intel.com
Cc: <stable@vger.kernel.org >
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com >
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com >
Signed-off-by: Kaike Wan <kaike.wan@intel.com >
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:15:36 -04:00
Kaike Wan
c2be3865a1
IB/hfi1: Calculate flow weight based on QP MTU for TID RDMA
...
For a TID RDMA WRITE request, a QP on the responder side could be put into
a queue when a hardware flow is not available. A RNR NAK will be returned
to the requester with a RNR timeout value based on the position of the QP
in the queue. The tid_rdma_flow_wt variable is used to calculate the
timeout value and is determined by using a MTU of 4096 at the module
loading time. This could reduce the timeout value by half from the desired
value, leading to excessive RNR retries.
This patch fixes the issue by calculating the flow weight with the real
MTU assigned to the QP.
Fixes: 07b923701e
("IB/hfi1: Add functions to receive TID RDMA WRITE request")
Link: https://lore.kernel.org/r/20191025195836.106825.77769.stgit@awfm-01.aw.intel.com
Cc: <stable@vger.kernel.org >
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com >
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com >
Signed-off-by: Kaike Wan <kaike.wan@intel.com >
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:15:36 -04:00
Kaike Wan
c1abd865bd
IB/hfi1: Ensure r_tid_ack is valid before building TID RDMA ACK packet
...
The index r_tid_ack is used to indicate the next TID RDMA WRITE request to
acknowledge in the ring s_ack_queue[] on the responder side and should be
set to a valid index other than its initial value before r_tid_tail is
advanced to the next TID RDMA WRITE request and particularly before a TID
RDMA ACK is built. Otherwise, a NULL pointer dereference may result:
BUG: unable to handle kernel paging request at ffff9a32d27abff8
IP: [<ffffffffc0d87ea6>] hfi1_make_tid_rdma_pkt+0x476/0xcb0 [hfi1]
PGD 2749032067 PUD 0
Oops: 0000 1 SMP
Modules linked in: osp(OE) ofd(OE) lfsck(OE) ost(OE) mgc(OE) osd_zfs(OE) lquota(OE) lustre(OE) lmv(OE) mdc(OE) lov(OE) fid(OE) fld(OE) ko2iblnd(OE) ptlrpc(OE) obdclass(OE) lnet(OE) libcfs(OE) ib_ipoib(OE) hfi1(OE) rdmavt(OE) nfsv3 nfs_acl rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache ib_isert iscsi_target_mod target_core_mod ib_ucm dm_mirror dm_region_hash dm_log mlx5_ib dm_mod zfs(POE) rpcrdma sunrpc rdma_ucm ib_uverbs opa_vnic ib_iser zunicode(POE) ib_umad zavl(POE) icp(POE) sb_edac intel_powerclamp coretemp rdma_cm intel_rapl iosf_mbi iw_cm libiscsi scsi_transport_iscsi kvm ib_cm iTCO_wdt mxm_wmi iTCO_vendor_support irqbypass crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd zcommon(POE) znvpair(POE) pcspkr spl(OE) mei_me
sg mei ioatdma lpc_ich joydev i2c_i801 shpchp ipmi_si ipmi_devintf ipmi_msghandler wmi acpi_power_meter ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic mgag200 mlx5_core drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ixgbe ahci ttm mlxfw ib_core libahci devlink mdio crct10dif_pclmul crct10dif_common drm ptp libata megaraid_sas crc32c_intel i2c_algo_bit pps_core i2c_core dca [last unloaded: rdmavt]
CPU: 15 PID: 68691 Comm: kworker/15:2H Kdump: loaded Tainted: P W OE ------------ 3.10.0-862.2.3.el7_lustre.x86_64 #1
Hardware name: Intel Corporation S2600WTT/S2600WTT, BIOS SE5C610.86B.01.01.0016.033120161139 03/31/2016
Workqueue: hfi0_0 _hfi1_do_tid_send [hfi1]
task: ffff9a01f47faf70 ti: ffff9a11776a8000 task.ti: ffff9a11776a8000
RIP: 0010:[<ffffffffc0d87ea6>] [<ffffffffc0d87ea6>] hfi1_make_tid_rdma_pkt+0x476/0xcb0 [hfi1]
RSP: 0018:ffff9a11776abd08 EFLAGS: 00010002
RAX: ffff9a32d27abfc0 RBX: ffff99f2d27aa000 RCX: 00000000ffffffff
RDX: 0000000000000000 RSI: 0000000000000220 RDI: ffff99f2ffc05300
RBP: ffff9a11776abd88 R08: 000000000001c310 R09: ffffffffc0d87ad4
R10: 0000000000000000 R11: 0000000000000000 R12: ffff9a117a423c00
R13: ffff9a117a423c00 R14: ffff9a03500c0000 R15: ffff9a117a423cb8
FS: 0000000000000000(0000) GS:ffff9a117e9c0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff9a32d27abff8 CR3: 0000002748a0e000 CR4: 00000000001607e0
Call Trace:
[<ffffffffc0d88874>] _hfi1_do_tid_send+0x194/0x320 [hfi1]
[<ffffffffaf0b2dff>] process_one_work+0x17f/0x440
[<ffffffffaf0b3ac6>] worker_thread+0x126/0x3c0
[<ffffffffaf0b39a0>] ? manage_workers.isra.24+0x2a0/0x2a0
[<ffffffffaf0bae31>] kthread+0xd1/0xe0
[<ffffffffaf0bad60>] ? insert_kthread_work+0x40/0x40
[<ffffffffaf71f5f7>] ret_from_fork_nospec_begin+0x21/0x21
[<ffffffffaf0bad60>] ? insert_kthread_work+0x40/0x40
hfi1 0000:05:00.0: hfi1_0: reserved_op: opcode 0xf2, slot 2, rsv_used 1, rsv_ops 1
Code: 00 00 41 8b 8d d8 02 00 00 89 c8 48 89 45 b0 48 c1 65 b0 06 48 8b 83 a0 01 00 00 48 01 45 b0 48 8b 45 b0 41 80 bd 10 03 00 00 00 <48> 8b 50 38 4c 8d 7a 50 74 45 8b b2 d0 00 00 00 85 f6 0f 85 72
RIP [<ffffffffc0d87ea6>] hfi1_make_tid_rdma_pkt+0x476/0xcb0 [hfi1]
RSP <ffff9a11776abd08>
CR2: ffff9a32d27abff8
This problem can happen if a RESYNC request is received before r_tid_ack
is modified.
This patch fixes the issue by making sure that r_tid_ack is set to a valid
value before a TID RDMA ACK is built. Functions are defined to simplify
the code.
Fixes: 07b923701e
("IB/hfi1: Add functions to receive TID RDMA WRITE request")
Fixes: 7cf0ad679d
("IB/hfi1: Add a function to receive TID RDMA RESYNC packet")
Link: https://lore.kernel.org/r/20191025195830.106825.44022.stgit@awfm-01.aw.intel.com
Cc: <stable@vger.kernel.org >
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com >
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com >
Signed-off-by: Kaike Wan <kaike.wan@intel.com >
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:15:35 -04:00
James Erwin
a9c3c4c597
IB/hfi1: Ensure full Gen3 speed in a Gen4 system
...
If an hfi1 card is inserted in a Gen4 systems, the driver will avoid the
gen3 speed bump and the card will operate at half speed.
This is because the driver avoids the gen3 speed bump when the parent bus
speed isn't identical to gen3, 8.0GT/s. This is not compatible with gen4
and newer speeds.
Fix by relaxing the test to explicitly look for the lower capability
speeds which inherently allows for gen4 and all future speeds.
Fixes: 7724105686
("IB/hfi1: add driver files")
Link: https://lore.kernel.org/r/20191101192059.106248.1699.stgit@awfm-01.aw.intel.com
Cc: <stable@vger.kernel.org >
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com >
Reviewed-by: Kaike Wan <kaike.wan@intel.com >
Signed-off-by: James Erwin <james.erwin@intel.com >
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com >
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:13:43 -04:00
Michal Kalderon
b4bc766097
RDMA/qedr: Add iWARP doorbell recovery support
...
This patch adds the iWARP specific doorbells to the doorbell recovery
mechanism.
Link: https://lore.kernel.org/r/20191030094417.16866-9-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com >
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:08:01 -04:00
Michal Kalderon
97f6125092
RDMA/qedr: Add doorbell overflow recovery support
...
Use the doorbell recovery mechanism to register rdma related doorbells
that will be restored in case there is a doorbell overflow attention.
Link: https://lore.kernel.org/r/20191030094417.16866-8-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com >
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:08:01 -04:00
Michal Kalderon
4c6bb02d59
RDMA/qedr: Use the common mmap API
...
Remove all functions related to mmap from qedr and use the common API.
Link: https://lore.kernel.org/r/20191030094417.16866-7-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com >
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:08:01 -04:00
Michal Kalderon
e84d3c184e
RDMA/efa: Use the common mmap_xa helpers
...
Remove the functions related to managing the mmap_xa database. This code
was replaced with common code in ib_core.
Link: https://lore.kernel.org/r/20191030094417.16866-5-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com >
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:08:01 -04:00
Michal Kalderon
c043ff2cfb
RDMA: Connect between the mmap entry and the umap_priv structure
...
The rdma_user_mmap_io interface created a common interface for drivers to
correctly map hw resources and zap them once the ucontext is destroyed
enabling the drivers to safely free the hw resources.
However, this meant the drivers need to delay freeing the resource to the
ucontext destroy phase to ensure they were no longer mapped. The new
mechanism for a common way of handling user/driver address mapping enabled
notifying the driver if all umap_priv mappings were removed, and enabled
freeing the hw resources when they are done with and not delay it until
ucontext destroy.
Since not all drivers use the mechanism, NULL can be sent to the
rdma_user_mmap_io interface to continue working as before. Drivers that
use the mmap_xa interface can pass the entry being mapped to the
rdma_user_mmap_io function to be linked together.
Link: https://lore.kernel.org/r/20191030094417.16866-4-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com >
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com >
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-06 13:08:01 -04:00
Greg Kroah-Hartman
09b0965ee8
IB: mlx5: no need to check return value of debugfs_create functions
...
When calling debugfs functions, there is no need to ever check the
return value. The function can work or not, but the code logic should
never do something different based on this.
Cc: Leon Romanovsky <leon@kernel.org >
Cc: Doug Ledford <dledford@redhat.com >
Cc: Jason Gunthorpe <jgg@ziepe.ca >
Cc: linux-rdma@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-04 08:38:58 +01:00
Parav Pandit
e53a9d26cf
IB/mlx5: Introduce and use mlx5_core_is_vf()
...
Instead of deciding a given device is virtual function or
not based on a device is PF or not, use already defined
MLX5_COREDEV_VF by introducing an helper API mlx5_core_is_vf().
This enables to clearly identify PF, VF and non virtual functions.
Signed-off-by: Parav Pandit <parav@mellanox.com >
Reviewed-by: Vu Pham <vuhuong@mellanox.com >
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com >
2019-11-01 14:40:27 -07:00
Michael Guralnik
11f552e217
IB/mlx5: Test write combining support
...
Linux can run in all sorts of physical machines and VMs where write
combining may or may not be supported. Currently there is no way to
reliably tell if the system supports WC, or not. The driver uses WC to
optimize posting work to the HCA, and getting this wrong in either
direction can cause a significant performance loss.
Add a test in mlx5_ib initialization process to test whether
write-combining is supported on the machine. The test will run as part of
the enable_driver callback to ensure that the test runs after the device
is setup and can create and modify the QP needed, but runs before the
device is exposed to the users.
The test opens UD QP and posts NOP WQEs, the WQE written to the BlueFlame
is different from the WQE in memory, requesting CQE only on the BlueFlame
WQE. By checking whether we received a completion on one of these WQEs we
can know if BlueFlame succeeded and this write-combining must be
supported.
Change reporting of BlueFlame support to be dependent on write-combining
support instead of the FW's guess as to what the machine can do.
Link: https://lore.kernel.org/r/20191027062234.10993-1-leon@kernel.org
Signed-off-by: Michael Guralnik <michaelgur@mellanox.com >
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-10-31 15:52:51 -03:00
Leon Romanovsky
546d30099e
RDMA/mlx5: Return proper error value
...
Returned value from mlx5_mr_cache_alloc() is checked to be error or real
pointer. Return proper error code instead of NULL which is not checked
later.
Fixes: 81713d3788
("IB/mlx5: Add implicit MR support")
Link: https://lore.kernel.org/r/20191029055721.7192-1-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com >
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-10-31 15:31:49 -03:00