diff options
author | Hariprasad Shenai <hariprasad@chelsio.com> | 2015-12-08 10:09:16 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-08 22:43:15 -0500 |
commit | 70055dd0640666a8ffe7c98e91f0b36fd380fe2a (patch) | |
tree | 7b18cc20f532210f453c22ed6c1486af99a86e61 /drivers/net/ethernet/chelsio/cxgb4/sge.c | |
parent | 8d0557d27d59e830b2f90cfcd06a4e4e20e5f11d (diff) | |
download | op-kernel-dev-70055dd0640666a8ffe7c98e91f0b36fd380fe2a.zip op-kernel-dev-70055dd0640666a8ffe7c98e91f0b36fd380fe2a.tar.gz |
cxgb4: Add FL DMA mapping error and low counter
Add Free List DMA Mapping Errors to SGE Queue info for
Free Lists. Add Free List "Low" counter to count the number of times we
see the number of pointers that we _think_ the hardware sees in the
Free List below the Egress Threshold.
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/sge.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/sge.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c index c72fe1e..8d35ce3 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c @@ -613,6 +613,7 @@ static unsigned int refill_fl(struct adapter *adap, struct sge_fl *q, int n, PCI_DMA_FROMDEVICE); if (unlikely(dma_mapping_error(adap->pdev_dev, mapping))) { __free_pages(pg, s->fl_pg_order); + q->mapping_err++; goto out; /* do not try small pages for this error */ } mapping |= RX_LARGE_PG_BUF; @@ -642,6 +643,7 @@ alloc_small_pages: PCI_DMA_FROMDEVICE); if (unlikely(dma_mapping_error(adap->pdev_dev, mapping))) { put_page(pg); + q->mapping_err++; goto out; } *d++ = cpu_to_be64(mapping); @@ -663,6 +665,7 @@ out: cred = q->avail - cred; if (unlikely(fl_starving(adap, q))) { smp_wmb(); + q->low++; set_bit(q->cntxt_id - adap->sge.egr_start, adap->sge.starving_fl); } |