apparently it works just fine.  the number of clones is limited
by the v_specbitmap which currently allows for 64 clones total
(per system, not per process).

apply the diff and see how all your apps are happily using single
device node: /dev/bpf0.

thanks to pedro and thib for the spec_open_clone and guenther
for helping out big time.

i'm not 100% sure we want this but why wouldn't we?
generally speaking we also need to move to a single /dev/bpf
node, but that can be done, once this diff is tested and we all
agree that this is a way to go.

so please test and share your thoughts.


diff --git sys/sys/conf.h sys/sys/conf.h
index b2ee90c..46937fd 100644
--- sys/sys/conf.h
+++ sys/sys/conf.h
@@ -313,7 +313,7 @@ extern struct cdevsw cdevsw[];
        dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
        dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
        0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev, \
-       0, 0, dev_init(c,n,kqfilter) }
+       0, D_CLONE, dev_init(c,n,kqfilter) }
 
 /* open, close, ioctl */
 #define        cdev_lkm_init(c,n) { \

Reply via email to