version 1.42, 2019/06/28 13:35:04 |
version 1.43, 2020/06/15 10:54:29 |
|
|
/* Define fields */ |
/* Define fields */ |
field_def fields_mbuf[] = { |
field_def fields_mbuf[] = { |
{"IFACE", 8, 16, 1, FLD_ALIGN_LEFT, -1, 0, 0, 0}, |
{"IFACE", 8, 16, 1, FLD_ALIGN_LEFT, -1, 0, 0, 0}, |
|
{"RING", 8, 8, 1, FLD_ALIGN_LEFT, -1, 0, 0, 0}, |
{"RXDELAY", 5, 8, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0}, |
{"RXDELAY", 5, 8, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0}, |
{"TXDELAY", 5, 8, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0}, |
{"TXDELAY", 5, 8, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0}, |
{"LIVELOCKS", 5, 10, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0}, |
{"LIVELOCKS", 5, 10, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0}, |
|
|
|
|
|
|
#define FLD_MB_IFACE FIELD_ADDR(fields_mbuf,0) |
#define FLD_MB_IFACE FIELD_ADDR(fields_mbuf,0) |
#define FLD_MB_RXDELAY FIELD_ADDR(fields_mbuf,1) |
#define FLD_MB_RING FIELD_ADDR(fields_mbuf,1) |
#define FLD_MB_TXDELAY FIELD_ADDR(fields_mbuf,2) |
#define FLD_MB_RXDELAY FIELD_ADDR(fields_mbuf,2) |
#define FLD_MB_LLOCKS FIELD_ADDR(fields_mbuf,3) |
#define FLD_MB_TXDELAY FIELD_ADDR(fields_mbuf,3) |
#define FLD_MB_MSIZE FIELD_ADDR(fields_mbuf,4) |
#define FLD_MB_LLOCKS FIELD_ADDR(fields_mbuf,4) |
#define FLD_MB_MALIVE FIELD_ADDR(fields_mbuf,5) |
#define FLD_MB_MSIZE FIELD_ADDR(fields_mbuf,5) |
#define FLD_MB_MLWM FIELD_ADDR(fields_mbuf,6) |
#define FLD_MB_MALIVE FIELD_ADDR(fields_mbuf,6) |
#define FLD_MB_MHWM FIELD_ADDR(fields_mbuf,7) |
#define FLD_MB_MLWM FIELD_ADDR(fields_mbuf,7) |
#define FLD_MB_MCWM FIELD_ADDR(fields_mbuf,8) |
#define FLD_MB_MHWM FIELD_ADDR(fields_mbuf,8) |
|
#define FLD_MB_MCWM FIELD_ADDR(fields_mbuf,9) |
|
|
|
|
/* Define views */ |
/* Define views */ |
field_def *view_mbuf[] = { |
field_def *view_mbuf[] = { |
FLD_MB_IFACE, |
FLD_MB_IFACE, FLD_MB_RING, |
FLD_MB_LLOCKS, FLD_MB_MSIZE, FLD_MB_MALIVE, FLD_MB_MLWM, FLD_MB_MHWM, |
FLD_MB_LLOCKS, FLD_MB_MSIZE, FLD_MB_MALIVE, FLD_MB_MLWM, FLD_MB_MHWM, |
FLD_MB_MCWM, NULL |
FLD_MB_MCWM, NULL |
}; |
}; |
|
|
/* NOTREACHED */ |
/* NOTREACHED */ |
} |
} |
|
|
snprintf(ifr[mclpool_count].ifr_name, |
strlcpy(ifr[mclpool_count].ifr_name, pname, |
sizeof(ifr[mclpool_count].ifr_name), "%dk", |
sizeof(ifr[mclpool_count].ifr_name)); |
pool.pr_size / 1024); |
|
ifr[mclpool_count].ifr_size = pool.pr_size; |
ifr[mclpool_count].ifr_size = pool.pr_size; |
|
|
mclpools_index[mclpool_count++] = i; |
mclpools_index[mclpool_count++] = i; |
|
|
|
|
for (p = 0; p < ifi->data.ifri_total; p++) { |
for (p = 0; p < ifi->data.ifri_total; p++) { |
struct if_rxring_info *ifr = &ifi->data.ifri_entries[p]; |
struct if_rxring_info *ifr = &ifi->data.ifri_entries[p]; |
if (ifr->ifr_info.rxr_alive == 0) |
if (ifr->ifr_info.rxr_hwm == 0) |
continue; |
continue; |
if (n++ >= dispstart) { |
if (n++ >= dispstart) { |
showmbuf(ifi, p, showif); |
showmbuf(ifi, p, showif); |
|
|
print_fld_str(FLD_MB_IFACE, ifi->name); |
print_fld_str(FLD_MB_IFACE, ifi->name); |
|
|
if (p == -1 && ifi == interfaces) { |
if (p == -1 && ifi == interfaces) { |
|
print_fld_str(FLD_MB_RING, "mbufs"); |
print_fld_uint(FLD_MB_LLOCKS, mcllivelocks_diff); |
print_fld_uint(FLD_MB_LLOCKS, mcllivelocks_diff); |
print_fld_size(FLD_MB_MSIZE, mbpool.pr_size); |
print_fld_size(FLD_MB_MSIZE, mbpool.pr_size); |
print_fld_size(FLD_MB_MALIVE, mbpool.pr_nget - mbpool.pr_nput); |
print_fld_size(FLD_MB_MALIVE, mbpool.pr_nget - mbpool.pr_nput); |
|
|
if (p >= 0 && p < mclpool_count) { |
if (p >= 0 && p < mclpool_count) { |
struct if_rxring_info *ifr = &ifi->data.ifri_entries[p]; |
struct if_rxring_info *ifr = &ifi->data.ifri_entries[p]; |
struct if_rxring *rxr= &ifr->ifr_info; |
struct if_rxring *rxr= &ifr->ifr_info; |
|
print_fld_str(FLD_MB_RING, ifr->ifr_name); |
print_fld_uint(FLD_MB_MSIZE, ifr->ifr_size); |
print_fld_uint(FLD_MB_MSIZE, ifr->ifr_size); |
print_fld_uint(FLD_MB_MALIVE, rxr->rxr_alive); |
print_fld_uint(FLD_MB_MALIVE, rxr->rxr_alive); |
if (rxr->rxr_lwm) |
if (rxr->rxr_lwm) |