[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <B07832953588294D802727FF264E276A13EB817FBD@exch-mbx-112.vmware.com>
Date: Thu, 22 Sep 2011 09:30:03 -0700
From: Bhavesh Davda <bhavesh@...are.com>
To: Ian Campbell <ian.campbell@...rix.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "VMware, Inc." <pv-drivers@...are.com>
Subject: RE: [Pv-drivers] [PATCH 14/14] vmxnet3: convert to SKB paged frag
API.
These changes look sane. What about frag->page_offset and frag->size, are there APIs to access those as well?
[sorry can't pull from git.kernel.org at the moment to answer my own quesion]
- Bhavesh
Bhavesh P. Davda
> -----Original Message-----
> From: pv-drivers-bounces@...are.com [mailto:pv-drivers-bounces@...are.com] On
> Behalf Of Ian Campbell
> Sent: Thursday, September 22, 2011 12:53 AM
> To: netdev@...r.kernel.org
> Cc: VMware, Inc.; Ian Campbell
> Subject: [Pv-drivers] [PATCH 14/14] vmxnet3: convert to SKB paged frag API.
>
> Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
> Cc: Shreyas Bhatewara <sbhatewara@...are.com>
> Cc: "VMware, Inc." <pv-drivers@...are.com>
> Cc: netdev@...r.kernel.org
> ---
> drivers/net/vmxnet3/vmxnet3_drv.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c
> b/drivers/net/vmxnet3/vmxnet3_drv.c
> index 759c1a4..57e7c66 100644
> --- a/drivers/net/vmxnet3/vmxnet3_drv.c
> +++ b/drivers/net/vmxnet3/vmxnet3_drv.c
> @@ -654,7 +654,7 @@ vmxnet3_append_frag(struct sk_buff *skb, struct
> Vmxnet3_RxCompDesc *rcd,
>
> BUG_ON(skb_shinfo(skb)->nr_frags >= MAX_SKB_FRAGS);
>
> - frag->page = rbi->page;
> + __skb_frag_set_page(frag, rbi->page);
> frag->page_offset = 0;
> frag->size = rcd->len;
> skb->data_len += frag->size;
> @@ -748,9 +748,9 @@ vmxnet3_map_pkt(struct sk_buff *skb, struct vmxnet3_tx_ctx
> *ctx,
>
> tbi = tq->buf_info + tq->tx_ring.next2fill;
> tbi->map_type = VMXNET3_MAP_PAGE;
> - tbi->dma_addr = pci_map_page(adapter->pdev, frag->page,
> - frag->page_offset, frag->size,
> - PCI_DMA_TODEVICE);
> + tbi->dma_addr = skb_frag_dma_map(&adapter->pdev->dev, frag,
> + 0, frag->size,
> + PCI_DMA_TODEVICE);
>
> tbi->len = frag->size;
>
> --
> 1.7.2.5
>
> _______________________________________________
> Pv-drivers mailing list
> Pv-drivers@...are.com
> http://mailman2.vmware.com/mailman/listinfo/pv-drivers
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists