Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH for-next] RDMA/rxe: Remove extra rxe_get(qp) in rxe_rcv_mcast_pkt
@ 2023-02-21 20:54 Bob Pearson
  2023-02-21 23:26 ` Jason Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Bob Pearson @ 2023-02-21 20:54 UTC (permalink / raw)
  To: jgg, zyjzyj2000, linux-rdma; +Cc: Bob Pearson

The rxe driver implements UD multicast support by cloning an incoming
request packet to give one each to the qp's that belong to the multi-
cast group. If there are N qp's in the group N-1 clones are created
and for each one a reference is taken to the ib device and a reference
is taken to the destination qp. This matches the behavior of non
multicast packets. The packet itself which already has a reference
to the ib device and the qp is given to the last qp.

Incorrectly, rxe_rcv_mcast_pkt() takes an additional qp reference
which is not needed and will prevent the qp from being destroyed
without an error timeout. This patch removes that qp reference.

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_recv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c
index 434a693cd4a5..dd42c347301c 100644
--- a/drivers/infiniband/sw/rxe/rxe_recv.c
+++ b/drivers/infiniband/sw/rxe/rxe_recv.c
@@ -241,7 +241,6 @@ static void rxe_rcv_mcast_pkt(struct rxe_dev *rxe, struct sk_buff *skb)
 			rxe_rcv_pkt(cpkt, cskb);
 		} else {
 			pkt->qp = qp;
-			rxe_get(qp);
 			rxe_rcv_pkt(pkt, skb);
 			skb = NULL;	/* mark consumed */
 		}
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH for-next] RDMA/rxe: Remove extra rxe_get(qp) in rxe_rcv_mcast_pkt
  2023-02-21 20:54 [PATCH for-next] RDMA/rxe: Remove extra rxe_get(qp) in rxe_rcv_mcast_pkt Bob Pearson
@ 2023-02-21 23:26 ` Jason Gunthorpe
  2023-02-23 18:08   ` Bob Pearson
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Gunthorpe @ 2023-02-21 23:26 UTC (permalink / raw)
  To: Bob Pearson; +Cc: zyjzyj2000, linux-rdma

On Tue, Feb 21, 2023 at 02:54:29PM -0600, Bob Pearson wrote:
> The rxe driver implements UD multicast support by cloning an incoming
> request packet to give one each to the qp's that belong to the multi-
> cast group. If there are N qp's in the group N-1 clones are created
> and for each one a reference is taken to the ib device and a reference
> is taken to the destination qp. This matches the behavior of non
> multicast packets. The packet itself which already has a reference
> to the ib device and the qp is given to the last qp.
> 
> Incorrectly, rxe_rcv_mcast_pkt() takes an additional qp reference
> which is not needed and will prevent the qp from being destroyed
> without an error timeout. This patch removes that qp reference.
> 
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_recv.c | 1 -
>  1 file changed, 1 deletion(-)

Needs a fixes line..

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH for-next] RDMA/rxe: Remove extra rxe_get(qp) in rxe_rcv_mcast_pkt
  2023-02-21 23:26 ` Jason Gunthorpe
@ 2023-02-23 18:08   ` Bob Pearson
  0 siblings, 0 replies; 3+ messages in thread
From: Bob Pearson @ 2023-02-23 18:08 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: zyjzyj2000, linux-rdma

On 2/21/23 17:26, Jason Gunthorpe wrote:
> On Tue, Feb 21, 2023 at 02:54:29PM -0600, Bob Pearson wrote:
>> The rxe driver implements UD multicast support by cloning an incoming
>> request packet to give one each to the qp's that belong to the multi-
>> cast group. If there are N qp's in the group N-1 clones are created
>> and for each one a reference is taken to the ib device and a reference
>> is taken to the destination qp. This matches the behavior of non
>> multicast packets. The packet itself which already has a reference
>> to the ib device and the qp is given to the last qp.
>>
>> Incorrectly, rxe_rcv_mcast_pkt() takes an additional qp reference
>> which is not needed and will prevent the qp from being destroyed
>> without an error timeout. This patch removes that qp reference.

This was all wrong. The incoming packet had qpn = IB_MULTICAST_QPN
so it did *not* lookup the qp and take a reference. 

>>
>> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
>> ---
>>  drivers/infiniband/sw/rxe/rxe_recv.c | 1 -
>>  1 file changed, 1 deletion(-)
> 
> Needs a fixes line..
> 
> Jason

Please withdraw this patch.

Bob

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-23 18:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-21 20:54 [PATCH for-next] RDMA/rxe: Remove extra rxe_get(qp) in rxe_rcv_mcast_pkt Bob Pearson
2023-02-21 23:26 ` Jason Gunthorpe
2023-02-23 18:08   ` Bob Pearson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox