aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2008-03-17 22:59:51 -0400
committerJeff Garzik <jeff@garzik.org>2008-03-25 23:16:21 -0400
commitd1847a722e79bbfc557755d78f44d3e2c8ae5ea9 (patch)
tree44f2405079e4cfea2ddec6d7eb5fda1f00a1fb77 /drivers/net/netxen
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/netxen')
-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 070421b9e4f9..7f20a03623a0 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -818,12 +818,7 @@ struct netxen_adapter_stats {
818 u64 badskblen; 818 u64 badskblen;
819 u64 nocmddescriptor; 819 u64 nocmddescriptor;
820 u64 polled; 820 u64 polled;
821 u64 uphappy; 821 u64 rxdropped;
822 u64 updropped;
823 u64 uplcong;
824 u64 uphcong;
825 u64 upmcong;
826 u64 updunno;
827 u64 txdropped; 822 u64 txdropped;
828 u64 csummed; 823 u64 csummed;
829 u64 no_rcv; 824 u64 no_rcv;
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c
index d324ea3bc7ba..6e98d830eefb 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[] = {
64 {"bad_skb_len", NETXEN_NIC_STAT(stats.badskblen)}, 64 {"bad_skb_len", NETXEN_NIC_STAT(stats.badskblen)},
65 {"no_cmd_desc", NETXEN_NIC_STAT(stats.nocmddescriptor)}, 65 {"no_cmd_desc", NETXEN_NIC_STAT(stats.nocmddescriptor)},
66 {"polled", NETXEN_NIC_STAT(stats.polled)}, 66 {"polled", NETXEN_NIC_STAT(stats.polled)},
67 {"uphappy", NETXEN_NIC_STAT(stats.uphappy)},
68 {"updropped", NETXEN_NIC_STAT(stats.updropped)},
69 {"uplcong", NETXEN_NIC_STAT(stats.uplcong)},
70 {"uphcong", NETXEN_NIC_STAT(stats.uphcong)},
71 {"upmcong", NETXEN_NIC_STAT(stats.upmcong)},
72 {"updunno", NETXEN_NIC_STAT(stats.updunno)},
73 {"tx_dropped", NETXEN_NIC_STAT(stats.txdropped)}, 67 {"tx_dropped", NETXEN_NIC_STAT(stats.txdropped)},
74 {"csummed", NETXEN_NIC_STAT(stats.csummed)}, 68 {"csummed", NETXEN_NIC_STAT(stats.csummed)},
75 {"no_rcv", NETXEN_NIC_STAT(stats.no_rcv)}, 69 {"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 fe646187aa86..d9713d933af5 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,
1089 skb = (struct sk_buff *)buffer->skb; 1089 skb = (struct sk_buff *)buffer->skb;
1090 1090
1091 if (likely(adapter->rx_csum && 1091 if (likely(adapter->rx_csum &&
1092 netxen_get_sts_status(sts_data) == STATUS_CKSUM_OK)) { 1092 netxen_get_sts_status(sts_data) == STATUS_CKSUM_OK)) {
1093 adapter->stats.csummed++; 1093 adapter->stats.csummed++;
1094 skb->ip_summed = CHECKSUM_UNNECESSARY; 1094 skb->ip_summed = CHECKSUM_UNNECESSARY;
1095 } else 1095 } else
@@ -1106,37 +1106,6 @@ static void netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
1106 skb->protocol = eth_type_trans(skb, netdev); 1106 skb->protocol = eth_type_trans(skb, netdev);
1107 1107
1108 ret = netif_receive_skb(skb); 1108 ret = netif_receive_skb(skb);
1109
1110 /*
1111 * RH: Do we need these stats on a regular basis. Can we get it from
1112 * Linux stats.
1113 */
1114 switch (ret) {
1115 case NET_RX_SUCCESS:
1116 adapter->stats.uphappy++;
1117 break;
1118
1119 case NET_RX_CN_LOW:
1120 adapter->stats.uplcong++;
1121 break;
1122
1123 case NET_RX_CN_MOD:
1124 adapter->stats.upmcong++;
1125 break;
1126
1127 case NET_RX_CN_HIGH:
1128 adapter->stats.uphcong++;
1129 break;
1130
1131 case NET_RX_DROP:
1132 adapter->stats.updropped++;
1133 break;
1134
1135 default:
1136 adapter->stats.updunno++;
1137 break;
1138 }
1139
1140 netdev->last_rx = jiffies; 1109 netdev->last_rx = jiffies;
1141 1110
1142 rcv_desc->rcv_pending--; 1111 rcv_desc->rcv_pending--;
diff --git a/drivers/net/netxen/netxen_nic_isr.c b/drivers/net/netxen/netxen_nic_isr.c
index 1a2333a52b5d..c81313b717bd 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)
59 /* packet transmit problems */ 59 /* packet transmit problems */
60 stats->tx_errors = adapter->stats.nocmddescriptor; 60 stats->tx_errors = adapter->stats.nocmddescriptor;
61 /* no space in linux buffers */ 61 /* no space in linux buffers */
62 stats->rx_dropped = adapter->stats.updropped; 62 stats->rx_dropped = adapter->stats.rxdropped;
63 /* no space available in linux */ 63 /* no space available in linux */
64 stats->tx_dropped = adapter->stats.txdropped; 64 stats->tx_dropped = adapter->stats.txdropped;
65 65