Commit e0994eb1 authored by Divy Le Ray's avatar Divy Le Ray Committed by Jeff Garzik

cxgb3 - Feed Rx free list with pages

Populate Rx free list with pages.
Signed-off-by: default avatarDivy Le Ray <divy@chelsio.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent bae73f44
...@@ -74,6 +74,11 @@ enum { /* adapter flags */ ...@@ -74,6 +74,11 @@ enum { /* adapter flags */
struct rx_desc; struct rx_desc;
struct rx_sw_desc; struct rx_sw_desc;
struct sge_fl_page {
struct skb_frag_struct frag;
unsigned char *va;
};
struct sge_fl { /* SGE per free-buffer list state */ struct sge_fl { /* SGE per free-buffer list state */
unsigned int buf_size; /* size of each Rx buffer */ unsigned int buf_size; /* size of each Rx buffer */
unsigned int credits; /* # of available Rx buffers */ unsigned int credits; /* # of available Rx buffers */
...@@ -81,11 +86,13 @@ struct sge_fl { /* SGE per free-buffer list state */ ...@@ -81,11 +86,13 @@ struct sge_fl { /* SGE per free-buffer list state */
unsigned int cidx; /* consumer index */ unsigned int cidx; /* consumer index */
unsigned int pidx; /* producer index */ unsigned int pidx; /* producer index */
unsigned int gen; /* free list generation */ unsigned int gen; /* free list generation */
unsigned int cntxt_id; /* SGE context id for the free list */
struct sge_fl_page page;
struct rx_desc *desc; /* address of HW Rx descriptor ring */ struct rx_desc *desc; /* address of HW Rx descriptor ring */
struct rx_sw_desc *sdesc; /* address of SW 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 */ dma_addr_t phys_addr; /* physical address of HW ring start */
unsigned int cntxt_id; /* SGE context id for the free list */
unsigned long empty; /* # of times queue ran out of buffers */ unsigned long empty; /* # of times queue ran out of buffers */
unsigned long alloc_failed; /* # of times buffer allocation failed */
}; };
/* /*
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment