063efed28c
tree used it incorrectly, which lead to inaccurate overrated if_obytes accounting. The drbr(9) used to update ifnet stats on drbr_enqueue(), which is not accurate since enqueuing doesn't imply successful processing by driver. Dequeuing neither mean that. Most drivers also called drbr_stats_update() which did accounting again, leading to doubled if_obytes statistics. And in case of severe transmitting, when a packet could be several times enqueued and dequeued it could have been accounted several times. o Thus, make drbr(9) API thinner. Now drbr(9) merely chooses between ALTQ queueing or buf_ring(9) queueing. - It doesn't touch the buf_ring stats any more. - It doesn't touch ifnet stats anymore. - drbr_stats_update() no longer exists. o buf_ring(9) handles its stats itself: - It handles br_drops itself. - br_prod_bytes stats are dropped. Rationale: no one ever reads them but update of a common counter on every packet negatively affects performance due to excessive cache invalidation. - buf_ring_enqueue_bytes() reduced to buf_ring_enqueue(), since we no longer account bytes. o Drivers handle their stats theirselves: if_obytes, if_omcasts. o mlx4(4), igb(4), em(4), vxge(4), oce(4) and ixv(4) no longer use drbr_stats_update(), and update ifnet stats theirselves. o bxe(4) was the most correct driver, it didn't call drbr_stats_update(), thus it was the only driver accurate under moderate load. Now it also maintains stats itself. o ixgbe(4) had already taken stats from hardware, so just - drop software stats updating. - take multicast packet count from hardware as well. o mxge(4) just no longer needs NO_SLOW_STATS define. o cxgb(4), cxgbe(4) need no change, since they obtain stats from hardware. Reviewed by: jfv, gnn |
||
---|---|---|
.. | ||
bpf_buffer.c | ||
bpf_buffer.h | ||
bpf_filter.c | ||
bpf_jitter.c | ||
bpf_jitter.h | ||
bpf_zerocopy.c | ||
bpf_zerocopy.h | ||
bpf.c | ||
bpf.h | ||
bpfdesc.h | ||
bridgestp.c | ||
bridgestp.h | ||
ethernet.h | ||
fddi.h | ||
firewire.h | ||
flowtable.c | ||
flowtable.h | ||
ieee8023ad_lacp.c | ||
ieee8023ad_lacp.h | ||
if_arc.h | ||
if_arcsubr.c | ||
if_arp.h | ||
if_atm.h | ||
if_atmsubr.c | ||
if_bridge.c | ||
if_bridgevar.h | ||
if_clone.c | ||
if_clone.h | ||
if_dead.c | ||
if_debug.c | ||
if_disc.c | ||
if_dl.h | ||
if_edsc.c | ||
if_ef.c | ||
if_enc.c | ||
if_enc.h | ||
if_epair.c | ||
if_ethersubr.c | ||
if_faith.c | ||
if_fddisubr.c | ||
if_fwsubr.c | ||
if_gif.c | ||
if_gif.h | ||
if_gre.c | ||
if_gre.h | ||
if_iso88025subr.c | ||
if_lagg.c | ||
if_lagg.h | ||
if_llatbl.c | ||
if_llatbl.h | ||
if_llc.h | ||
if_loop.c | ||
if_media.c | ||
if_media.h | ||
if_mib.c | ||
if_mib.h | ||
if_pflog.h | ||
if_pfsync.h | ||
if_sppp.h | ||
if_spppfr.c | ||
if_spppsubr.c | ||
if_stf.c | ||
if_stf.h | ||
if_tap.c | ||
if_tap.h | ||
if_tapvar.h | ||
if_tun.c | ||
if_tun.h | ||
if_types.h | ||
if_var.h | ||
if_vlan_var.h | ||
if_vlan.c | ||
if.c | ||
if.h | ||
iso88025.h | ||
netisr_internal.h | ||
netisr.c | ||
netisr.h | ||
netmap_user.h | ||
netmap.h | ||
pf_mtag.h | ||
pfil.c | ||
pfil.h | ||
pfkeyv2.h | ||
pfvar.h | ||
ppp_defs.h | ||
radix_mpath.c | ||
radix_mpath.h | ||
radix.c | ||
radix.h | ||
raw_cb.c | ||
raw_cb.h | ||
raw_usrreq.c | ||
route.c | ||
route.h | ||
rtsock.c | ||
slcompress.c | ||
slcompress.h | ||
vnet.c | ||
vnet.h | ||
zlib.c | ||
zlib.h | ||
zutil.h |