Author: loos Date: Fri Jul 31 20:25:54 2015 New Revision: 286140 URL: https://svnweb.freebsd.org/changeset/base/286140
Log: Remove the sleep from the buffer allocation routine. The buffer must be allocated (or even changed) before the interface is set and thus, there is no need to verify if the buffer is in use. MFC after: 2 weeks Sponsored by: Rubicon Communications (Netgate) Modified: head/sys/net/bpf_buffer.c Modified: head/sys/net/bpf_buffer.c ============================================================================== --- head/sys/net/bpf_buffer.c Fri Jul 31 20:02:12 2015 (r286139) +++ head/sys/net/bpf_buffer.c Fri Jul 31 20:25:54 2015 (r286140) @@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$"); #include <net/bpf_buffer.h> #include <net/bpfdesc.h> -#define PRINET 26 /* interruptible */ - /* * Implement historical kernel memory buffering model for BPF: two malloc(9) * kernel buffers are hung off of the descriptor. The size is fixed prior to @@ -191,9 +189,6 @@ bpf_buffer_ioctl_sblen(struct bpf_d *d, return (EINVAL); } - while (d->bd_hbuf_in_use) - mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock, - PRINET, "bd_hbuf", 0); /* Free old buffers if set */ if (d->bd_fbuf != NULL) free(d->bd_fbuf, M_BPF); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"