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>
This commit is contained in:

committed by
David S. Miller

parent
952cdf333f
commit
5e68b772e6
@@ -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 */
|
||||
|
Reference in New Issue
Block a user