Skip to content

Commit 5120bf0

Browse files
Bob Pearsonjgunthorpe
authored andcommitted
RDMA/rxe: Correct skb on loopback path
rxe_net.c sends packets at the IP layer with skb->data pointing at the IP header but receives packets from a UDP tunnel with skb->data pointing at the UDP header. On the loopback path this was not correctly accounted for. This patch corrects for this by using sbk_pull() to strip the IP header from the skb on received packets. Fixes: 8700e3e ("Soft RoCE driver") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bob Pearson <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 8fc1b70 commit 5120bf0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/infiniband/sw/rxe/rxe_net.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,11 @@ int rxe_send(struct rxe_pkt_info *pkt, struct sk_buff *skb)
408408

409409
void rxe_loopback(struct sk_buff *skb)
410410
{
411+
if (skb->protocol == htons(ETH_P_IP))
412+
skb_pull(skb, sizeof(struct iphdr));
413+
else
414+
skb_pull(skb, sizeof(struct ipv6hdr));
415+
411416
rxe_rcv(skb);
412417
}
413418

0 commit comments

Comments
 (0)