From: Ian Campbell <ian.campbell@citrix.com>
To: netdev@vger.kernel.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 14/14] greth: convert to SKB paged frag API.
Date: Tue, 30 Aug 2011 10:18:30 +0100 [thread overview]
Message-ID: <1314695910-22344-14-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1314695847.10283.102.camel@zakaz.uk.xensource.com>
In order to avoid long lines also use phys_to_virt(page_to_phys(page)) =>
page_address(page) (since the are effectively the same thing for lowmem pages).
Also dump the frag's size instead of the headlen when dumping a frag.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
---
drivers/net/ethernet/aeroflex/greth.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c
index a5f6b07..bc3bd34 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -113,9 +113,8 @@ static void greth_print_tx_packet(struct sk_buff *skb)
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
print_hex_dump(KERN_DEBUG, "TX: ", DUMP_PREFIX_OFFSET, 16, 1,
- phys_to_virt(page_to_phys(skb_shinfo(skb)->frags[i].page)) +
- skb_shinfo(skb)->frags[i].page_offset,
- length, true);
+ skb_frag_address(&skb_shinfo(skb)->frags[i]),
+ skb_shinfo(skb)->frags[i].size, true);
}
}
@@ -528,11 +527,8 @@ greth_start_xmit_gbit(struct sk_buff *skb, struct net_device *dev)
greth_write_bd(&bdp->stat, status);
- dma_addr = dma_map_page(greth->dev,
- frag->page,
- frag->page_offset,
- frag->size,
- DMA_TO_DEVICE);
+ dma_addr = skb_frag_dma_map(greth->dev, frag, 0, frag->size,
+ DMA_TO_DEVICE);
if (unlikely(dma_mapping_error(greth->dev, dma_addr)))
goto frag_map_error;
--
1.7.2.5
next prev parent reply other threads:[~2011-08-30 9:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 9:17 [PATCH 0/14] skb fragment API: convert network drivers (part I) Ian Campbell
2011-08-30 9:18 ` [PATCH 01/14] 3c59x: convert to SKB paged frag API Ian Campbell
2011-08-30 9:18 ` [PATCH 02/14] 8139cp: " Ian Campbell
2011-08-30 9:18 ` [PATCH 03/14] acenic: " Ian Campbell
2011-08-30 9:18 ` [PATCH 04/14] atl1c: " Ian Campbell
2011-08-30 9:34 ` [PATCH] MAINTAINERS: Update ATLX driver maintainers Ian Campbell
2011-08-30 11:25 ` Franco Fichtner
2011-08-30 11:31 ` Ian Campbell
2011-08-30 9:18 ` [PATCH 05/14] atl1e: convert to SKB paged frag API Ian Campbell
2011-08-30 9:18 ` [PATCH 06/14] atlx: " Ian Campbell
2011-08-30 9:18 ` [PATCH 07/14] benet: " Ian Campbell
2011-08-30 9:18 ` [PATCH 08/14] bna: " Ian Campbell
2011-08-30 9:42 ` [PATCH] MAINTAINERS: Update BNA 10G Maintainer Ian Campbell
2011-08-31 0:44 ` David Miller
2011-08-30 9:18 ` [PATCH 09/14] cassini: convert to SKB paged frag API Ian Campbell
2011-08-30 9:18 ` [PATCH 10/14] intel: " Ian Campbell
2011-08-30 10:52 ` Jeff Kirsher
2011-08-30 9:18 ` [PATCH 11/14] enic: " Ian Campbell
2011-08-30 9:41 ` [PATCH] MAINTAINERS: Update Cisco VIC driver maintainers Ian Campbell
2011-08-30 11:42 ` David Wang (dwang2)
2011-08-31 0:43 ` David Miller
2011-08-30 9:18 ` [PATCH 12/14] forcedeth: convert to SKB paged frag API Ian Campbell
2011-08-30 9:18 ` [PATCH 13/14] gianfar: " Ian Campbell
2011-08-30 9:18 ` Ian Campbell [this message]
2011-08-30 22:05 ` [PATCH 0/14] skb fragment API: convert network drivers (part I) 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=1314695910-22344-14-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).