All of
 help / color / mirror / Atom feed
* Difference between (struct tc_stats) and (struct net_device_stats)
@ 2003-07-19  3:55 N N Ashok
  0 siblings, 0 replies; only message in thread
From: N N Ashok @ 2003-07-19  3:55 UTC (permalink / raw)
  To: netdev

Hi All,
   The tc_stats and net_device_stats are defined as below:
struct tc_stats
	__u64	bytes;			/* NUmber of enqueues bytes */
	__u32	packets;		/* Number of enqueued packets	*/
	__u32	drops;			/* Packets dropped because of lack of resources */
	__u32	overlimits;		/* Number of throttle events when this
struct net_device_stats
	unsigned long	rx_packets;		/* total packets received	*/
	unsigned long	tx_packets;		/* total packets transmitted	*/
	unsigned long	rx_bytes;		/* total bytes received 	*/
	unsigned long	tx_bytes;		/* total bytes transmitted	*/
	unsigned long	rx_errors;		/* bad packets received		*/
	unsigned long	tx_errors;		/* packet transmit problems	*/
	unsigned long	rx_dropped;		/* no space in linux buffers	*/
	unsigned long	tx_dropped;		/* no space available in linux	*/
	unsigned long	multicast;		/* multicast packets received	*/
	unsigned long	collisions;

      I add an estimator to one of my interfaces and if I observe, the 
bytes,packets in tc_stats for the estimator are not the same as rx_packets, 
rx_bytes of net_device_stats obtainted by get_stats(dev) of the same 
interface at almost the same time. Is there a difference in the meaning/range 
of the two structure fields? In net_device_stats, we have counts for drops, 
errors but no such fields for tc_stats. Are these counts also included in the 
bytes, packets fields of tc_stats?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-19  3:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-19  3:55 Difference between (struct tc_stats) and (struct net_device_stats) N N Ashok

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.