Mercurial > illumos > illumos-gate
changeset 7245:19219ac01814
6728792 ixgbe does not export the obytes stat data
author | gg161487 |
---|---|
date | Thu, 31 Jul 2008 19:45:39 -0700 |
parents | ebb575deece3 |
children | 27944777b08c |
files | usr/src/uts/common/io/ixgbe/ixgbe_gld.c usr/src/uts/common/io/ixgbe/ixgbe_main.c usr/src/uts/common/io/ixgbe/ixgbe_stat.c usr/src/uts/common/io/ixgbe/ixgbe_sw.h |
diffstat | 4 files changed, 25 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/ixgbe/ixgbe_gld.c Thu Jul 31 19:21:46 2008 -0700 +++ b/usr/src/uts/common/io/ixgbe/ixgbe_gld.c Thu Jul 31 19:45:39 2008 -0700 @@ -109,6 +109,13 @@ *val = ixgbe_ks->tor.value.ui64; break; + case MAC_STAT_OBYTES: + for (i = 0; i < 16; i++) + ixgbe_ks->tot.value.ui64 += + IXGBE_READ_REG(hw, IXGBE_QBTC(i)); + *val = ixgbe_ks->tot.value.ui64; + break; + case MAC_STAT_IPACKETS: ixgbe_ks->tpr.value.ui64 += IXGBE_READ_REG(hw, IXGBE_TPR);
--- a/usr/src/uts/common/io/ixgbe/ixgbe_main.c Thu Jul 31 19:21:46 2008 -0700 +++ b/usr/src/uts/common/io/ixgbe/ixgbe_main.c Thu Jul 31 19:45:39 2008 -0700 @@ -30,7 +30,7 @@ #include "ixgbe_sw.h" -static char ident[] = "Intel 10Gb Ethernet 1.0.1"; +static char ident[] = "Intel 10Gb Ethernet 1.0.2"; /* * Local function protoypes @@ -1845,12 +1845,9 @@ } /* - * Initialize hardware checksum offload settings + * Initialize the s/w context structure */ - tx_ring->tx_context.hcksum_flags = 0; - tx_ring->tx_context.ip_hdr_len = 0; - tx_ring->tx_context.mac_hdr_len = 0; - tx_ring->tx_context.l4_proto = 0; + bzero(&tx_ring->tx_context, sizeof (ixgbe_tx_context_t)); } static void
--- a/usr/src/uts/common/io/ixgbe/ixgbe_stat.c Thu Jul 31 19:21:46 2008 -0700 +++ b/usr/src/uts/common/io/ixgbe/ixgbe_stat.c Thu Jul 31 19:45:39 2008 -0700 @@ -95,9 +95,22 @@ ixgbe_ks->gprc.value.ul += IXGBE_READ_REG(hw, IXGBE_QPRC(i)); ixgbe_ks->gptc.value.ul += IXGBE_READ_REG(hw, IXGBE_QPTC(i)); ixgbe_ks->tor.value.ui64 += IXGBE_READ_REG(hw, IXGBE_QBRC(i)); - ixgbe_ks->got.value.ui64 += IXGBE_READ_REG(hw, IXGBE_QBTC(i)); + ixgbe_ks->tot.value.ui64 += IXGBE_READ_REG(hw, IXGBE_QBTC(i)); } + + /* + * This is a Workaround: + * Currently h/w GORCH, GOTCH, TORH registers are not + * correctly implemented. We found that the values in + * these registers are same as those in corresponding + * *L registers (i.e. GORCL, GOTCL, and TORL). Here the + * gor and got stat data will not be retrieved through + * GORC{H/L} and GOTC{H/L} registers but be obtained by + * simply assigning tor/tot stat data, so the gor/got + * stat data will not be accurate. + */ ixgbe_ks->gor.value.ui64 = ixgbe_ks->tor.value.ui64; + ixgbe_ks->got.value.ui64 = ixgbe_ks->tot.value.ui64; ixgbe_ks->prc64.value.ul += IXGBE_READ_REG(hw, IXGBE_PRC64); ixgbe_ks->prc127.value.ul += IXGBE_READ_REG(hw, IXGBE_PRC127);
--- a/usr/src/uts/common/io/ixgbe/ixgbe_sw.h Thu Jul 31 19:21:46 2008 -0700 +++ b/usr/src/uts/common/io/ixgbe/ixgbe_sw.h Thu Jul 31 19:45:39 2008 -0700 @@ -750,6 +750,7 @@ kstat_named_t roc; /* Receive Oversize Count */ kstat_named_t rjc; /* Receive Jabber Count */ kstat_named_t tor; /* Total Octets Recvd Count */ + kstat_named_t tot; /* Total Octets Xmitted Count */ kstat_named_t tpr; /* Total Packets Received */ kstat_named_t tpt; /* Total Packets Xmitted */ kstat_named_t mptc; /* Multicast Packets Xmited Count */