BPF tweak; negative impact?

Peter Van Epp vanepp at sfu.ca
Wed Feb 21 16:33:46 EST 2001


> 
> Hi Peter,
> 
> Thanks for the reply -- I'm just about to crash for the night, but
> before I forget, one query:
> 
> > select with timeout so the patch code won't activate. You may need to increase
> > the size of the bpf buffer (there is an iocntrl to do so, by default its 8k,
> > I think 64K is a nicer value larger may be better modulo DMA boundary issues
> 
> Call me lame -- but, precisely how/where would I modify this value?  I'm
> not as familiar to the BSD world anymore as I am with SYSV.  I was just
> instructed to Make This Work under FreeBSD.  :-\

	The easy one is change the default value in /sys/net/bpf.c from the
default 8k up to 64k and recompile the kernel. There is a reference in the
same place to the iocntrl interface and you'd have to follow the man page from
there to figure out what it needs (I was to lazy to do so since I was making
changes in bpf.c anyway). I'm also not sure I did it in the current kernel
that I'm running. Since #define BPF_MAXBUFSIZE 0x80000 it looks like 32K
is the limit. 

/*
 * The default read buffer size is patchable.
 */

static int bpf_bufsize = BPF_BUFSIZE;
SYSCTL_INT(_debug, OID_AUTO, bpf_bufsize, CTLFLAG_RW,
        &bpf_bufsize, 0, "");
static int bpf_maxbufsize = BPF_MAXBUFSIZE;

Peter Van Epp / Operations and Technical Support 
Simon Fraser University, Burnaby, B.C. Canada



More information about the argus mailing list