netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: netdev@vger.kernel.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 07/14] niu: convert to SKB paged frag API.
Date: Wed, 31 Aug 2011 11:46:59 +0100	[thread overview]
Message-ID: <1314787626-12273-7-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1314787608.28989.41.camel@zakaz.uk.xensource.com>

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
---
 drivers/net/ethernet/sun/niu.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 3c9ef1c..cad58f2 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -3290,11 +3290,8 @@ static void niu_rx_skb_append(struct sk_buff *skb, struct page *page,
 			      u32 offset, u32 size)
 {
 	int i = skb_shinfo(skb)->nr_frags;
-	skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
 
-	frag->page = page;
-	frag->page_offset = offset;
-	frag->size = size;
+	__skb_fill_page_desc(skb, i, page, offset, size);
 
 	skb->len += size;
 	skb->data_len += size;
@@ -6737,7 +6734,7 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb,
 		skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
 
 		len = frag->size;
-		mapping = np->ops->map_page(np->device, frag->page,
+		mapping = np->ops->map_page(np->device, skb_frag_page(frag),
 					    frag->page_offset, len,
 					    DMA_TO_DEVICE);
 
-- 
1.7.2.5

  parent reply	other threads:[~2011-08-31 10:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-31 10:46 [PATCH 0/14] skb fragment API: convert network drivers (part II) Ian Campbell
2011-08-31 10:46 ` [PATCH 01/14] ibmveth: convert to SKB paged frag API Ian Campbell
2011-08-31 10:46 ` [PATCH 02/14] jme: " Ian Campbell
2011-08-31 10:46 ` [PATCH 03/14] ksz884x: " Ian Campbell
2011-08-31 10:46 ` [PATCH 04/14] macvtap: " Ian Campbell
2011-08-31 10:46 ` [PATCH 05/14] mv643xx: " Ian Campbell
2011-08-31 10:46 ` [PATCH 06/14] netxen: " Ian Campbell
2011-08-31 10:46 ` Ian Campbell [this message]
2011-08-31 10:47 ` [PATCH 08/14] ns83820: " Ian Campbell
2011-08-31 10:47 ` [PATCH 09/14] pasemi: " Ian Campbell
2011-08-31 10:47 ` [PATCH 10/14] qeth: " Ian Campbell
2011-08-31 10:47 ` [PATCH 11/14] qla3xxx: " Ian Campbell
2011-08-31 10:47 ` [PATCH 12/14] qlcnic: " Ian Campbell
2011-08-31 10:47 ` [PATCH 13/14] qlge: " Ian Campbell
2011-08-31 10:47 ` [PATCH 14/14] r8169: " Ian Campbell
2011-09-15 19:41 ` [PATCH 0/14] skb fragment API: convert network drivers (part II) 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=1314787626-12273-7-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).