summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cisco/enic/enic.h
diff options
context:
space:
mode:
authorGovindarajulu Varadarajan <_govind@gmx.com>2014-12-24 15:59:38 +0530
committerDavid S. Miller <davem@davemloft.net>2014-12-31 13:08:45 -0500
commit58feff07e9c964a88f82d13d272d384bd4274a33 (patch)
tree5ad7ef704398f5dd859fac7a14831bdcc8389a8d /drivers/net/ethernet/cisco/enic/enic.h
parent065df159ec588630a360a689e4e3043c6622a6e9 (diff)
downloadblackbird-op-linux-58feff07e9c964a88f82d13d272d384bd4274a33.tar.gz
blackbird-op-linux-58feff07e9c964a88f82d13d272d384bd4274a33.zip
enic: add stats for dma mapping error
This patch adds generic statistics for enic. As of now dma_map_error is the only member. dma_map_erro is incremented every time dma maping error happens. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cisco/enic/enic.h')
-rw-r--r--drivers/net/ethernet/cisco/enic/enic.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cisco/enic/enic.h b/drivers/net/ethernet/cisco/enic/enic.h
index b2ea35a3a881..d2a103547c67 100644
--- a/drivers/net/ethernet/cisco/enic/enic.h
+++ b/drivers/net/ethernet/cisco/enic/enic.h
@@ -188,6 +188,7 @@ struct enic {
struct enic_rfs_flw_tbl rfs_h;
u32 rx_copybreak;
u8 rss_key[ENIC_RSS_LEN];
+ struct vnic_gen_stats gen_stats;
};
static inline struct device *enic_get_dev(struct enic *enic)
@@ -247,6 +248,7 @@ static inline int enic_dma_map_check(struct enic *enic, dma_addr_t dma_addr)
if (unlikely(pci_dma_mapping_error(enic->pdev, dma_addr))) {
net_warn_ratelimited("%s: PCI dma mapping failed!\n",
enic->netdev->name);
+ enic->gen_stats.dma_map_error++;
return -ENOMEM;
}
OpenPOWER on IntegriCloud