diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-11-11 08:27:11 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-11-11 08:27:11 +0100 |
commit | bfdd5537dcc857eaa04c055ef8afcb8a80dea831 (patch) | |
tree | 6336969fb04fcd0db4bcbef529f318a86dc9f7c8 /drivers/infiniband/ulp/ipoib/ipoib_ib.c | |
parent | sched/core: Explain sleep/wakeup in a better way (diff) | |
parent | Merge tag 'sound-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ti... (diff) | |
download | linux-bfdd5537dcc857eaa04c055ef8afcb8a80dea831.tar.xz linux-bfdd5537dcc857eaa04c055ef8afcb8a80dea831.zip |
Merge branch 'linus' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_ib.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index be11d5d5b8c1..830fecb6934c 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -128,16 +128,15 @@ static struct sk_buff *ipoib_alloc_rx_skb(struct net_device *dev, int id) buf_size = IPOIB_UD_BUF_SIZE(priv->max_ib_mtu); - skb = dev_alloc_skb(buf_size + IPOIB_ENCAP_LEN); + skb = dev_alloc_skb(buf_size + IPOIB_HARD_LEN); if (unlikely(!skb)) return NULL; /* - * IB will leave a 40 byte gap for a GRH and IPoIB adds a 4 byte - * header. So we need 4 more bytes to get to 48 and align the - * IP header to a multiple of 16. + * the IP header will be at IPOIP_HARD_LEN + IB_GRH_BYTES, that is + * 64 bytes aligned */ - skb_reserve(skb, 4); + skb_reserve(skb, sizeof(struct ipoib_pseudo_header)); mapping = priv->rx_ring[id].mapping; mapping[0] = ib_dma_map_single(priv->ca, skb->data, buf_size, @@ -253,8 +252,7 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc) skb_pull(skb, IB_GRH_BYTES); skb->protocol = ((struct ipoib_header *) skb->data)->proto; - skb_reset_mac_header(skb); - skb_pull(skb, IPOIB_ENCAP_LEN); + skb_add_pseudo_hdr(skb); ++dev->stats.rx_packets; dev->stats.rx_bytes += skb->len; |