aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.h
diff options
context:
space:
mode:
authorSandeep Gopalpet <sandeep.kumar@freescale.com>2009-12-15 20:15:07 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-18 23:38:37 -0500
commita7f38041b8c38d0721b042c123bd5d6bd2d21feb (patch)
tree375dc0df2bf89ac9502972b986018dd16fa9dad6 /drivers/net/gianfar.h
parent1ccb8389f26f2d513b06abe45d8e0b8f32458302 (diff)
gianfar: Fix stats support
This patch updates the per rx/tx queue stats. To update the per rx queue stats a new structure has been introduced rx_q_stats. The per tx queue stats are updated via the netdev_queue structure itself. Note that we update only the tx_packtes, tx_bytes, rx_packets, rx_bytes and rx_dropped stats on a per queue basis. Signed-off-by: Sandeep Gopalpet <Sandeep.Kumar@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar.h')
-rw-r--r--drivers/net/gianfar.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index 68d16dc6e7c8..4943cbe642ab 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -940,6 +940,15 @@ struct gfar_priv_tx_q {
940 unsigned short txtime; 940 unsigned short txtime;
941}; 941};
942 942
943/*
944 * Per RX queue stats
945 */
946struct rx_q_stats {
947 unsigned long rx_packets;
948 unsigned long rx_bytes;
949 unsigned long rx_dropped;
950};
951
943/** 952/**
944 * struct gfar_priv_rx_q - per rx queue structure 953 * struct gfar_priv_rx_q - per rx queue structure
945 * @rxlock: per queue rx spin lock 954 * @rxlock: per queue rx spin lock
@@ -962,6 +971,7 @@ struct gfar_priv_rx_q {
962 struct rxbd8 *cur_rx; 971 struct rxbd8 *cur_rx;
963 struct net_device *dev; 972 struct net_device *dev;
964 struct gfar_priv_grp *grp; 973 struct gfar_priv_grp *grp;
974 struct rx_q_stats stats;
965 u16 skb_currx; 975 u16 skb_currx;
966 u16 qindex; 976 u16 qindex;
967 unsigned int rx_ring_size; 977 unsigned int rx_ring_size;