cxgbe(4): Tidy up the display for payload memory statistics (pm_stats).
# sysctl -n dev.t4nex.0.misc.pm_stats # sysctl -n dev.t5nex.0.misc.pm_stats MFC after: 1 week
This commit is contained in:
parent
db89cf8efb
commit
1192eeb8a3
@ -5955,10 +5955,13 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS)
|
||||
struct adapter *sc = arg1;
|
||||
struct sbuf *sb;
|
||||
int rc, i;
|
||||
uint32_t tx_cnt[PM_NSTATS], rx_cnt[PM_NSTATS];
|
||||
uint64_t tx_cyc[PM_NSTATS], rx_cyc[PM_NSTATS];
|
||||
static const char *pm_stats[] = {
|
||||
"Read:", "Write bypass:", "Write mem:", "Flush:", "FIFO wait:"
|
||||
uint32_t cnt[PM_NSTATS];
|
||||
uint64_t cyc[PM_NSTATS];
|
||||
static const char *rx_stats[] = {
|
||||
"Read:", "Write bypass:", "Write mem:", "Flush:"
|
||||
};
|
||||
static const char *tx_stats[] = {
|
||||
"Read:", "Write bypass:", "Write mem:", "Bypass + mem:"
|
||||
};
|
||||
|
||||
rc = sysctl_wire_old_buffer(req, 0);
|
||||
@ -5969,14 +5972,17 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS)
|
||||
if (sb == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
t4_pmtx_get_stats(sc, tx_cnt, tx_cyc);
|
||||
t4_pmrx_get_stats(sc, rx_cnt, rx_cyc);
|
||||
t4_pmtx_get_stats(sc, cnt, cyc);
|
||||
sbuf_printf(sb, " Tx pcmds Tx bytes");
|
||||
for (i = 0; i < ARRAY_SIZE(tx_stats); i++)
|
||||
sbuf_printf(sb, "\n%-13s %10u %20ju", tx_stats[i], cnt[i],
|
||||
cyc[i]);
|
||||
|
||||
sbuf_printf(sb, " Tx count Tx cycles "
|
||||
"Rx count Rx cycles");
|
||||
for (i = 0; i < PM_NSTATS; i++)
|
||||
sbuf_printf(sb, "\n%-13s %10u %20ju %10u %20ju",
|
||||
pm_stats[i], tx_cnt[i], tx_cyc[i], rx_cnt[i], rx_cyc[i]);
|
||||
t4_pmrx_get_stats(sc, cnt, cyc);
|
||||
sbuf_printf(sb, "\n Rx pcmds Rx bytes");
|
||||
for (i = 0; i < ARRAY_SIZE(rx_stats); i++)
|
||||
sbuf_printf(sb, "\n%-13s %10u %20ju", rx_stats[i], cnt[i],
|
||||
cyc[i]);
|
||||
|
||||
rc = sbuf_finish(sb);
|
||||
sbuf_delete(sb);
|
||||
|
Loading…
Reference in New Issue
Block a user