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
@ -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 @@ hn_send_pkt(struct ifnet *ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd)
|
||||
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 New Issue
Block a user