mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 09:50:04 +00:00
IPoIB: convert to SKB paged frag API.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Roland Dreier <roland@kernel.org> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: linux-rdma@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cf383ebb13
commit
5581be3b48
2 changed files with 6 additions and 4 deletions
|
@ -169,7 +169,7 @@ static struct sk_buff *ipoib_cm_alloc_rx_skb(struct net_device *dev,
|
|||
goto partial_error;
|
||||
skb_fill_page_desc(skb, i, page, 0, PAGE_SIZE);
|
||||
|
||||
mapping[i + 1] = ib_dma_map_page(priv->ca, skb_shinfo(skb)->frags[i].page,
|
||||
mapping[i + 1] = ib_dma_map_page(priv->ca, page,
|
||||
0, PAGE_SIZE, DMA_FROM_DEVICE);
|
||||
if (unlikely(ib_dma_mapping_error(priv->ca, mapping[i + 1])))
|
||||
goto partial_error;
|
||||
|
@ -537,7 +537,8 @@ static void skb_put_frags(struct sk_buff *skb, unsigned int hdr_space,
|
|||
|
||||
if (length == 0) {
|
||||
/* don't need this page */
|
||||
skb_fill_page_desc(toskb, i, frag->page, 0, PAGE_SIZE);
|
||||
skb_fill_page_desc(toskb, i, skb_frag_page(frag),
|
||||
0, PAGE_SIZE);
|
||||
--skb_shinfo(skb)->nr_frags;
|
||||
} else {
|
||||
size = min(length, (unsigned) PAGE_SIZE);
|
||||
|
|
|
@ -182,7 +182,7 @@ static struct sk_buff *ipoib_alloc_rx_skb(struct net_device *dev, int id)
|
|||
goto partial_error;
|
||||
skb_fill_page_desc(skb, 0, page, 0, PAGE_SIZE);
|
||||
mapping[1] =
|
||||
ib_dma_map_page(priv->ca, skb_shinfo(skb)->frags[0].page,
|
||||
ib_dma_map_page(priv->ca, page,
|
||||
0, PAGE_SIZE, DMA_FROM_DEVICE);
|
||||
if (unlikely(ib_dma_mapping_error(priv->ca, mapping[1])))
|
||||
goto partial_error;
|
||||
|
@ -323,7 +323,8 @@ static int ipoib_dma_map_tx(struct ib_device *ca,
|
|||
|
||||
for (i = 0; i < skb_shinfo(skb)->nr_frags; ++i) {
|
||||
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
|
||||
mapping[i + off] = ib_dma_map_page(ca, frag->page,
|
||||
mapping[i + off] = ib_dma_map_page(ca,
|
||||
skb_frag_page(frag),
|
||||
frag->page_offset, frag->size,
|
||||
DMA_TO_DEVICE);
|
||||
if (unlikely(ib_dma_mapping_error(ca, mapping[i + off])))
|
||||
|
|
Loading…
Reference in a new issue