diff options
author | Divy Le Ray <divy@chelsio.com> | 2009-03-26 16:39:29 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 00:46:59 -0700 |
commit | 5e68b772e6efd189d6aca76f6872fb75d51ace60 (patch) | |
tree | 88a988918d021d397756790d89c8801adb131195 /drivers/net/cxgb3/adapter.h | |
parent | 952cdf333f9d1b0b71f1b9a3c5e421a2673ed7de (diff) | |
download | op-kernel-dev-5e68b772e6efd189d6aca76f6872fb75d51ace60.zip op-kernel-dev-5e68b772e6efd189d6aca76f6872fb75d51ace60.tar.gz |
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 2cf6c92..714df2b 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 */ |