Page MenuHomeFreeBSD

D57756.diff
No OneTemporary

D57756.diff

diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -1890,13 +1890,29 @@
stats->illerrc += IXGBE_READ_REG(hw, IXGBE_ILLERRC);
stats->errbc += IXGBE_READ_REG(hw, IXGBE_ERRBC);
stats->mspdc += IXGBE_READ_REG(hw, IXGBE_MSPDC);
- stats->mpc[0] += IXGBE_READ_REG(hw, IXGBE_MPC(0));
+ for (int i = 0; i < 8; i++) {
+ u32 mp = IXGBE_READ_REG(hw, IXGBE_MPC(i));
+ /* missed_rx tallies misses for the gprc workaround */
+ missed_rx += mp;
+ stats->mpc[i] += mp;
+ /* total for stats display */
+ total_missed_rx += stats->mpc[i];
+ }
+
+ /* mpc-only subtotal for the sysctl; qprdc is folded in below */
+ sc->missed_rx = total_missed_rx;
for (int i = 0; i < 16; i++) {
stats->qprc[i] += IXGBE_READ_REG(hw, IXGBE_QPRC(i));
stats->qptc[i] += IXGBE_READ_REG(hw, IXGBE_QPTC(i));
stats->qprdc[i] += IXGBE_READ_REG(hw, IXGBE_QPRDC(i));
}
+
+ /* Per-queue no-descriptor drops are input drops too (82599+) */
+ if (hw->mac.type != ixgbe_mac_82598EB)
+ for (int i = 0; i < 16; i++)
+ total_missed_rx += stats->qprdc[i];
+
stats->mlfc += IXGBE_READ_REG(hw, IXGBE_MLFC);
stats->mrfc += IXGBE_READ_REG(hw, IXGBE_MRFC);
stats->rlec += IXGBE_READ_REG(hw, IXGBE_RLEC);
@@ -2004,7 +2020,6 @@
* Aggregate following types of errors as RX errors:
* - CRC error count,
* - illegal byte error count,
- * - missed packets count,
* - length error count,
* - undersized packets count,
* - fragmented packets count,
@@ -2012,8 +2027,8 @@
* - jabber count.
*/
IXGBE_SET_IERRORS(sc, stats->crcerrs + stats->illerrc +
- stats->mpc[0] + stats->rlec + stats->ruc + stats->rfc +
- stats->roc + stats->rjc);
+ stats->rlec + stats->ruc + stats->rfc + stats->roc +
+ stats->rjc);
} /* ixgbe_update_stats_counters */
/************************************************************************
@@ -2125,7 +2140,7 @@
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rec_len_errs",
CTLFLAG_RD, &stats->rlec, "Receive Length Errors");
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_missed_packets",
- CTLFLAG_RD, &stats->mpc[0], "RX Missed Packet Count");
+ CTLFLAG_RD, &sc->missed_rx, "RX Missed Packet Count");
/* Flow Control stats */
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_txd",
diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h
--- a/sys/dev/ixgbe/ixgbe.h
+++ b/sys/dev/ixgbe/ixgbe.h
@@ -463,6 +463,7 @@
/* counter(9) stats */
u64 ipackets;
u64 ierrors;
+ u64 missed_rx;
u64 opackets;
u64 oerrors;
u64 ibytes;

File Metadata

Mime Type
text/plain
Expires
Mon, Jun 29, 9:36 PM (16 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34473120
Default Alt Text
D57756.diff (2 KB)

Event Timeline