On FreeBSD what's the difference between Drop and Idrop in the netstat output?
$ netstat -di
Name Mtu Network Address Ipkts Ierrs Idrop Opkts Oerrs Coll Drop
bge0* 1500 <Link#1> 00:16:d4:e3:49:31 0 0 0 0 0 0 0
wpi0 2290 <Link#2> 00:1b:77:86:2d:fa 0 53068 0 179587 3 0 0
Also, does netstat get the drop count from the NIC or from a kernel buffer? For instance, if the NIC can't accept any more packets because of the lack of descriptors, will the packets lost be reported as one of the drop values in netstat?
I ask because in Linux, ifconfig reads from /proc/net/dev and as for as I know, it drops only when the kernel buffer is full. So if the NIC wouldn't accept packets due to lack of descriptors you wouldn't know about it i.e. it hasn't made it's way into kernel memory.
that and netstat on FreeBSD has the -B option for the BPF buffer stats, so right now it makes sense that netstat -di reports the drop count from the NIC/driver itself.
Right/Wrong?
Any help is appreciated, Thanks
Lack of software decsriptors (i.e mbuf clusters) can be observed via:
Look at
FAIL
column.Lack of hardware descriptors can be observed only via driver-specific interface e.g for Intel e1000 cards via:
Also descriptor count can be tuned via
loader.conf
in some NICsRegarding your question "idrops vs. drops" you should look sources for
If I understood correctly one is for input drops other for output drops (i.e
ALTQ
).PS. For additional information refer to Section 3.3 "
ifnet
structure" of the TCP/IP Illustrated Volume 2, Stevens & Wright. Or source code of you OS.