aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2008-03-17 19:59:51 -0700
committerJeff Garzik <jeff@garzik.org>2008-03-25 23:16:21 -0400
commitd1847a722e79bbfc557755d78f44d3e2c8ae5ea9 (patch)
tree44f2405079e4cfea2ddec6d7eb5fda1f00a1fb77 /drivers/net
parentba53e6b4878e07411826312c59bfe49561594b6e (diff)
netxen: fix rx dropped stats
Don't count rx dropped packets based on return value of netif_receive_skb(), which is misleading. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Tested-by: Vernon Mauery <mauery@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/netxen/netxen_nic.h7
-rw-r--r--drivers/net/netxen/netxen_nic_ethtool.c6
-rw-r--r--drivers/net/netxen/netxen_nic_init.c33
-rw-r--r--drivers/net/netxen/netxen_nic_isr.c2
4 files changed, 3 insertions, 45 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 070421b9e4f..7f20a03623a 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -818,12 +818,7 @@ struct netxen_adapter_stats {
u64 badskblen;
u64 nocmddescriptor;
u64 polled;
- u64 uphappy;
- u64 updropped;
- u64 uplcong;
- u64 uphcong;
- u64 upmcong;
- u64 updunno;
+ u64 rxdropped;
u64 txdropped;
u64 csummed;
u64 no_rcv;
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c
index d324ea3bc7b..6e98d830eef 100644
--- a/drivers/net/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/netxen/netxen_nic_ethtool.c
@@ -64,12 +64,6 @@ static const struct netxen_nic_stats netxen_nic_gstrings_stats[] = {
{"bad_skb_len", NETXEN_NIC_STAT(stats.badskblen)},
{"no_cmd_desc", NETXEN_NIC_STAT(stats.nocmddescriptor)},
{"polled", NETXEN_NIC_STAT(stats.polled)},
- {"uphappy", NETXEN_NIC_STAT(stats.uphappy)},
- {"updropped", NETXEN_NIC_STAT(stats.updropped)},
- {"uplcong", NETXEN_NIC_STAT(stats.uplcong)},
- {"uphcong", NETXEN_NIC_STAT(stats.uphcong)},
- {"upmcong", NETXEN_NIC_STAT(stats.upmcong)},
- {"updunno", NETXEN_NIC_STAT(stats.updunno)},
{"tx_dropped", NETXEN_NIC_STAT(stats.txdropped)},
{"csummed", NETXEN_NIC_STAT(stats.csummed)},
{"no_rcv", NETXEN_NIC_STAT(stats.no_rcv)},
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index fe646187aa8..d9713d933af 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -1089,7 +1089,7 @@ static void netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
skb = (struct sk_buff *)buffer->skb;
if (likely(adapter->rx_csum &&
- netxen_get_sts_status(sts_data) == STATUS_CKSUM_OK)) {
+ netxen_get_sts_status(sts_data) == STATUS_CKSUM_OK)) {
adapter->stats.csummed++;
skb->ip_summed = CHECKSUM_UNNECESSARY;
} else
@@ -1106,37 +1106,6 @@ static void netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
skb->protocol = eth_type_trans(skb, netdev);
ret = netif_receive_skb(skb);
-
- /*
- * RH: Do we need these stats on a regular basis. Can we get it from
- * Linux stats.
- */
- switch (ret) {
- case NET_RX_SUCCESS:
- adapter->stats.uphappy++;
- break;
-
- case NET_RX_CN_LOW:
- adapter->stats.uplcong++;
- break;
-
- case NET_RX_CN_MOD:
- adapter->stats.upmcong++;
- break;
-
- case NET_RX_CN_HIGH:
- adapter->stats.uphcong++;
- break;
-
- case NET_RX_DROP:
- adapter->stats.updropped++;
- break;
-
- default:
- adapter->stats.updunno++;
- break;
- }
-
netdev->last_rx = jiffies;
rcv_desc->rcv_pending--;
diff --git a/drivers/net/netxen/netxen_nic_isr.c b/drivers/net/netxen/netxen_nic_isr.c
index 1a2333a52b5..c81313b717b 100644
--- a/drivers/net/netxen/netxen_nic_isr.c
+++ b/drivers/net/netxen/netxen_nic_isr.c
@@ -59,7 +59,7 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
/* packet transmit problems */
stats->tx_errors = adapter->stats.nocmddescriptor;
/* no space in linux buffers */
- stats->rx_dropped = adapter->stats.updropped;
+ stats->rx_dropped = adapter->stats.rxdropped;
/* no space available in linux */
stats->tx_dropped = adapter->stats.txdropped;