diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-04-22 02:51:35 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-22 15:28:26 -0700 |
commit | 8ae6df978b986a5ce099e7e7118f127563d2cbbe (patch) | |
tree | 3caffdbc168440397c2d20a0627c0254188b6bbf /drivers/net/qlcnic/qlcnic_init.c | |
parent | e802af9cabb011f09b9c19a82faef3dd315f27eb (diff) | |
download | linux-8ae6df978b986a5ce099e7e7118f127563d2cbbe.tar.gz linux-8ae6df978b986a5ce099e7e7118f127563d2cbbe.tar.bz2 linux-8ae6df978b986a5ce099e7e7118f127563d2cbbe.zip |
qlcnic: additional driver statistics
Added additional driver statistics to track errors in rcv/tx path.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_init.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_init.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 01ce74ee99f9..9ef9f58f84dd 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c @@ -1287,6 +1287,7 @@ qlcnic_alloc_rx_skb(struct qlcnic_adapter *adapter, rds_ring->dma_size, PCI_DMA_FROMDEVICE); if (pci_dma_mapping_error(pdev, dma)) { + adapter->stats.rx_dma_map_error++; dev_kfree_skb_any(skb); buffer->skb = NULL; return -ENOMEM; @@ -1311,8 +1312,10 @@ static struct sk_buff *qlcnic_process_rxbuf(struct qlcnic_adapter *adapter, PCI_DMA_FROMDEVICE); skb = buffer->skb; - if (!skb) + if (!skb) { + adapter->stats.null_skb++; goto no_skb; + } if (likely(adapter->rx_csum && cksum == STATUS_CKSUM_OK)) { adapter->stats.csummed++; @@ -1502,6 +1505,8 @@ qlcnic_process_rcv_ring(struct qlcnic_host_sds_ring *sds_ring, int max) if (rxbuf) list_add_tail(&rxbuf->list, &sds_ring->free_list[ring]); + else + adapter->stats.null_rxbuf++; skip: for (; desc_cnt > 0; desc_cnt--) { |