be2net: Add be_rx_polls counter
authorAjit Khaparde <ajitk@serverengines.com>
Sun, 29 Nov 2009 17:57:22 +0000 (17:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Dec 2009 08:50:26 +0000 (00:50 -0800)
Add be_rx_polls to count number of times NAPI called rx poll function.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/benet/be.h
drivers/net/benet/be_ethtool.c
drivers/net/benet/be_main.c

index dc7c19e491117aeacd182142219f5512484e7bf9..d90cc015abb3e0806bc37ea9711904bf30fa745a 100644 (file)
@@ -170,7 +170,7 @@ struct be_drvr_stats {
        u32 cache_barrier[16];
 
        u32 be_ethrx_post_fail;/* number of ethrx buffer alloc failures */
-       u32 be_polls;           /* number of times NAPI called poll function */
+       u32 be_rx_polls;        /* number of times NAPI called poll function */
        u32 be_rx_events;       /* number of ucast rx completion events  */
        u32 be_rx_compl;        /* number of rx completion entries processed */
        ulong be_rx_jiffies;
index 9eabed4e3b92dc58640b9d513f4add100c1ab405..3c05f2b99ab64361ad2a78238c80a4b2815d812c 100644 (file)
@@ -55,7 +55,7 @@ static const struct be_ethtool_stat et_stats[] = {
        {DRVSTAT_INFO(be_tx_stops)},
        {DRVSTAT_INFO(be_fwd_reqs)},
        {DRVSTAT_INFO(be_tx_wrbs)},
-       {DRVSTAT_INFO(be_polls)},
+       {DRVSTAT_INFO(be_rx_polls)},
        {DRVSTAT_INFO(be_tx_events)},
        {DRVSTAT_INFO(be_rx_events)},
        {DRVSTAT_INFO(be_tx_compl)},
index 10262fab686bdd762df118583b3ea7d7f70ed9dd..f3e97ab3321d5636067a507b83be2f2d778eef2f 100644 (file)
@@ -1381,6 +1381,7 @@ int be_poll_rx(struct napi_struct *napi, int budget)
        struct be_eth_rx_compl *rxcp;
        u32 work_done;
 
+       adapter->stats.drvr_stats.be_rx_polls++;
        for (work_done = 0; work_done < budget; work_done++) {
                rxcp = be_rx_compl_get(adapter);
                if (!rxcp)