Skip to contentSkip to conversation

cxgb3 - Feed Rx free list with pages

PATCH In review [email protected] 1 participant 1 message Feb 25, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/7 cxgb3 - Feed Rx free list with pages

From: Divy Le Ray <[email protected]>

Populate Rx free list with pages.

---

 drivers/net/cxgb3/adapter.h |    9 +
 drivers/net/cxgb3/sge.c     |  318 +++++++++++++++++++++++++++++++------------
 2 files changed, 235 insertions(+), 92 deletions(-)
drivers/net/cxgb3/adapter.h +8 -1
index 01b99b9..80c3d8f 100644
@@ -74,6 +74,11 @@ enum {				/* adapter flags */
 struct rx_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 */
 	unsigned int buf_size;	/* size of each Rx buffer */
 	unsigned int credits;	/* # of available Rx buffers */
@@ -81,11 +86,13 @@ struct sge_fl {			/* SGE per free-buffer
 	unsigned int cidx;	/* consumer index */
 	unsigned int pidx;	/* producer index */
 	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_sw_desc *sdesc;	/* address of SW Rx descriptor ring */
 	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 alloc_failed; /* # of times buffer allocation failed */
 };
 
 /*
drivers/net/cxgb3/sge.c +227 -91

452 lines not on this page · raw message