Skip to content

Commit 55bec1c

Browse files
Bob Pearsonjgunthorpe
authored andcommitted
RDMA/rxe: Make rxe_loopback match rxe_send behavior
The rxe send path currently counts the number of skbs outstanding between the rxe driver and the ethernet driver to prevent too many packets to accumulate waiting to send. This patch makes the local loopback path behave the same way. The loopback path forwards the packets to the receive path which will eventually call kfree_skb on all packets and drop the qp references. This makes the loopback path more useful for software testing. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bob Pearson <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 8776618 commit 55bec1c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/infiniband/sw/rxe/rxe_net.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,12 @@ static int rxe_loopback(struct sk_buff *skb, struct rxe_pkt_info *pkt)
386386
{
387387
memcpy(SKB_TO_PKT(skb), pkt, sizeof(*pkt));
388388

389+
skb->destructor = rxe_skb_tx_dtor;
390+
skb->sk = pkt->qp->sk->sk;
391+
392+
rxe_get(pkt->qp);
393+
atomic_inc(&pkt->qp->skb_out);
394+
389395
if (skb->protocol == htons(ETH_P_IP))
390396
skb_pull(skb, sizeof(struct iphdr));
391397
else

0 commit comments

Comments
 (0)