Skip to contentSkip to conversation

RDMA/rxe: Remove extra rxe_get(qp) in rxe_rcv_mcast_pkt

PATCH In review Bob Pearson 2 participants 3 messages Feb 21, 2023 – Feb 23, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/rxe: Remove extra rxe_get(qp) in rxe_rcv_mcast_pkt

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.

---
 drivers/infiniband/sw/rxe/rxe_recv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/infiniband/sw/rxe/rxe_recv.c +0 -1
index 434a693cd4a5..dd42c347301c 100644
@@ -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 */
 		}
Signature · 1 line
2.37.2
maintainer
#1 lore raw
Quoted 8 lines · 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.

Quoted 8 lines

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.

---
 drivers/infiniband/sw/rxe/rxe_recv.c | 1 -
 1 file changed, 1 deletion(-)

Needs a fixes line..

Jason

#2 lore raw
Quoted 9 lines · Jason Gunthorpe
Quoted 8 lines · 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.

Quoted 3 lines
Quoted 3 lines

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.

Quoted 9 lines
Quoted 5 lines
---
 drivers/infiniband/sw/rxe/rxe_recv.c | 1 -
 1 file changed, 1 deletion(-)

Needs a fixes line..

Jason

Please withdraw this patch.

Bob