All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: netdev@vger.kernel.org
Cc: Ian Campbell <ian.campbell@citrix.com>,
	Michael Chan <mchan@broadcom.com>
Subject: [PATCH 6/9] bnx2: convert to SKB paged frag API.
Date: Thu, 25 Aug 2011 09:28:12 +0100	[thread overview]
Message-ID: <1314260895-15936-6-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1314260881.10283.48.camel@zakaz.uk.xensource.com>

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Michael Chan <mchan@broadcom.com>
Cc: netdev@vger.kernel.org
---
 drivers/net/ethernet/broadcom/bnx2.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 4a9a8c81..9afb653 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -2930,8 +2930,8 @@ bnx2_reuse_rx_skb_pages(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr,
 
 		shinfo = skb_shinfo(skb);
 		shinfo->nr_frags--;
-		page = shinfo->frags[shinfo->nr_frags].page;
-		shinfo->frags[shinfo->nr_frags].page = NULL;
+		page = skb_frag_page(&shinfo->frags[shinfo->nr_frags]);
+		__skb_frag_set_page(&shinfo->frags[shinfo->nr_frags], NULL);
 
 		cons_rx_pg->page = page;
 		dev_kfree_skb(skb);
@@ -6511,8 +6511,8 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		txbd = &txr->tx_desc_ring[ring_prod];
 
 		len = frag->size;
-		mapping = dma_map_page(&bp->pdev->dev, frag->page, frag->page_offset,
-				       len, PCI_DMA_TODEVICE);
+		mapping = skb_frag_dma_map(&bp->pdev->dev, frag, 0, len,
+					   PCI_DMA_TODEVICE);
 		if (dma_mapping_error(&bp->pdev->dev, mapping))
 			goto dma_error;
 		dma_unmap_addr_set(&txr->tx_buf_ring[ring_prod], mapping,
-- 
1.7.2.5

  parent reply	other threads:[~2011-08-25  8:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25  8:28 [PATCH 0/9] skb fragment API: convert non-network drivers Ian Campbell
2011-08-25  8:28 ` Ian Campbell
2011-08-25  8:28 ` [PATCH 1/9] atm: convert to SKB paged frag API Ian Campbell
     [not found] ` <1314260881.10283.48.camel-o4Be2W7LfRlXesXXhkcM7miJhflN2719@public.gmane.org>
2011-08-25  8:28   ` [PATCH 2/9] IB: amso1100: " Ian Campbell
     [not found]     ` <1314260895-15936-2-git-send-email-ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2011-08-25 14:42       ` Steve Wise
2011-08-25  8:28   ` [PATCH 3/9] IB: nes: " Ian Campbell
2011-08-25 15:33     ` Latif, Faisal
2011-08-25  8:28   ` [PATCH 4/9] IPoIB: " Ian Campbell
2011-08-25  8:28   ` [PATCH 5/9] tg3: " Ian Campbell
2011-08-25  8:28 ` Ian Campbell [this message]
2011-08-25  8:28 ` [PATCH 7/9] bnx2x: " Ian Campbell
2011-08-25  8:28 ` [PATCH 8/9] bnx2fc: " Ian Campbell
2011-08-25  8:28 ` [PATCH 9/9] fcoe: " Ian Campbell
2011-08-26 16:39 ` [PATCH 0/9] skb fragment API: convert non-network drivers David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1314260895-15936-6-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.