Skip to content

Commit

Permalink
cxgb3: prefetch buffer access in GRO mode
Browse files Browse the repository at this point in the history
Elmininate a cache miss when accessing the CPL header within
the first aggregated buffer.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Divy Le Ray authored and David S. Miller committed Mar 13, 2009
1 parent 8f43580 commit b2b964f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/cxgb3/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2029,6 +2029,8 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs,
pci_unmap_single(adap->pdev, pci_unmap_addr(sd, dma_addr),
fl->buf_size, PCI_DMA_FROMDEVICE);

prefetch(&qs->lro_frag_tbl);

rx_frag += nr_frags;
rx_frag->page = sd->pg_chunk.page;
rx_frag->page_offset = sd->pg_chunk.offset + offset;
Expand Down Expand Up @@ -2997,6 +2999,7 @@ int t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports,
V_NEWTIMER(q->rspq.holdoff_tmr));

mod_timer(&q->tx_reclaim_timer, jiffies + TX_RECLAIM_PERIOD);

return 0;

err_unlock:
Expand Down

0 comments on commit b2b964f

Please sign in to comment.