kernel - Fix issue w/ buffer ortation when doing non-blocking read from bpf
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 15 Feb 2010 17:32:27 +0000 (09:32 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 15 Feb 2010 17:32:27 +0000 (09:32 -0800)
commit95ec0a9ce1d830d0003820ed1627f95af92d5aad
tree760136967a2e9505edc1ad933d42536a4e460b5b
parent70af04e9bc5e4fec29f13d08e9cd6c6b0dfe4a02
kernel - Fix issue w/ buffer ortation when doing non-blocking read from bpf

* Non-blocking reads from a BPF device not in immediate mode would not
  rotate the buffers even if the was data in the store buffer, but not in
  the hold buffer.  So until the store buffer fills up, the reads would
  return -1 and set errno to EWOULDBLOCK.

Submitted-by: Guy Harris <guy@alum.mit.edu>
Taken-from: FreeBSD
sys/net/bpf.c