Blob Blame History Raw
From: Parav Pandit <parav@mellanox.com>
Date: Thu, 2 May 2019 10:48:01 +0300
Subject: RDMA/rxe: Consider skb reserve space based on netdev of GID
Patch-mainline: v5.2-rc1
Git-commit: 3bf3e2b881c1412d0329ce9376dfe1518489b8fc
References: bsc#1082387, bsc#1103992, FATE#326009

Always consider the skb reserve space based on netdevice of the GID
attribute, regardless of vlan or non vlan netdevice.

Fixes: 43c9fc509fa5 ("rdma_rxe: make rxe work over 802.1q VLAN devices")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Acked-by: Martin Wilck <mwilck@suse.com>
---
 drivers/infiniband/sw/rxe/rxe_net.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -518,8 +518,9 @@ struct sk_buff *rxe_init_packet(struct r
 	if (unlikely(!skb))
 		goto out;
 
-	skb_reserve(skb, hdr_len + LL_RESERVED_SPACE(rxe->ndev));
+	skb_reserve(skb, hdr_len + LL_RESERVED_SPACE(ndev));
 
+	/* FIXME: hold reference to this netdev until life of this skb. */
 	skb->dev	= ndev;
 	if (av->network_type == RDMA_NETWORK_IPV4)
 		skb->protocol = htons(ETH_P_IP);