From faa693cdbeee14ec8331020aca3569d8aa6f70ca Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Fri, 31 Jul 2015 20:25:54 +0000 Subject: [PATCH] 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) --- sys/net/bpf_buffer.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/net/bpf_buffer.c b/sys/net/bpf_buffer.c index 74e1ae488ab9..64bb982aab22 100644 --- a/sys/net/bpf_buffer.c +++ b/sys/net/bpf_buffer.c @@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$"); #include #include -#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, u_int *i) 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);