net/mlx5e: Use no-offset function in skb header copy

In copying skb header to skb->data, replace the call to
skb_copy_to_linear_data_offset() with a zero offset with
the call to the no-offset function skb_copy_to_linear_data().

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
Tariq Toukan 2018-02-15 18:27:06 +02:00 committed by Saeed Mahameed
parent bd658dda42
commit 24fd07abfa
1 changed files with 2 additions and 3 deletions

View File

@ -333,9 +333,8 @@ mlx5e_copy_skb_header_mpwqe(struct device *pdev,
len = ALIGN(headlen_pg, sizeof(long)); len = ALIGN(headlen_pg, sizeof(long));
dma_sync_single_for_cpu(pdev, dma_info->addr + offset, len, dma_sync_single_for_cpu(pdev, dma_info->addr + offset, len,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
skb_copy_to_linear_data_offset(skb, 0, skb_copy_to_linear_data(skb, page_address(dma_info->page) + offset, len);
page_address(dma_info->page) + offset,
len);
if (unlikely(offset + headlen > PAGE_SIZE)) { if (unlikely(offset + headlen > PAGE_SIZE)) {
dma_info++; dma_info++;
headlen_pg = len; headlen_pg = len;