Skip to content

Commit 13a8ac5

Browse files
Zhu Yanjungregkh
authored andcommitted
RDMA/rxe: Skip dgid check in loopback mode
[ Upstream commit 5c99274 ] In the loopback tests, the following call trace occurs. Call Trace: __rxe_do_task+0x1a/0x30 [rdma_rxe] rxe_qp_destroy+0x61/0xa0 [rdma_rxe] rxe_destroy_qp+0x20/0x60 [rdma_rxe] ib_destroy_qp_user+0xcc/0x220 [ib_core] uverbs_free_qp+0x3c/0xc0 [ib_uverbs] destroy_hw_idr_uobject+0x24/0x70 [ib_uverbs] uverbs_destroy_uobject+0x43/0x1b0 [ib_uverbs] uobj_destroy+0x41/0x70 [ib_uverbs] __uobj_get_destroy+0x39/0x70 [ib_uverbs] ib_uverbs_destroy_qp+0x88/0xc0 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0xb9/0xf0 [ib_uverbs] ib_uverbs_cmd_verbs+0xb16/0xc30 [ib_uverbs] The root cause is that the actual RDMA connection is not created in the loopback tests and the rxe_match_dgid will fail randomly. To fix this call trace which appear in the loopback tests, skip check of the dgid. Fixes: 8700e3e ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200630123605.446959-1-leon@kernel.org Signed-off-by: Zhu Yanjun <yanjunz@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4c2c947 commit 13a8ac5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/infiniband/sw/rxe/rxe_recv.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,14 @@ static void rxe_rcv_mcast_pkt(struct rxe_dev *rxe, struct sk_buff *skb)
332332

333333
static int rxe_match_dgid(struct rxe_dev *rxe, struct sk_buff *skb)
334334
{
335+
struct rxe_pkt_info *pkt = SKB_TO_PKT(skb);
335336
const struct ib_gid_attr *gid_attr;
336337
union ib_gid dgid;
337338
union ib_gid *pdgid;
338339

340+
if (pkt->mask & RXE_LOOPBACK_MASK)
341+
return 0;
342+
339343
if (skb->protocol == htons(ETH_P_IP)) {
340344
ipv6_addr_set_v4mapped(ip_hdr(skb)->daddr,
341345
(struct in6_addr *)&dgid);
@@ -368,7 +372,7 @@ void rxe_rcv(struct sk_buff *skb)
368372
if (unlikely(skb->len < pkt->offset + RXE_BTH_BYTES))
369373
goto drop;
370374

371-
if (unlikely(rxe_match_dgid(rxe, skb) < 0)) {
375+
if (rxe_match_dgid(rxe, skb) < 0) {
372376
pr_warn_ratelimited("failed matching dgid\n");
373377
goto drop;
374378
}

0 commit comments

Comments
 (0)