diff options
author | Divy Le Ray <divy@chelsio.com> | 2007-05-31 00:10:47 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-08 22:16:39 -0400 |
commit | cf992af561cc3ba72d79582535e6262818b00548 (patch) | |
tree | df96ec9bf963a78d460f4647a382ef9814c9f873 /drivers/net/cxgb3/adapter.h | |
parent | 287aa83dffd1b39859f49d73b0d67f57106de5f1 (diff) |
cxgb3 - sge page management
Streamline sge page management.
Fix dma mappings when buffers are recycled.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cxgb3/adapter.h')
-rw-r--r-- | drivers/net/cxgb3/adapter.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h index 80c3d8f268a7..ab72563b81ee 100644 --- a/drivers/net/cxgb3/adapter.h +++ b/drivers/net/cxgb3/adapter.h | |||
@@ -71,27 +71,29 @@ enum { /* adapter flags */ | |||
71 | QUEUES_BOUND = (1 << 3), | 71 | QUEUES_BOUND = (1 << 3), |
72 | }; | 72 | }; |
73 | 73 | ||
74 | struct fl_pg_chunk { | ||
75 | struct page *page; | ||
76 | void *va; | ||
77 | unsigned int offset; | ||
78 | }; | ||
79 | |||
74 | struct rx_desc; | 80 | struct rx_desc; |
75 | struct rx_sw_desc; | 81 | struct rx_sw_desc; |
76 | 82 | ||
77 | struct sge_fl_page { | 83 | struct sge_fl { /* SGE per free-buffer list state */ |
78 | struct skb_frag_struct frag; | 84 | unsigned int buf_size; /* size of each Rx buffer */ |
79 | unsigned char *va; | 85 | unsigned int credits; /* # of available Rx buffers */ |
80 | }; | 86 | unsigned int size; /* capacity of free list */ |
81 | 87 | unsigned int cidx; /* consumer index */ | |
82 | struct sge_fl { /* SGE per free-buffer list state */ | 88 | unsigned int pidx; /* producer index */ |
83 | unsigned int buf_size; /* size of each Rx buffer */ | 89 | unsigned int gen; /* free list generation */ |
84 | unsigned int credits; /* # of available Rx buffers */ | 90 | struct fl_pg_chunk pg_chunk;/* page chunk cache */ |
85 | unsigned int size; /* capacity of free list */ | 91 | unsigned int use_pages; /* whether FL uses pages or sk_buffs */ |
86 | unsigned int cidx; /* consumer index */ | 92 | struct rx_desc *desc; /* address of HW Rx descriptor ring */ |
87 | unsigned int pidx; /* producer index */ | 93 | struct rx_sw_desc *sdesc; /* address of SW Rx descriptor ring */ |
88 | unsigned int gen; /* free list generation */ | 94 | dma_addr_t phys_addr; /* physical address of HW ring start */ |
89 | unsigned int cntxt_id; /* SGE context id for the free list */ | 95 | unsigned int cntxt_id; /* SGE context id for the free list */ |
90 | struct sge_fl_page page; | 96 | unsigned long empty; /* # of times queue ran out of buffers */ |
91 | struct rx_desc *desc; /* address of HW Rx descriptor ring */ | ||
92 | struct rx_sw_desc *sdesc; /* address of SW Rx descriptor ring */ | ||
93 | dma_addr_t phys_addr; /* physical address of HW ring start */ | ||
94 | unsigned long empty; /* # of times queue ran out of buffers */ | ||
95 | unsigned long alloc_failed; /* # of times buffer allocation failed */ | 97 | unsigned long alloc_failed; /* # of times buffer allocation failed */ |
96 | }; | 98 | }; |
97 | 99 | ||