<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/net, branch release/8.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F8.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F8.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2013-03-03T21:48:40Z</updated>
<entry>
<title>Merge</title>
<updated>2013-03-03T21:48:40Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2013-03-03T21:48:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=95efb9911ed99fc06d10a2567e9c1f3e585d1ef7'/>
<id>urn:sha1:95efb9911ed99fc06d10a2567e9c1f3e585d1ef7</id>
<content type='text'>
* r233937 - Improve BPF locking model
* r233938 - Improve performace for writer-only BPF users
* r233946 - Fix build
* r235744 - Fix (new) panic on attaching to non-existent interface
* r235745 - Fix old panic when BPF consumer attaches to destroying interface
* r235746 - Call bpf_jitter() before acquiring BPF global lock
* r235747 - Make most BPF ioctls() SMP-safe.
* r236231 - Fix BPF_JITTER code broken by r235746.
* r236261 - Save the previous filter right before we set new one.
* r236262 - Fix style(9) nits, reduce unnecessary type castings.
* r236559 - Fix panic introduced by r235745
* r236806 - Fix typo introduced in r236559.

r233937
  - Improve BPF locking model.

  Interface locks and descriptor locks are converted from mutex(9) to rwlock(9).
  This greately improves performance: in most common case we need to acquire 1
  reader lock instead of 2 mutexes.

  - Remove filter(descriptor) (reader) lock in bpf_mtap[2]
  This was suggested by glebius@. We protect filter by requesting interface
  writer lock on filter change.

  - Cover struct bpf_if under BPF_INTERNAL define. This permits including bpf.h
  without including rwlock stuff. However, this is is temporary solution,
  struct bpf_if should be made opaque for any external caller.

r233938
  - Improve performace for writer-only BPF users.

  Linux and Solaris (at least OpenSolaris) has PF_PACKET socket families to send
  raw ethernet frames. The only FreeBSD interface that can be used to send raw
  frames is BPF. As a result, many programs like cdpd, lldpd, various dhcp stuff
  uses BPF only to send data. This leads us to the situation when software like
  cdpd, being run on high-traffic-volume interface significantly reduces overall
  performance since we have to acquire additional locks for every packet.

  Here we add sysctl that changes BPF behavior in the following way:
  If program came and opens BPF socket without explicitly specifyin read filter
  we assume it to be write-only and add it to special writer-only per-interface
  list. This makes bpf_peers_present() return 0, so no additional overhead is
  introduced. After filter is supplied, descriptor is added to original
  per-interface list permitting packets to be captured.

  Unfortunately, pcap_open_live() sets catch-all filter itself for the purpose
  of setting snap length.

  Fortunately, most programs explicitly sets (event catch-all) filter after
  that. tcpdump(1) is a good example.

  So a bit hackis approach is taken: we upgrade description only after second
  BIOCSETF is received.

  Sysctl is named net.bpf.optimize_writers and is turned off by default.

  - While here, document all sysctl variables in bpf.4

r233946
  Fix build broken by r233938.

r235744
  Fix panic on attaching to non-existent interface
	(introduced by r233937, pointed by hrs@)
  Fix panic on tcpdump being attached to interface being removed
	(introduced by r233937, pointed by hrs@ and adrian@)
  Protect most of bpf_setf() by BPF global lock

  Add several forgotten assertions (thanks to adrian@)

  Document current locking model inside bpf.c
  Document EVENTHANDLER(9) usage inside BPF.

r235745
  Fix old panic when BPF consumer attaches to destroying interface.
  '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)

r235746
  Call bpf_jitter() before acquiring BPF global lock due to malloc() being
  used inside bpf_jitter.

  Eliminate bpf_buffer_alloc() and allocate BPF buffers on descriptor creation
   and BIOCSBLEN ioctl. This permits us not to allocate buffers inside
   bpf_attachd() which is protected by global lock.

r235747
  Make most BPF ioctls() SMP-safe.

r236559
  Fix panic introduced by r235745. Panic occurs after first packet traverse
  renamed interface.
  Add several comments on locking

r236231
  Fix BPF_JITTER code broken by r235746.

r236261
  - Save the previous filter right before we set new one.
  - Reduce duplicate code and make it little easier to read.

r236262
  Fix style(9) nits, reduce unnecessary type castings, etc., for bpf_setf().

r236806
  Fix typo introduced in r236559.
</content>
</entry>
<entry>
<title>MFC 239440,239519:</title>
<updated>2012-10-07T18:57:52Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2012-10-07T18:57:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c3a8e57394c64a469f42b583f528591773542f81'/>
<id>urn:sha1:c3a8e57394c64a469f42b583f528591773542f81</id>
<content type='text'>
Refine the changes made in r208212 to avoid bogus failures from
if_delmulti() when clearing the configuration for a subinterface when
the parent interface is being detached.  The current code was still
triggering an assertion in if_delmulti() due to the parent interface being
partially detached.  Fix this by not calling if_delmulti() at all if the
parent interface is being detached.  Warn if if_delmulti() fails when the
parent is not being detached (but similar to 208212, still proceed with
tearing down the vlan state).
</content>
</entry>
<entry>
<title>MFC r238309:</title>
<updated>2012-09-01T10:28:20Z</updated>
<author>
<name>Mikolaj Golub</name>
<email>trociny@FreeBSD.org</email>
</author>
<published>2012-09-01T10:28:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=12ddfe569fb5a91f5bde705b89bc766783de52bf'/>
<id>urn:sha1:12ddfe569fb5a91f5bde705b89bc766783de52bf</id>
<content type='text'>
In epair_clone_destroy(), when destroying the second half, we have to
switch to its vnet before calling ether_ifdetach(). Otherwise if the
second half resides in a different vnet, if_detach() silently fails
leaving a stale pointer in V_ifnet list, and the system crashes trying
to access this pointer later.

Another solution could be not to allow to destroy epair unless both
ends are in the home vnet.

Discussed with:	bz
Tested by:	delphij
</content>
</entry>
<entry>
<title>MFC r237852</title>
<updated>2012-07-03T01:45:38Z</updated>
<author>
<name>Andrew Thompson</name>
<email>thompsa@FreeBSD.org</email>
</author>
<published>2012-07-03T01:45:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=887a7d454470f18df2e9c78f689389e06edbcf1b'/>
<id>urn:sha1:887a7d454470f18df2e9c78f689389e06edbcf1b</id>
<content type='text'>
 Add the same check as vlan(4) where we ignore the ifnet departure event if the
 interface is just being renamed.

PR:		kern/169557
</content>
</entry>
<entry>
<title>MFC r217322.  Original commit log:</title>
<updated>2012-07-02T20:36:54Z</updated>
<author>
<name>Matthew D Fleming</name>
<email>mdf@FreeBSD.org</email>
</author>
<published>2012-07-02T20:36:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9e7959c371354a4226823599f850cc7cc009369e'/>
<id>urn:sha1:9e7959c371354a4226823599f850cc7cc009369e</id>
<content type='text'>
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
Commit the net* piece.

The commit to HEAD was a superset of the proposed patch for PR
kern/167357.
</content>
</entry>
<entry>
<title>MFC 236724, 236725:</title>
<updated>2012-06-15T20:27:15Z</updated>
<author>
<name>Mikolaj Golub</name>
<email>trociny@FreeBSD.org</email>
</author>
<published>2012-06-15T20:27:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=95c86b06428ec1eb947963383a1ec933fe2a61fc'/>
<id>urn:sha1:95c86b06428ec1eb947963383a1ec933fe2a61fc</id>
<content type='text'>
MFC 236724:

Add VIMAGE support to if_tap.

PR:		kern/152047, kern/158686
Submitted by:	Daan Vreeken &lt;pa4dan Bliksem.VEHosting.nl&gt;

MFC 236725:

Sort includes.

Submitted by:	Daan Vreeken &lt;pa4dan Bliksem.VEHosting.nl&gt;
</content>
</entry>
<entry>
<title>MFC r236916</title>
<updated>2012-06-14T21:36:16Z</updated>
<author>
<name>Andrew Thompson</name>
<email>thompsa@FreeBSD.org</email>
</author>
<published>2012-06-14T21:36:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bdf35af2ad87157b5e100470ffd7c5f8f9dda148'/>
<id>urn:sha1:bdf35af2ad87157b5e100470ffd7c5f8f9dda148</id>
<content type='text'>
 Fix a panic I introduced in r234487, the bridge softc pointer is set to null
 early in the detach so rearrange things not to explode.

Reported by:	David Roffiaen, Gustau Perez Querol
</content>
</entry>
<entry>
<title>MFC:	r236251</title>
<updated>2012-06-01T17:22:20Z</updated>
<author>
<name>Jung-uk Kim</name>
<email>jkim@FreeBSD.org</email>
</author>
<published>2012-06-01T17:22:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e481ea35a86adb7dc1d44fea91d713ec487c6408'/>
<id>urn:sha1:e481ea35a86adb7dc1d44fea91d713ec487c6408</id>
<content type='text'>
Fix 32-bit shim for BIOCSETF to drop all packets buffered on the descriptor
and reset statistics as it should.
</content>
</entry>
<entry>
<title>MFC r234936 (emaste)</title>
<updated>2012-05-26T08:44:50Z</updated>
<author>
<name>Andrew Thompson</name>
<email>thompsa@FreeBSD.org</email>
</author>
<published>2012-05-26T08:44:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fc0c993a4d63089c29b6be4dba256fd11021ec39'/>
<id>urn:sha1:fc0c993a4d63089c29b6be4dba256fd11021ec39</id>
<content type='text'>
 Relax restriction on direct tx to child ports

 Lagg(4) restricts the type of packet that may be sent directly to a child
 port, to avoid undesired output from accidental misconfiguration.
 Previously only ETHERTYPE_PAE was permitted.

 BPF writes to a lagg(4) child port are presumably intentional, so just
 allow them, while still blocking other packets that should take the
 aggregation path.

PR:		kern/138620
</content>
</entry>
<entry>
<title>MFC r231130 (pjd)</title>
<updated>2012-05-26T08:41:48Z</updated>
<author>
<name>Andrew Thompson</name>
<email>thompsa@FreeBSD.org</email>
</author>
<published>2012-05-26T08:41:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=badd7cd653af093a9a3f4fd464374e6ba922e0d3'/>
<id>urn:sha1:badd7cd653af093a9a3f4fd464374e6ba922e0d3</id>
<content type='text'>
 Allow to set if_bridge(4) sysctls from /boot/loader.conf.
</content>
</entry>
</feed>
