linux_dsm_epyc7002/drivers/infiniband/hw/mlx4
Håkon Bugge 4542e3c79a IB/mlx4: Fix CM REQ retries in paravirt mode
CM REQs cannot be successfully retried, because a new pv_cm_id is
created for each request, without checking if one already exists.

By checking if an id exists before creating one, the bug is fixed.

This bug can be provoked by running an RDMA CM user-land application,
but inserting a five seconds delay before the rdma_accept() call on
the passive side. This delay is larger than the default CMA timeout,
and triggers a retry from the active side. The retried REQ will use
another pv_cm_id (the cm_id on the wire). This confuses the CM
protocol and two REJs are sent from the passive side.

Here is an excerpt from ibdump running without the patch:

3.285092       LID: 4 -> LID: 4       SDP 290 CM: ConnectRequest(SDP Hello)
7.382711       LID: 4 -> LID: 4       SDP 290 CM: ConnectRequest(SDP Hello)
7.382861       LID: 4 -> LID: 4       InfiniBand 290 CM: ConnectReject
7.387644       LID: 4 -> LID: 4       InfiniBand 290 CM: ConnectReject

and here is the same with bug fix applied:

3.251010       LID: 4 -> LID: 4       SDP 290 CM: ConnectRequest(SDP Hello)
7.349387       LID: 4 -> LID: 4       SDP 290 CM: ConnectRequest(SDP Hello)
8.258443       LID: 4 -> LID: 4       SDP 290 CM: ConnectReply(SDP Hello)
8.259890       LID: 4 -> LID: 4       InfiniBand 290 CM: ReadyToUse

Suggested-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Reported-by: Wei Lin Guay <wei.lin.guay@oracle.com>
Tested-by: Wei Lin Guay <wei.lin.guay@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Acked-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-07-20 11:20:50 -04:00
..
ah.c IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
alias_GUID.c IB: Query ports via the core instead of direct into the driver 2017-02-14 11:41:22 -05:00
cm.c IB/mlx4: Fix CM REQ retries in paravirt mode 2017-07-20 11:20:50 -04:00
cq.c {net, IB}/mlx4: Remove gfp flags argument 2017-07-17 21:21:24 -04:00
doorbell.c IB: Refactor umem to use linear SG table 2014-03-04 10:34:28 -08:00
Kconfig net: mellanox: add DEVLINK dependencies 2016-03-03 17:08:59 -05:00
mad.c RDMA/mlx4: Fix MAD tunneling when SRIOV is enabled 2017-06-01 17:04:51 -04:00
main.c IB: Convert msleep below 20ms to usleep_range 2017-07-17 21:21:22 -04:00
Makefile IB/mlx4: Add iov directory in sysfs under the ib device 2012-09-30 20:33:39 -07:00
mcg.c IB: Convert msleep below 20ms to usleep_range 2017-07-17 21:21:22 -04:00
mlx4_ib.h {net, IB}/mlx4: Remove gfp flags argument 2017-07-17 21:21:24 -04:00
mr.c IB: Replace ib_umem page_size by page_shift 2017-04-25 15:40:28 -04:00
qp.c {net, IB}/mlx4: Remove gfp flags argument 2017-07-17 21:21:24 -04:00
srq.c {net, IB}/mlx4: Remove gfp flags argument 2017-07-17 21:21:24 -04:00
sysfs.c IB: Query ports via the core instead of direct into the driver 2017-02-14 11:41:22 -05:00