Commit 7190e9d8 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller

qede: Use 'skb_add_rx_frag()' instead of hand coding it

Some lines of code can be merged into an equivalent 'skb_add_rx_frag()'
call which is less verbose.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarManish Chopra <manishc@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ec3d02f
...@@ -1209,12 +1209,9 @@ static int qede_rx_build_jumbo(struct qede_dev *edev, ...@@ -1209,12 +1209,9 @@ static int qede_rx_build_jumbo(struct qede_dev *edev,
dma_unmap_page(rxq->dev, bd->mapping, dma_unmap_page(rxq->dev, bd->mapping,
PAGE_SIZE, DMA_FROM_DEVICE); PAGE_SIZE, DMA_FROM_DEVICE);
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags, skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, bd->data,
bd->data, rxq->rx_headroom, cur_size); rxq->rx_headroom, cur_size, PAGE_SIZE);
skb->truesize += PAGE_SIZE;
skb->data_len += cur_size;
skb->len += cur_size;
pkt_len -= cur_size; pkt_len -= cur_size;
} }
......
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