Skip to content

Commit 107dd7b

Browse files
MarkZhang81jgunthorpe
authored andcommitted
IB/cm: Cancel mad on the DREQ event when the state is MRA_REP_RCVD
On the passive side when the disconnectReq event comes, if the current state is MRA_REP_RCVD, it needs to cancel the MAD before entering the DREQ_RCVD and TIMEWAIT states, otherwise the destroy_id may block until this mad will reach timeout. Fixes: a977049 ("[PATCH] IB: Add the kernel CM implementation") Link: https://lore.kernel.org/r/75261c00c1d82128b1d981af9ff46e994186e621.1649062436.git.leonro@nvidia.com Signed-off-by: Mark Zhang <markzhang@nvidia.com> Reviewed-by: Maor Gottlieb <maorg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 1d735ee commit 107dd7b

File tree

1 file changed

+1
-2
lines changed
  • drivers/infiniband/core

1 file changed

+1
-2
lines changed

drivers/infiniband/core/cm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,15 +2824,14 @@ static int cm_dreq_handler(struct cm_work *work)
28242824
switch (cm_id_priv->id.state) {
28252825
case IB_CM_REP_SENT:
28262826
case IB_CM_DREQ_SENT:
2827+
case IB_CM_MRA_REP_RCVD:
28272828
ib_cancel_mad(cm_id_priv->msg);
28282829
break;
28292830
case IB_CM_ESTABLISHED:
28302831
if (cm_id_priv->id.lap_state == IB_CM_LAP_SENT ||
28312832
cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD)
28322833
ib_cancel_mad(cm_id_priv->msg);
28332834
break;
2834-
case IB_CM_MRA_REP_RCVD:
2835-
break;
28362835
case IB_CM_TIMEWAIT:
28372836
atomic_long_inc(&work->port->counters[CM_RECV_DUPLICATES]
28382837
[CM_DREQ_COUNTER]);

0 commit comments

Comments
 (0)