diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-04-04 15:42:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-05 21:59:33 +0300 |
commit | 7190e9d8e13164cdc38241095edcc392ed32f3ea (patch) | |
tree | 8f5ededc4a92534fbdb46ff245c96339d7aa454e /drivers/net/ethernet/qlogic/qede/qede_fp.c | |
parent | 1ec3d02f9cdf2a4b89664145c7965aa46398d31e (diff) | |
download | linux-7190e9d8e13164cdc38241095edcc392ed32f3ea.tar.xz |
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qede/qede_fp.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede_fp.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/qlogic/qede/qede_fp.c index ee3e45e38cb7..8e150dd4f899 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_fp.c +++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c @@ -1209,12 +1209,9 @@ static int qede_rx_build_jumbo(struct qede_dev *edev, dma_unmap_page(rxq->dev, bd->mapping, PAGE_SIZE, DMA_FROM_DEVICE); - skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags, - bd->data, rxq->rx_headroom, cur_size); + skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, bd->data, + rxq->rx_headroom, cur_size, PAGE_SIZE); - skb->truesize += PAGE_SIZE; - skb->data_len += cur_size; - skb->len += cur_size; pkt_len -= cur_size; } |