From: N N Ashok <nalkunda@egr.msu.edu>
To: netdev@oss.sgi.com
Subject: Difference between (struct tc_stats) and (struct net_device_stats)
Date: Fri, 18 Jul 2003 23:55:30 -0400 [thread overview]
Message-ID: <200307182355.30867.nalkunda@egr.msu.edu> (raw)
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
<snip>
};
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;
<snip>
};
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?
Thanks,
Ashok
reply other threads:[~2003-07-19 3:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200307182355.30867.nalkunda@egr.msu.edu \
--to=nalkunda@egr.msu.edu \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.