Commit 7f0137e2 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net/mlx4_en: Use __skb_fill_page_desc()

Or we might miss the fact that a page was allocated from memory reserves.

Fixes: dceeab0e ("mlx4: support __GFP_MEMALLOC for rx")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6ed63d84
...@@ -604,10 +604,10 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv, ...@@ -604,10 +604,10 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv,
dma_sync_single_for_cpu(priv->ddev, dma, frag_info->frag_size, dma_sync_single_for_cpu(priv->ddev, dma, frag_info->frag_size,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
/* Save page reference in skb */ __skb_fill_page_desc(skb, nr, frags[nr].page,
__skb_frag_set_page(&skb_frags_rx[nr], frags[nr].page); frags[nr].page_offset,
skb_frag_size_set(&skb_frags_rx[nr], frag_info->frag_size); frag_info->frag_size);
skb_frags_rx[nr].page_offset = frags[nr].page_offset;
skb->truesize += frag_info->frag_stride; skb->truesize += frag_info->frag_stride;
frags[nr].page = NULL; frags[nr].page = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment