Message ID | ee2f585f0fdb993366b1e33a01a4a268ba05e6f9.1617540100.git.christophe.jaillet@wanadoo.fr (mailing list archive) |
---|---|
State | Accepted |
Commit | 7190e9d8e13164cdc38241095edcc392ed32f3ea |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [1/2] qede: Remove a erroneous ++ in 'qede_rx_build_jumbo()' | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | success | CCed 5 of 5 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 14 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
> -----Original Message----- > From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > Sent: Sunday, April 4, 2021 6:13 PM > To: Ariel Elior <aelior@marvell.com>; GR-everest-linux-l2 <GR-everest-linux- > l2@marvell.com>; davem@davemloft.net; kuba@kernel.org > Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; kernel- > janitors@vger.kernel.org; Christophe JAILLET <christophe.jaillet@wanadoo.fr> > Subject: [EXT] [PATCH 2/2] qede: Use 'skb_add_rx_frag()' instead of hand coding > it > > External Email > > ---------------------------------------------------------------------- > 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> > --- > drivers/net/ethernet/qlogic/qede/qede_fp.c | 7 ++----- > 1 file 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; > } > > -- > 2.27.0 Thank you Christophe. Acked-by: Manish Chopra <manishc@marvell.com>
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; }
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> --- drivers/net/ethernet/qlogic/qede/qede_fp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)