From: Ian Campbell <ian.campbell@citrix.com>
To: netdev@vger.kernel.org
Cc: Ian Campbell <ian.campbell@citrix.com>,
Jon Mason <mason@myri.com>, Andrew Gallatin <gallatin@myri.com>
Subject: [PATCH 6/8] myri10ge: convert to SKB paged frag API.
Date: Wed, 5 Oct 2011 11:28:50 +0100 [thread overview]
Message-ID: <1317810532-24984-6-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1317810511.21903.204.camel@zakaz.uk.xensource.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jon Mason <mason@myri.com>
Cc: Andrew Gallatin <gallatin@myri.com>
Cc: netdev@vger.kernel.org
---
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 81c1700..8bf6034 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -1342,7 +1342,7 @@ myri10ge_rx_done(struct myri10ge_slice_state *ss, int len, __wsum csum,
/* Fill skb_frag_struct(s) with data from our receive */
for (i = 0, remainder = len; remainder > 0; i++) {
myri10ge_unmap_rx_page(pdev, &rx->info[idx], bytes);
- rx_frags[i].page = rx->info[idx].page;
+ __skb_frag_set_page(&rx_frags[i], rx->info[idx].page);
rx_frags[i].page_offset = rx->info[idx].page_offset;
if (remainder < MYRI10GE_ALLOC_SIZE)
rx_frags[i].size = remainder;
@@ -1375,7 +1375,7 @@ myri10ge_rx_done(struct myri10ge_slice_state *ss, int len, __wsum csum,
ss->stats.rx_dropped++;
do {
i--;
- put_page(rx_frags[i].page);
+ __skb_frag_unref(&rx_frags[i]);
} while (i != 0);
return 0;
}
@@ -1383,7 +1383,7 @@ myri10ge_rx_done(struct myri10ge_slice_state *ss, int len, __wsum csum,
/* Attach the pages to the skb, and trim off any padding */
myri10ge_rx_skb_build(skb, va, rx_frags, len, hlen);
if (skb_shinfo(skb)->frags[0].size <= 0) {
- put_page(skb_shinfo(skb)->frags[0].page);
+ skb_frag_unref(skb, 0);
skb_shinfo(skb)->nr_frags = 0;
}
skb->protocol = eth_type_trans(skb, dev);
@@ -2284,7 +2284,7 @@ myri10ge_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr,
struct ethhdr *eh;
struct vlan_ethhdr *veh;
struct iphdr *iph;
- u8 *va = page_address(frag->page) + frag->page_offset;
+ u8 *va = skb_frag_address(frag);
unsigned long ll_hlen;
/* passed opaque through lro_receive_frags() */
__wsum csum = (__force __wsum) (unsigned long)priv;
@@ -2927,8 +2927,8 @@ again:
frag = &skb_shinfo(skb)->frags[frag_idx];
frag_idx++;
len = frag->size;
- bus = pci_map_page(mgp->pdev, frag->page, frag->page_offset,
- len, PCI_DMA_TODEVICE);
+ bus = skb_frag_dma_map(&mgp->pdev->dev, frag, 0, len,
+ PCI_DMA_TODEVICE);
dma_unmap_addr_set(&tx->info[idx], bus, bus);
dma_unmap_len_set(&tx->info[idx], len, len);
}
--
1.7.2.5
next prev parent reply other threads:[~2011-10-05 10:29 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 10:28 [PATCH 0/8] skb fragment API: convert network drivers (part IV) Ian Campbell
2011-10-05 10:28 ` [PATCH 1/8] vxge: convert to SKB paged frag API Ian Campbell
2011-10-05 21:03 ` Michał Mirosław
2011-10-05 21:32 ` David Miller
2011-10-06 7:05 ` Ian Campbell
2011-10-06 16:00 ` Ian Campbell
2011-10-06 20:00 ` David Miller
2011-10-06 20:45 ` Michał Mirosław
2011-10-06 21:08 ` Ian Campbell
2011-10-06 21:16 ` David Miller
2011-10-06 21:25 ` Ian Campbell
2011-10-06 21:56 ` David Miller
2011-10-07 5:29 ` Ian Campbell
2011-10-06 21:15 ` David Miller
2011-10-06 21:19 ` Ian Campbell
2011-10-06 21:28 ` Michał Mirosław
2011-10-05 10:28 ` [PATCH 2/8] xen: netback: " Ian Campbell
2011-10-05 10:28 ` [PATCH 3/8] xen: netfront: " Ian Campbell
2011-10-05 10:28 ` [PATCH 4/8] et131x: " Ian Campbell
2011-10-05 10:28 ` [PATCH 5/8] hv: netvsc: " Ian Campbell
2011-10-05 10:28 ` Ian Campbell [this message]
2011-10-05 10:28 ` [PATCH 7/8] cxgb3: " Ian Campbell
2011-10-05 10:28 ` [PATCH 8/8] chelsio: " Ian Campbell
2011-10-05 19:17 ` [PATCH 0/8] skb fragment API: convert network drivers (part IV) Greg KH
2011-10-05 20:13 ` David Miller
2011-10-05 20:25 ` Greg KH
2011-10-05 20:49 ` David Miller
2011-10-05 21:36 ` 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=1317810532-24984-6-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=gallatin@myri.com \
--cc=mason@myri.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).