Commit d67ee210 authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller

ionic: use dma range APIs

Convert Rx datapath handling to use the DMA range APIs
in preparation for adding XDP handling.
Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 97538c14
......@@ -225,9 +225,8 @@ static struct sk_buff *ionic_rx_frags(struct ionic_queue *q,
frag_len = min_t(u16, len, ionic_rx_buf_size(buf_info));
len -= frag_len;
dma_sync_single_for_cpu(dev,
ionic_rx_buf_pa(buf_info),
frag_len, DMA_FROM_DEVICE);
dma_sync_single_range_for_cpu(dev, ionic_rx_buf_pa(buf_info),
0, frag_len, DMA_FROM_DEVICE);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf_info->page, buf_info->page_offset, frag_len,
......@@ -276,11 +275,11 @@ static struct sk_buff *ionic_rx_copybreak(struct ionic_queue *q,
return NULL;
}
dma_sync_single_for_cpu(dev, ionic_rx_buf_pa(buf_info),
len, DMA_FROM_DEVICE);
dma_sync_single_range_for_cpu(dev, ionic_rx_buf_pa(buf_info),
0, len, DMA_FROM_DEVICE);
skb_copy_to_linear_data(skb, ionic_rx_buf_va(buf_info), len);
dma_sync_single_for_device(dev, ionic_rx_buf_pa(buf_info),
len, DMA_FROM_DEVICE);
dma_sync_single_range_for_device(dev, ionic_rx_buf_pa(buf_info),
0, len, DMA_FROM_DEVICE);
skb_put(skb, len);
skb->protocol = eth_type_trans(skb, q->lif->netdev);
......
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