<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/net/bpfdesc.h, branch releng/14.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-08-16T17:54:11Z</updated>
<entry>
<title>sys: Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:11Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=95ee2897e98f5d444f26ed2334cc7c439f9c16c6'/>
<id>urn:sha1:95ee2897e98f5d444f26ed2334cc7c439f9c16c6</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
</entry>
<entry>
<title>bpf: Add an ioctl to set the VLAN Priority on packets sent by bpf</title>
<updated>2021-07-26T21:13:31Z</updated>
<author>
<name>Luiz Otavio O Souza</name>
<email>loos@FreeBSD.org</email>
</author>
<published>2021-07-21T15:41:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1e7fe2fbb9c0bed230d8db94d7444a90ca5ce199'/>
<id>urn:sha1:1e7fe2fbb9c0bed230d8db94d7444a90ca5ce199</id>
<content type='text'>
This allows the use of VLAN PCP in dhclient, which is required for
certain ISPs (such as Orange.fr).

Reviewed by:	bcr (man page)
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D31263
</content>
</entry>
<entry>
<title>Rework locking in BPF code to remove rwlock from fast path.</title>
<updated>2019-05-13T13:45:28Z</updated>
<author>
<name>Andrey V. Elsukov</name>
<email>ae@FreeBSD.org</email>
</author>
<published>2019-05-13T13:45:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=699281b545a8a3fc5109b5f2db62d261b65b588b'/>
<id>urn:sha1:699281b545a8a3fc5109b5f2db62d261b65b588b</id>
<content type='text'>
On high packets rate the contention on rwlock in bpf_*tap*() functions
can lead to packets dropping. To avoid this, migrate this code to use
epoch(9) KPI and ConcurrencyKit's lists.

* all lists changed to use CK_LIST;
* reference counting added to bpf_if and bpf_d;
* now bpf_if references ifnet and releases this reference on destroy;
* each bpf_d descriptor references bpf_if when it is attached;
* new struct bpf_program_buffer introduced to keep BPF filter programs;
* bpf_program_buffer, bpf_d and bpf_if structures are freed by
  epoch_call();
* bpf_freelist and ifnet_departure event are no longer needed, thus
  both are removed;

Reviewed by:	melifaro
Sponsored by:	Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D20224
</content>
</entry>
<entry>
<title>Move BPFIF_* macro definitions into .c file, where struct bpf_if is</title>
<updated>2018-06-19T10:34:45Z</updated>
<author>
<name>Andrey V. Elsukov</name>
<email>ae@FreeBSD.org</email>
</author>
<published>2018-06-19T10:34:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ca3cd72b17ff331c0c9948065c4a40e24bd0dc6d'/>
<id>urn:sha1:ca3cd72b17ff331c0c9948065c4a40e24bd0dc6d</id>
<content type='text'>
declared.

They are only used in this file and there is no need to export them via
bpfdesc.h.
</content>
</entry>
<entry>
<title>Make BPF global lock an SX</title>
<updated>2018-04-10T19:42:50Z</updated>
<author>
<name>Stephen Hurd</name>
<email>shurd@FreeBSD.org</email>
</author>
<published>2018-04-10T19:42:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f422673e10d5216be1e9742e2ecdd8a67d0ec9b8'/>
<id>urn:sha1:f422673e10d5216be1e9742e2ecdd8a67d0ec9b8</id>
<content type='text'>
This allows NIC drivers to sleep on polling config operations.

Submitted by:	Matthew Macy &lt;mmacy@mattmacy.io&gt;
Reviewed by:	shurd
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D14982
</content>
</entry>
<entry>
<title>Use count(9) api for the bpf(4) statistics.</title>
<updated>2018-03-20T22:57:06Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2018-03-20T22:57:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b2b7ca49dca771f65f281f4b0aa0e3c39eb42837'/>
<id>urn:sha1:b2b7ca49dca771f65f281f4b0aa0e3c39eb42837</id>
<content type='text'>
Currently each bfp descriptor uses u64 variables to maintain its counters.
On interfaces with high packet rate this leads to unnecessary contention
and inaccurate reporting.

PR:		kern/205320
Reported by:	elofu17 at hotmail.com
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D14726
</content>
</entry>
<entry>
<title>sys: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-20T19:43:44Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-20T19:43:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=51369649b03ece2aed3eb61b0c8214b9aa5b2fa2'/>
<id>urn:sha1:51369649b03ece2aed3eb61b0c8214b9aa5b2fa2</id>
<content type='text'>
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
</content>
</entry>
<entry>
<title>Renumber copyright clause 4</title>
<updated>2017-02-28T23:42:47Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2017-02-28T23:42:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fbbd9655e5107c68e4e0146ff22b73d7350475bc'/>
<id>urn:sha1:fbbd9655e5107c68e4e0146ff22b73d7350475bc</id>
<content type='text'>
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann &lt;jschauma@stevens.edu&gt;
Pull Request:	https://github.com/freebsd/freebsd/pull/96
</content>
</entry>
<entry>
<title>Changes to resolve races in bpfread() and catchpacket() that, at worst,</title>
<updated>2012-12-10T16:14:44Z</updated>
<author>
<name>Guy Helmer</name>
<email>ghelmer@FreeBSD.org</email>
</author>
<published>2012-12-10T16:14:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3b3b91e73619f2d77c3d626b7346396728ed1cf6'/>
<id>urn:sha1:3b3b91e73619f2d77c3d626b7346396728ed1cf6</id>
<content type='text'>
cause kernel panics.

Add a flag to the bpf descriptor to indicate whether the hold buffer
is in use. In bpfread(), set the "hold buffer in use" flag before
dropping the descriptor lock during the call to bpf_uiomove().
Everywhere else the hold buffer is used or changed, wait while
the hold buffer is in use by bpfread(). Add a KASSERT in bpfread()
after re-acquiring the descriptor lock to assist uncovering any
additional hold buffer races.
</content>
</entry>
<entry>
<title>Fix old panic when BPF consumer attaches to destroying interface.</title>
<updated>2012-05-21T22:17:29Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2012-05-21T22:17:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=afa85850e79c1839ec33efa1138206687b952cfa'/>
<id>urn:sha1:afa85850e79c1839ec33efa1138206687b952cfa</id>
<content type='text'>
'flags' field is added to the end of bpf_if structure. Currently the only
flag is BPFIF_FLAG_DYING which is set on bpf detach and checked by bpf_attachd()
Problem can be easily triggered on SMP stable/[89] by the following command (sort of):
'while true; do ifconfig vlan222 create vlan 222 vlandev em0 up ; tcpdump -pi vlan222 &amp; ; ifconfig vlan222 destroy ; done'

Fix possible use-after-free when BPF detaches itself from interface, freeing bpf_bif memory,
while interface is still UP and there can be routes via this interface.
Freeing is now delayed till ifnet_departure_event is received via eventhandler(9) api.

Convert bpfd rwlock back to mutex due lack of performance gain (currently checking if packet
matches filter is done without holding bpfd lock and we have to acquire write lock if packet matches)

Approved by:      kib(mentor)
MFC in:            4 weeks
</content>
</entry>
</feed>
