Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Nov 2017 20:49:59 +0200
From:      Catalin Salgau <csalgau@users.sourceforge.net>
To:        freebsd-net@freebsd.org
Subject:   BPF packet pagesize limit
Message-ID:  <966f384c-10b4-d018-efb1-68a7064c9521@users.sourceforge.net>

next in thread | raw e-mail | index | archive | help
Hello,

I'm trying to address the limitation in (upstream) net/vblade that was
brought up in
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205164
This is related to writes larger than hw.pagesize but smaller than the
configured MTU with BPF.
I traced this to sys/net/bpf.c where calls to bpfwrite() will use
bpf_movein() which in turn uses m_get2() to allocate a single mbuf. This
will fail if the requested mbuf size is larger than MJUMPAGESIZE
(defined as PAGE_SIZE on x86). I believe this should use m_getm2() and
populate multiple mbufs.
Code in NetBSD explicitly notes that they omit mbuf chaining, but this
is not documentated behaviour in the man page.

Any chance of having this fixed in a supported release, or getting a
usable/documented workaround?

Thanks.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?966f384c-10b4-d018-efb1-68a7064c9521>