diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/ixgbe/ixgbe_gld.c | 7 | ||||
-rw-r--r-- | usr/src/uts/common/io/ixgbe/ixgbe_main.c | 9 | ||||
-rw-r--r-- | usr/src/uts/common/io/ixgbe/ixgbe_stat.c | 15 | ||||
-rw-r--r-- | usr/src/uts/common/io/ixgbe/ixgbe_sw.h | 1 |
4 files changed, 25 insertions, 7 deletions
diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_gld.c b/usr/src/uts/common/io/ixgbe/ixgbe_gld.c index a3fd6e6223..78a96bd4ef 100644 --- a/usr/src/uts/common/io/ixgbe/ixgbe_gld.c +++ b/usr/src/uts/common/io/ixgbe/ixgbe_gld.c @@ -109,6 +109,13 @@ ixgbe_m_stat(void *arg, uint_t stat, uint64_t *val) *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); diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_main.c b/usr/src/uts/common/io/ixgbe/ixgbe_main.c index 4539b352b4..98c3e0ff58 100644 --- a/usr/src/uts/common/io/ixgbe/ixgbe_main.c +++ b/usr/src/uts/common/io/ixgbe/ixgbe_main.c @@ -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 @@ ixgbe_setup_tx_ring(ixgbe_tx_ring_t *tx_ring) } /* - * 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 diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_stat.c b/usr/src/uts/common/io/ixgbe/ixgbe_stat.c index fa7cbf28e8..776af1fba4 100644 --- a/usr/src/uts/common/io/ixgbe/ixgbe_stat.c +++ b/usr/src/uts/common/io/ixgbe/ixgbe_stat.c @@ -95,9 +95,22 @@ ixgbe_update_stats(kstat_t *ks, int rw) 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); diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_sw.h b/usr/src/uts/common/io/ixgbe/ixgbe_sw.h index f3e33340db..390233fff5 100644 --- a/usr/src/uts/common/io/ixgbe/ixgbe_sw.h +++ b/usr/src/uts/common/io/ixgbe/ixgbe_sw.h @@ -750,6 +750,7 @@ typedef struct ixgbe_stat { 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 */ |