diff options
author | Divy Le Ray <divy@chelsio.com> | 2009-03-26 12:39:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 03:46:59 -0400 |
commit | 5e68b772e6efd189d6aca76f6872fb75d51ace60 (patch) | |
tree | 88a988918d021d397756790d89c8801adb131195 /drivers/net/cxgb3/adapter.h | |
parent | 952cdf333f9d1b0b71f1b9a3c5e421a2673ed7de (diff) |
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.h | 3 |
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 { | |||
85 | struct page *page; | 85 | struct page *page; |
86 | void *va; | 86 | void *va; |
87 | unsigned int offset; | 87 | unsigned int offset; |
88 | u64 *p_cnt; | ||
89 | DECLARE_PCI_UNMAP_ADDR(mapping); | ||
88 | }; | 90 | }; |
89 | 91 | ||
90 | struct rx_desc; | 92 | struct rx_desc; |
@@ -101,6 +103,7 @@ struct sge_fl { /* SGE per free-buffer list state */ | |||
101 | struct fl_pg_chunk pg_chunk;/* page chunk cache */ | 103 | struct fl_pg_chunk pg_chunk;/* page chunk cache */ |
102 | unsigned int use_pages; /* whether FL uses pages or sk_buffs */ | 104 | unsigned int use_pages; /* whether FL uses pages or sk_buffs */ |
103 | unsigned int order; /* order of page allocations */ | 105 | unsigned int order; /* order of page allocations */ |
106 | unsigned int alloc_size; /* size of allocated buffer */ | ||
104 | struct rx_desc *desc; /* address of HW Rx descriptor ring */ | 107 | struct rx_desc *desc; /* address of HW Rx descriptor ring */ |
105 | struct rx_sw_desc *sdesc; /* address of SW Rx descriptor ring */ | 108 | struct rx_sw_desc *sdesc; /* address of SW Rx descriptor ring */ |
106 | dma_addr_t phys_addr; /* physical address of HW ring start */ | 109 | dma_addr_t phys_addr; /* physical address of HW ring start */ |