Commit d1847a72 authored by Dhananjay Phadke's avatar Dhananjay Phadke Committed by Jeff Garzik

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: default avatarDhananjay Phadke <dhananjay@netxen.com>
Tested-by: default avatarVernon Mauery <mauery@us.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent ba53e6b4
...@@ -818,12 +818,7 @@ struct netxen_adapter_stats { ...@@ -818,12 +818,7 @@ struct netxen_adapter_stats {
u64 badskblen; u64 badskblen;
u64 nocmddescriptor; u64 nocmddescriptor;
u64 polled; u64 polled;
u64 uphappy; u64 rxdropped;
u64 updropped;
u64 uplcong;
u64 uphcong;
u64 upmcong;
u64 updunno;
u64 txdropped; u64 txdropped;
u64 csummed; u64 csummed;
u64 no_rcv; u64 no_rcv;
......
...@@ -64,12 +64,6 @@ static const struct netxen_nic_stats netxen_nic_gstrings_stats[] = { ...@@ -64,12 +64,6 @@ static const struct netxen_nic_stats netxen_nic_gstrings_stats[] = {
{"bad_skb_len", NETXEN_NIC_STAT(stats.badskblen)}, {"bad_skb_len", NETXEN_NIC_STAT(stats.badskblen)},
{"no_cmd_desc", NETXEN_NIC_STAT(stats.nocmddescriptor)}, {"no_cmd_desc", NETXEN_NIC_STAT(stats.nocmddescriptor)},
{"polled", NETXEN_NIC_STAT(stats.polled)}, {"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)}, {"tx_dropped", NETXEN_NIC_STAT(stats.txdropped)},
{"csummed", NETXEN_NIC_STAT(stats.csummed)}, {"csummed", NETXEN_NIC_STAT(stats.csummed)},
{"no_rcv", NETXEN_NIC_STAT(stats.no_rcv)}, {"no_rcv", NETXEN_NIC_STAT(stats.no_rcv)},
......
...@@ -1089,7 +1089,7 @@ static void netxen_process_rcv(struct netxen_adapter *adapter, int ctxid, ...@@ -1089,7 +1089,7 @@ static void netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
skb = (struct sk_buff *)buffer->skb; skb = (struct sk_buff *)buffer->skb;
if (likely(adapter->rx_csum && 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++; adapter->stats.csummed++;
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
} else } else
...@@ -1106,37 +1106,6 @@ static void netxen_process_rcv(struct netxen_adapter *adapter, int ctxid, ...@@ -1106,37 +1106,6 @@ static void netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
skb->protocol = eth_type_trans(skb, netdev); skb->protocol = eth_type_trans(skb, netdev);
ret = netif_receive_skb(skb); 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; netdev->last_rx = jiffies;
rcv_desc->rcv_pending--; rcv_desc->rcv_pending--;
......
...@@ -59,7 +59,7 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev) ...@@ -59,7 +59,7 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
/* packet transmit problems */ /* packet transmit problems */
stats->tx_errors = adapter->stats.nocmddescriptor; stats->tx_errors = adapter->stats.nocmddescriptor;
/* no space in linux buffers */ /* no space in linux buffers */
stats->rx_dropped = adapter->stats.updropped; stats->rx_dropped = adapter->stats.rxdropped;
/* no space available in linux */ /* no space available in linux */
stats->tx_dropped = adapter->stats.txdropped; stats->tx_dropped = adapter->stats.txdropped;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment