Hi Doug, The issue is when you have a few QPs with the same rate limit you remove the rate twice from the table instead of once. This causes issue, no racing or stressing occurs. Rafi -----Original Message----- From: Doug Ledford <dledford@xxxxxxxxxx> Sent: Thursday, October 17, 2019 11:12 PM To: Leon Romanovsky <leon@xxxxxxxxxx>; Jason Gunthorpe <jgg@xxxxxxxxxxxx> Cc: Rafi Wiener <rafiw@xxxxxxxxxxxx>; RDMA mailing list <linux-rdma@xxxxxxxxxxxxxxx>; Bodong Wang <bodong@xxxxxxxxxxxx>; Oleg Kuporosov <olegk@xxxxxxxxxxxx>; Leon Romanovsky <leonro@xxxxxxxxxxxx> Subject: Re: [PATCH rdma-rc] RDMA/mlx5: Clear old rate limit when closing QP On Wed, 2019-10-02 at 15:02 +0300, Leon Romanovsky wrote: > From: Rafi Wiener <rafiw@xxxxxxxxxxxx> > > Before QP is closed it changes to ERROR state, when this happens the > QP was left with old rate limit that was already removed from the > table. > > Fixes: 7d29f349a4b9 ("IB/mlx5: Properly adjust rate limit on QP state > transitions") > Signed-off-by: Rafi Wiener <rafiw@xxxxxxxxxxxx> > Signed-off-by: Oleg Kuporosov <olegk@xxxxxxxxxxxx> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> If you are in the process of closing the queue pair, does this solve some sort of multi-close race, or is it just being pedantic before freeing the qp struct? I took it regardless, just curious. -- Doug Ledford <dledford@xxxxxxxxxx> GPG KeyID: B826A3330E572FDD Fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD