freebsd-skq/sys
Gleb Smirnoff 063efed28c The drbr(9) API appeared to be so unclear, that most drivers in
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
2012-09-28 18:28:27 +00:00
..
amd64 - Re-shuffle the <machine/pc/bios.h> headers to move all kernel-specific 2012-09-28 11:59:32 +00:00
arm Implementing pmap_kextract(va) as pmap_extract(kernel_pmap, va) is 2012-09-27 05:39:42 +00:00
boot Make the loader a bit smarter, when it tries to open disk and the slice 2012-09-28 10:49:41 +00:00
bsm
cam Change queue overflow checks from DIAGNOSTIC+panic() to KASSERT() to make 2012-09-28 12:13:34 +00:00
cddl Merge recent vendor changes in ZFS. 2012-09-26 09:37:58 +00:00
compat Fix the mis-handling of the VV_TEXT on the nullfs vnodes. 2012-09-28 11:25:02 +00:00
conf Improve the check for p4 opened files. 2012-09-22 07:44:36 +00:00
contrib Fix pseudo checksum calculation. 2012-09-27 18:15:01 +00:00
crypto
ddb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
dev The drbr(9) API appeared to be so unclear, that most drivers in 2012-09-28 18:28:27 +00:00
fs Fix the mis-handling of the VV_TEXT on the nullfs vnodes. 2012-09-28 11:25:02 +00:00
gdb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
geom Remove the topology lock from disk_gone(), it might be called with regular 2012-09-28 08:22:51 +00:00
gnu/fs Add VFCF_READONLY flag that indicates ntfs and xfs file systems are 2012-09-12 03:42:52 +00:00
i386 - Re-shuffle the <machine/pc/bios.h> headers to move all kernel-specific 2012-09-28 11:59:32 +00:00
ia64 Eliminate a stale comment. It describes another use case for the pmap in 2012-09-28 05:30:59 +00:00
isa
kern Fix the mis-handling of the VV_TEXT on the nullfs vnodes. 2012-09-28 11:25:02 +00:00
kgssapi
libkern s/ is is / is /g 2012-09-14 22:00:03 +00:00
mips Eliminate a stale comment. It describes another use case for the pmap in 2012-09-28 05:30:59 +00:00
modules Add TRIM support. 2012-09-23 19:40:58 +00:00
net The drbr(9) API appeared to be so unclear, that most drivers in 2012-09-28 18:28:27 +00:00
net80211 Fix a crash bug introduced in the iterate node work recently done. 2012-09-16 22:45:00 +00:00
netatalk
netgraph Ensure that all cases that enqueue a netgraph item for delivery by a 2012-09-27 20:12:51 +00:00
netinet Fix bug in TCP_KEEPCNT setting, which slipped in in the last round 2012-09-27 07:13:21 +00:00
netinet6 Merge the projects/pf/head branch, that was worked on for last six months, 2012-09-08 06:41:54 +00:00
netipsec Add missing break 2012-09-18 08:00:43 +00:00
netipx
netnatm
netncp Add characters mapping for codepages used in Germany. 2012-06-01 03:59:08 +00:00
netpfil EBUSY is a better reply for refusing to unload pf(4) or pfsync(4). 2012-09-22 19:03:11 +00:00
netsmb Change a duplicated check to clarify that we really want to set a 2012-07-10 21:02:59 +00:00
nfs - Typo fix 2012-08-16 19:22:34 +00:00
nfsclient Do not leave invalid pages in the object after the short read for a 2012-08-14 11:45:47 +00:00
nfsserver Fix the mis-handling of the VV_TEXT on the nullfs vnodes. 2012-09-28 11:25:02 +00:00
nlm Fix grammar. 2012-08-16 13:01:56 +00:00
ofed The drbr(9) API appeared to be so unclear, that most drivers in 2012-09-28 18:28:27 +00:00
opencrypto
pc98 MFi386: revision 237445 2012-09-23 09:13:57 +00:00
pci intpm: add ATI IXP400 pci id 2012-04-16 10:33:46 +00:00
powerpc Eliminate a stale comment. It describes another use case for the pmap in 2012-09-28 05:30:59 +00:00
rpc Complete revert of r239963: 2012-09-27 19:10:25 +00:00
security Check vplabel for NULL before dereferencing it. Fixes a panic 2012-05-03 15:51:34 +00:00
sparc64 Eliminate a stale comment. It describes another use case for the pmap in 2012-09-28 05:30:59 +00:00
sys The drbr(9) API appeared to be so unclear, that most drivers in 2012-09-28 18:28:27 +00:00
teken
tools
ufs Fix up kernel sources to be ready for a 64-bit ino_t. 2012-09-27 23:30:49 +00:00
vm Fix the mis-handling of the VV_TEXT on the nullfs vnodes. 2012-09-28 11:25:02 +00:00
x86 - Re-shuffle the <machine/pc/bios.h> headers to move all kernel-specific 2012-09-28 11:59:32 +00:00
xdr
xen
Makefile Add sys/ofed to the 'make cscope' target. 2012-03-20 18:05:15 +00:00