When transferring data via loopback, packets can actually be dropped. This was a surprise to me, as netstat -ndI lo0 always shows all drop counters as zero. It was only after I went on a hunt for dropped packets that I realized loopback uses netisr queuing, and can experience drops when the netisr queue is full. This can be seen in netstat -Q, but its really hard to know to look there.
So this patch checks the return status of netisr_queue(), and increments input drop counters (rather than input byte/packet counters) when queuing the packet fails. This makes loopback interfaces more "normal" in terms of reporting packet loss.