summaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3/adapter.h
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2009-03-26 17:39:29 +0100
committerDavid S. Miller <davem@davemloft.net>2009-03-27 08:46:59 +0100
commit5e68b772e6efd189d6aca76f6872fb75d51ace60 (patch)
tree88a988918d021d397756790d89c8801adb131195 /drivers/net/cxgb3/adapter.h
parentcxgb3: differentiate portx and Tx channels (diff)
downloadlinux-5e68b772e6efd189d6aca76f6872fb75d51ace60.tar.xz
linux-5e68b772e6efd189d6aca76f6872fb75d51ace60.zip
cxgb3: map entire Rx page, feed map+offset to Rx ring.
DMA mapping can be expensive in the presence of iommus. Reduce the Rx iommu activity by mapping an entire page, and provide the H/W the mapped address + offset of the current page chunk. Reserve bits at the end of the page to track mapping references, so the page can be unmapped. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3/adapter.h')
-rw-r--r--drivers/net/cxgb3/adapter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h
index 2cf6c9299f22..714df2b675e6 100644
--- a/drivers/net/cxgb3/adapter.h
+++ b/drivers/net/cxgb3/adapter.h
@@ -85,6 +85,8 @@ struct fl_pg_chunk {
struct page *page;
void *va;
unsigned int offset;
+ u64 *p_cnt;
+ DECLARE_PCI_UNMAP_ADDR(mapping);
};
struct rx_desc;
@@ -101,6 +103,7 @@ struct sge_fl { /* SGE per free-buffer list state */
struct fl_pg_chunk pg_chunk;/* page chunk cache */
unsigned int use_pages; /* whether FL uses pages or sk_buffs */
unsigned int order; /* order of page allocations */
+ unsigned int alloc_size; /* size of allocated buffer */
struct rx_desc *desc; /* address of HW Rx descriptor ring */
struct rx_sw_desc *sdesc; /* address of SW Rx descriptor ring */
dma_addr_t phys_addr; /* physical address of HW ring start */