mirror of
https://github.com/opnsense/src.git
synced 2026-04-23 07:07:24 -04:00
hyperv/hn: Add per-TX ring stats for # of transmitted packets
MFC after: 2 weeks Sponsored by: Microsoft OSTC
This commit is contained in:
parent
7dda664075
commit
05c0884ee1
2 changed files with 5 additions and 0 deletions
|
|
@ -1208,6 +1208,7 @@ struct hn_tx_ring {
|
|||
u_long hn_txdma_failed;
|
||||
u_long hn_tx_collapsed;
|
||||
u_long hn_tx_chimney;
|
||||
u_long hn_pkts;
|
||||
|
||||
/* Rarely used stuffs */
|
||||
struct hn_txdesc *hn_txdesc;
|
||||
|
|
|
|||
|
|
@ -1021,6 +1021,7 @@ again:
|
|||
if (txd->m->m_flags & M_MCAST)
|
||||
if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1);
|
||||
}
|
||||
txr->hn_pkts++;
|
||||
}
|
||||
hn_txdesc_put(txr, txd);
|
||||
|
||||
|
|
@ -2402,6 +2403,9 @@ hn_create_tx_ring(struct hn_softc *sc, int id)
|
|||
CTLFLAG_RD, &txr->hn_oactive, 0,
|
||||
"over active");
|
||||
}
|
||||
SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "packets",
|
||||
CTLFLAG_RW, &txr->hn_pkts,
|
||||
"# of packets transmitted");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue