cxgb3 - Add page support to jumbo frame Rx queue
Subsystems (2)
PATCH 2/3 cxgb3 - Add page support to jumbo frame Rx queue
From: Divy Le Ray <[email protected]>
Add page support to Jumbo frame Rx queues.
---
drivers/net/cxgb3/adapter.h | 4 + drivers/net/cxgb3/sge.c | 118 ++++++++++++++++++++++++++++++------------- 2 files changed, 86 insertions(+), 36 deletions(-)
drivers/net/cxgb3/adapter.h +4 -0
@@ -92,6 +92,7 @@ struct sge_fl { /* SGE per free-buffer list state */unsigned int gen;/* free list generation */ 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 */ 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 */
@@ -116,12 +117,15 @@ struct sge_rspq { /* state for an SGE response queue */unsigned int polling;/* is the queue serviced through NAPI? */ unsigned int holdoff_tmr;/* interrupt holdoff timer in 100ns */ unsigned int next_holdoff;/* holdoff time for next interrupt */ +unsigned int rx_recycle_buf;/* whether recycling occurred +within current sop-eop */ struct rsp_desc *desc;/* address of HW response ring */ dma_addr_t phys_addr;/* physical address of the ring */ unsigned int cntxt_id;/* SGE context id for the response q */ spinlock_t lock;/* guards response processing */ struct sk_buff *rx_head;/* offload packet receive queue head */ struct sk_buff *rx_tail;/* offload packet receive queue tail */ +struct sk_buff *pg_skb;/* used to build frag list in napi handler */ unsigned long offload_pkts;unsigned long offload_bundles;
drivers/net/cxgb3/sge.c +82 -36
255 lines not on this page · raw message
Quoted 7 lines · On Tue, 20 May 2008 18:57:37 -0700 Divy Le Ray <[email protected]> wrote:
From: Divy Le Ray <[email protected]>
Add page support to Jumbo frame Rx queues.
...
drivers/net/cxgb3/sge.c nomem: q->alloc_failed++; · line 471
Quoted 9 lines
drivers/net/cxgb3/sge.c +2
-1@@ -460,7 +464,8 @@ nomem: q->alloc_failed++;if (q->use_pages) {if (q->pg_chunk.page) {put_page (q->pg_chunk.page); -__free_page (q->pg_chunk.page); +__free_pages (q->pg_chunk.page, + q->order); q->pg_chunk.page = sd->pg_chunk.page =NULL ; }
This hunk doesn't apply to 2.6.26-rc3, afacit. The code it's patching just isn't there. But I think I fixed it up OK.
Quoted 10 lines · Andrew Morton
Quoted 6 lines · On Tue, 20 May 2008 18:57:37 -0700 Divy Le Ray <[email protected]> wrote:
From: Divy Le Ray <[email protected]>
Add page support to Jumbo frame Rx queues.
...
Quoted 15 lines
drivers/net/cxgb3/sge.c nomem: q->alloc_failed++; · line 471
Quoted 11 lines
drivers/net/cxgb3/sge.c +2
-1@@ -460,7 +464,8 @@ nomem: q->alloc_failed++;if (q->use_pages) {if (q->pg_chunk.page) {put_page (q->pg_chunk.page); -__free_page (q->pg_chunk.page); +__free_pages (q->pg_chunk.page, + q->order); q->pg_chunk.page = sd->pg_chunk.page =NULL ; }This hunk doesn't apply to 2.6.26-rc3, afacit. The code it's patching just isn't there. But I think I fixed it up OK.
My bad.
I modified the first patch just before submission - namely to avoid freeing the Rx page if the DMA mapping failed. I managed to submit without locally pushing the follwing patches first. Sorry about that.
I'm resubmitting the series.
Cheers,
Divy