History log of /freebsd-10.0-release/sys/contrib/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259128 09-Dec-2013 gjb

Remove svn:mergeinfo from the releng/10.0 branch.

After branch creation from stable/10, the stable/10 branch mergeinfo
was moved to the root of the branch.

Since there have not been any merges from stable/10 to releng/10.0
yet, we do not need to track any of the existing mergeinfo here.

Merges to releng/10.0 should now be done to the root of the branch.

For future branches during the release cycle, unless otherwise noted,
this change will be done as part of the stable/ and releng/ branch
creation.

Discussed with: peter
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-10.0-release/MAINTAINERS
/freebsd-10.0-release/Makefile.inc1
/freebsd-10.0-release/ObsoleteFiles.inc
/freebsd-10.0-release/UPDATING
/freebsd-10.0-release/bin/df
/freebsd-10.0-release/bin/freebsd-version
/freebsd-10.0-release/cddl
/freebsd-10.0-release/cddl/contrib/opensolaris
/freebsd-10.0-release/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-10.0-release/cddl/contrib/opensolaris/cmd/zfs
/freebsd-10.0-release/cddl/contrib/opensolaris/lib/libzfs
/freebsd-10.0-release/contrib/apr
/freebsd-10.0-release/contrib/apr-util
/freebsd-10.0-release/contrib/atf
/freebsd-10.0-release/contrib/binutils
/freebsd-10.0-release/contrib/bmake
/freebsd-10.0-release/contrib/byacc
/freebsd-10.0-release/contrib/bzip2
/freebsd-10.0-release/contrib/com_err
/freebsd-10.0-release/contrib/compiler-rt
/freebsd-10.0-release/contrib/dialog
/freebsd-10.0-release/contrib/dtc
/freebsd-10.0-release/contrib/ee
/freebsd-10.0-release/contrib/expat
/freebsd-10.0-release/contrib/file
/freebsd-10.0-release/contrib/gcc
/freebsd-10.0-release/contrib/gdb
/freebsd-10.0-release/contrib/gdtoa
/freebsd-10.0-release/contrib/groff
/freebsd-10.0-release/contrib/ipfilter
/freebsd-10.0-release/contrib/ipfilter/ml_ipl.c
/freebsd-10.0-release/contrib/ipfilter/mlfk_ipl.c
/freebsd-10.0-release/contrib/ipfilter/mlh_rule.c
/freebsd-10.0-release/contrib/ipfilter/mli_ipl.c
/freebsd-10.0-release/contrib/ipfilter/mln_ipl.c
/freebsd-10.0-release/contrib/ipfilter/mls_ipl.c
/freebsd-10.0-release/contrib/ldns
/freebsd-10.0-release/contrib/less
/freebsd-10.0-release/contrib/libarchive
/freebsd-10.0-release/contrib/libarchive/cpio
/freebsd-10.0-release/contrib/libarchive/libarchive
/freebsd-10.0-release/contrib/libarchive/libarchive_fe
/freebsd-10.0-release/contrib/libarchive/tar
/freebsd-10.0-release/contrib/libc++
/freebsd-10.0-release/contrib/libc-vis
/freebsd-10.0-release/contrib/libcxxrt
/freebsd-10.0-release/contrib/libexecinfo
/freebsd-10.0-release/contrib/libpcap
/freebsd-10.0-release/contrib/libstdc++
/freebsd-10.0-release/contrib/llvm
/freebsd-10.0-release/contrib/llvm/tools/clang
/freebsd-10.0-release/contrib/mtree
/freebsd-10.0-release/contrib/ncurses
/freebsd-10.0-release/contrib/netcat
/freebsd-10.0-release/contrib/ntp
/freebsd-10.0-release/contrib/nvi
/freebsd-10.0-release/contrib/one-true-awk
/freebsd-10.0-release/contrib/openbsm
/freebsd-10.0-release/contrib/openpam
/freebsd-10.0-release/contrib/openresolv
/freebsd-10.0-release/contrib/pf
/freebsd-10.0-release/contrib/sendmail
/freebsd-10.0-release/contrib/serf
/freebsd-10.0-release/contrib/smbfs
/freebsd-10.0-release/contrib/subversion
/freebsd-10.0-release/contrib/tcpdump
/freebsd-10.0-release/contrib/tcsh
/freebsd-10.0-release/contrib/tnftp
/freebsd-10.0-release/contrib/top
/freebsd-10.0-release/contrib/top/install-sh
/freebsd-10.0-release/contrib/tzcode/stdtime
/freebsd-10.0-release/contrib/tzcode/zic
/freebsd-10.0-release/contrib/tzdata
/freebsd-10.0-release/contrib/unbound
/freebsd-10.0-release/contrib/wpa
/freebsd-10.0-release/contrib/xz
/freebsd-10.0-release/crypto/heimdal
/freebsd-10.0-release/crypto/openssh
/freebsd-10.0-release/crypto/openssl
/freebsd-10.0-release/etc
/freebsd-10.0-release/etc/rc.d
/freebsd-10.0-release/gnu/lib
/freebsd-10.0-release/gnu/usr.bin/binutils
/freebsd-10.0-release/gnu/usr.bin/cc/cc_tools
/freebsd-10.0-release/gnu/usr.bin/gdb
/freebsd-10.0-release/include
/freebsd-10.0-release/lib
/freebsd-10.0-release/lib/libc
/freebsd-10.0-release/lib/libc/stdtime
/freebsd-10.0-release/lib/libc_nonshared
/freebsd-10.0-release/lib/libfetch
/freebsd-10.0-release/lib/libiconv_modules
/freebsd-10.0-release/lib/libsmb
/freebsd-10.0-release/lib/libthr
/freebsd-10.0-release/lib/libutil
/freebsd-10.0-release/lib/libvmmapi
/freebsd-10.0-release/lib/libyaml
/freebsd-10.0-release/lib/libz
/freebsd-10.0-release/release
/freebsd-10.0-release/release/doc
/freebsd-10.0-release/sbin
/freebsd-10.0-release/sbin/camcontrol
/freebsd-10.0-release/sbin/dumpon
/freebsd-10.0-release/sbin/hastd
/freebsd-10.0-release/sbin/ifconfig
/freebsd-10.0-release/sbin/ipfw
/freebsd-10.0-release/sbin/nvmecontrol
/freebsd-10.0-release/share
/freebsd-10.0-release/share/examples/bhyve
/freebsd-10.0-release/share/i18n/csmapper/JIS
/freebsd-10.0-release/share/i18n/esdb/EUC
/freebsd-10.0-release/share/man
/freebsd-10.0-release/share/man/man4
/freebsd-10.0-release/share/man/man4/bhyve.4
/freebsd-10.0-release/share/man/man5
/freebsd-10.0-release/share/man/man7
/freebsd-10.0-release/share/man/man8
/freebsd-10.0-release/share/misc
/freebsd-10.0-release/share/mk
/freebsd-10.0-release/share/mk/bsd.arch.inc.mk
/freebsd-10.0-release/share/syscons
/freebsd-10.0-release/share/zoneinfo
/freebsd-10.0-release/sys
/freebsd-10.0-release/sys/amd64/include/vmm.h
/freebsd-10.0-release/sys/amd64/include/vmm_dev.h
/freebsd-10.0-release/sys/amd64/include/vmm_instruction_emul.h
/freebsd-10.0-release/sys/amd64/include/xen
/freebsd-10.0-release/sys/amd64/vmm
/freebsd-10.0-release/sys/boot
/freebsd-10.0-release/sys/boot/i386/efi
/freebsd-10.0-release/sys/boot/ia64/efi
/freebsd-10.0-release/sys/boot/ia64/ski
/freebsd-10.0-release/sys/boot/powerpc/boot1.chrp
/freebsd-10.0-release/sys/boot/powerpc/ofw
/freebsd-10.0-release/sys/cddl/contrib/opensolaris
/freebsd-10.0-release/sys/conf
dev/acpica
dev/acpica/changes.txt
dev/acpica/common
dev/acpica/compiler
dev/acpica/components/debugger
dev/acpica/components/disassembler
dev/acpica/components/dispatcher
dev/acpica/components/events
dev/acpica/components/executer
dev/acpica/components/hardware
dev/acpica/components/namespace
dev/acpica/components/parser
dev/acpica/components/resources
dev/acpica/components/tables
dev/acpica/components/utilities
dev/acpica/include
dev/acpica/os_specific
ipfilter
ipfilter/netinet/ip_fil_freebsd.c
ipfilter/netinet/ip_raudio_pxy.c
libfdt
octeon-sdk
x86emu
/freebsd-10.0-release/sys/dev/bvm
/freebsd-10.0-release/sys/dev/fdt/fdt_ic_if.m
/freebsd-10.0-release/sys/dev/hyperv
/freebsd-10.0-release/sys/modules/hyperv
/freebsd-10.0-release/sys/modules/vmm
/freebsd-10.0-release/sys/x86/include/acpica_machdep.h
/freebsd-10.0-release/tools
/freebsd-10.0-release/tools/build
/freebsd-10.0-release/tools/build/options
/freebsd-10.0-release/tools/tools/atsectl
/freebsd-10.0-release/usr.bin/calendar
/freebsd-10.0-release/usr.bin/csup
/freebsd-10.0-release/usr.bin/iscsictl
/freebsd-10.0-release/usr.bin/procstat
/freebsd-10.0-release/usr.sbin
/freebsd-10.0-release/usr.sbin/bhyve
/freebsd-10.0-release/usr.sbin/bhyvectl
/freebsd-10.0-release/usr.sbin/bhyveload
/freebsd-10.0-release/usr.sbin/bsdconfig
/freebsd-10.0-release/usr.sbin/bsdinstall
/freebsd-10.0-release/usr.sbin/ctladm
/freebsd-10.0-release/usr.sbin/ctld
/freebsd-10.0-release/usr.sbin/freebsd-update
/freebsd-10.0-release/usr.sbin/jail
/freebsd-10.0-release/usr.sbin/mergemaster
/freebsd-10.0-release/usr.sbin/mount_smbfs
/freebsd-10.0-release/usr.sbin/ndiscvt
/freebsd-10.0-release/usr.sbin/pkg
/freebsd-10.0-release/usr.sbin/rtadvctl
/freebsd-10.0-release/usr.sbin/rtadvd
/freebsd-10.0-release/usr.sbin/rtsold
/freebsd-10.0-release/usr.sbin/zic
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256829 21-Oct-2013 np

MFC r256470:

Update krping to the latest upstream code. Move all the FreeBSD
specific parts to krping_dev.c, which leaves the other files as
close to their upstream versions as possible.

Approved by: re (glebius)


256820 21-Oct-2013 np

MFC r256467:

Delete all of the old RDMA code (except krping, which was switched to
use sys/ofed some time back). This has been sitting around as dead code
in the tree for a very long time.

Approved by: re (hrs)


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


256253 10-Oct-2013 dim

Initialize a variable in sys/contrib/ipfilter/netinet/ip_tftp_pxy.c, to
silence a gcc warning.

Approved by: re (rodrigc)
X-MFC-With: r255332


256199 09-Oct-2013 dim

Initialize a variable in sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c, to
silence a gcc warning.

Approved by: re (gjb)
X-MFC-With: r255332


255932 29-Sep-2013 alfred

Update OFED to Linux 3.7 and update Mellanox drivers.

Update the OFED Infiniband core to the version supplied in Linux
version 3.7.

The update to OFED is nearly all additional defines and functions
with the exception of the addition of additional parameters to
ib_register_device() and the reg_user_mr callback.

In addition the ibcore (Infiniband core) and ipoib (IP over Infiniband)
have both been made into completely loadable modules to facilitate
testing of the OFED stack in FreeBSD.

Finally the Mellanox Infiniband drivers are now updated to the
latest version shipping with Linux 3.7.

Submitted by: Mellanox FreeBSD driver team:
Oded Shanoon (odeds mellanox.com),
Meny Yossefi (menyy mellanox.com),
Orit Moskovich (oritm mellanox.com)

Approved by: re


255757 21-Sep-2013 cy

Address double init of ip_log mutex, fixing a panic after ipfilter is
re-enabled following it being disabled.

Approved by: glebius (mentor)
Approved by: re (blanket)


255756 21-Sep-2013 cy

Enable main ipfilter sysctl MIBs.

Approved by: glebius (mentor)
Approved by: re (blanket)


255755 21-Sep-2013 cy

Convert ipfilter from timeout(9) to callout(9).

Submitted by: jhb
Approved by: glebius (mentor)
Approved by: re (blanket)


255754 21-Sep-2013 cy

Remove additional non-FreeBSD code.

Approved by: glebius (mentor)
Approved by: re (blanket)


255355 07-Sep-2013 glebius

Fix !INET6 build.


255332 06-Sep-2013 cy

Update ipfilter 4.1.28 --> 5.1.2.

Approved by: glebius (mentor)
BSD Licensed by: Darren Reed <darrenr@reed.wattle.id.au> (author)


254993 28-Aug-2013 gnn

Add firmware for Centrino 2200-N wireless devices.

Driver software for this firmware will be updated in a following commit.


254885 25-Aug-2013 dumbbell

drm/radeon: Import the Radeon KMS driver

This driver is based on Linux 3.8 and a previous effort by kan@.

More informations about this project can be found on the FreeBSD wiki:
https://wiki.freebsd.org/AMD_GPU

The driver is split into:

sys/dev/drm2:
The driver sources.

sys/modules/drm2/radeonkmw:
The driver main kernel module's Makefile.

sys/modules/drm2/radeonkmsfw:
All firmware kernel module Makefiles. There's one directory and one
Makefile for each firmware.

sys/contrib/dev/drm2/radeonkmsfw:
All firmware binary sources.

tools/tools/drm/radeon
Tools to update firmwares or regenerate some headers.

Merging the driver to FreeBSD 9.x may be possible but not a priority for
now.

Help from: kib@, kan@
Tested by: avg@, kwm@, ray@,
Alexander Yerenkow <yerenkow@gmail.com>,
Anders Bolt-Evensen <andersbo87@me.com>,
Denis Djubajlo <stdedjub@googlemail.com>,
J.R. Oldroyd <fbsd@opal.com>,
Mikaël Urankar <mikael.urankar@gmail.com>,
Pierre-Emmanuel Pédron <pepcitron@gmail.com>,
Sam Fourman Jr. <sfourman@gmail.com>,
Wade <wade-is-great@live.com>,
(probably other I forgot...)
HW donations: kyzh, Yakaz


254745 23-Aug-2013 jkim

Merge ACPICA 20130823.


254735 23-Aug-2013 np

Assorted fixes to krping. Disconnect the rest of sys/contrib/rdma from
the build while here. sys/ofed has more recent RDMA code and should be
used instead. We should probably move krping out of sys/contrib/rdma
and get rid of the rest of it.

Obtained from: Chelsio


254202 11-Aug-2013 adrian

Add firmware for the Intel 2030 and variants.

Submitted by: Cedric GROSS <cg@gross.info>
Obtained from: Linux, Intel


254200 11-Aug-2013 adrian

Remove a now-unused firmware.


254199 11-Aug-2013 adrian

Update the 6000g2a image.

Obtained from: Linux, Intel


253759 29-Jul-2013 rpaulo

Realtek's RTL8712 firmware blob needed by the upcoming rsu(4) driver.


253690 26-Jul-2013 jkim

Merge ACPICA 20130725.


253482 20-Jul-2013 cy

As per the developers handbook (5.3.1 step 1), bootstrap svn:mergeinfo on
the ipfilter directories in the main tree to the last commit made to
the ipfilter trees in the vendor branches (r253468) which flattened the
ipfilter vendor trees.

Now that this step is complete, we are free to import new sources into the
ipfilter vendor trees.

Approved by: glebius (Mentor)


253144 10-Jul-2013 netchild

Fix build for gcc users by declaring variables for unions in structs which
don't declare a variable. The size before/after this change of the structs
doesn't change with gcc/clang.

Noticed by: several
Suggested by: Gary Jennejohn <gljennjohn@googlemail.com>


253139 10-Jul-2013 hiren

Adding urtwn(4) firmware and related changes.

Reviewed by: rpaulo
Approved by: sbruno (mentor)


252892 06-Jul-2013 netchild

- Move videodev headers from compat/linux to contrib/v4l (cp from vendor and
apply diff to compat/linux versions).
- The cp implies an update of videodev2.h to the linux kernel 2.6.34.14 one.

The update makes video in skype v4 work on FreeBSD.

Tested by: Artyom Mirgorodskiy <artyom.mirgorodsky@gmail.com>
(update of header only)


252381 29-Jun-2013 adrian

Check the return value from ath_hal_malloc()

Reported by: uqs


252280 27-Jun-2013 jkim

Move definitions required by userland applications out of acpica_machdep.h.


252279 27-Jun-2013 jkim

Merge ACPICA 20130626.


252238 26-Jun-2013 adrian

If EEPROM data is provided by the AHB layer, copy it in.

This is required for the flash layer code to correctly work.

Tested:

* AR9330 SoC (carambola 2)


252237 26-Jun-2013 adrian

Re-enable the channel set code for the AR933x.

This required a HAL change to map the 2GHz frequency back to an IEEE
channel number in order to fetch some value(s) to program in.


252235 26-Jun-2013 adrian

In preparation to support AR933x SoC builds, allow the AH_SUPPORT_AR93(xx)
options to set the AR9300 HAL defines.

This enables the Wasp, Hornet (and later Scorpion) SoC code.


252233 26-Jun-2013 adrian

Add a stub AR93xx RF module just to keep the linker happy.

When building AR933x test images, I'd like to only build only the ar9300
HAL. To do this, it needs to supply an RF linker entry or it won't compile.

Tested:

* AR933x test builds


251741 14-Jun-2013 adrian

The AR9300 HAL uses this config to program AR_PHY_SWITCH_COM_2 on AR9485
NICs which have bluetooth coexistence enabled.

The WB225 NIC has the common antenna switch configuration set to 0x0 which
disables all external switch bit setting. This obviously won't work when
doing coexistence.

This value is a magic value from the windows .inf files. It _looks_ right
but I haven't yet verified it - unfortunately my AR9285+AR3012 BT combo
has an earlier BT device which doesn't actually _have_ firmware on it.
So I have to fix ath3kfw to handle loading in firmware into the newer
NICs before I can finish testing this.

This may not hold true for CUS198, which is another custom AR9485 board.


251740 14-Jun-2013 adrian

Flip on AH_PRIVATE_DIAG by default; this will include the AR9300 EEPROM
dump code that is worth having around.


251736 14-Jun-2013 adrian

Add bluetooth setup method functions to the HAL.


251735 14-Jun-2013 adrian

If chan is NULL, don't derefrence it.

The bluetooth setup code actually does a channel lookup during setup,
even though we haven't yet programmed in a channel. Sigh.

Tested:

* WB225 (AR9485) + bluetooth


251676 13-Jun-2013 adrian

Set the FreeBSD capability bit to indicate that LNA diversity is enabled.

This is true for the AR9485 and AR933x SoC.


251675 13-Jun-2013 adrian

Return HAL_ANT_VARIABLE for now, until it's unstubbed.

This is needed by the slow antenna diversity logic for the AR9485/AR9462
as it's only engaged if the TX diveristy is set to VARIABLE.


251657 12-Jun-2013 adrian

Tie in the LNA diversity configuration functions into the HAL.


251098 29-May-2013 adrian

Fix a false -> AH_FALSE.

Now, why this hasn't tripped _any_ tinderbox builds yet, I dunno.
It's been like this for a while.


250838 20-May-2013 jkim

Merge ACPICA 20130517.


250540 12-May-2013 imp

Turns out that there really isn't an RTC chip on this board, at all.


250436 10-May-2013 imp

Make the read/write routines default to the newer DS1337 part, but keep
the supported bits board specific.


250434 10-May-2013 imp

As requested, move this back to opt-in and list my boards.


250433 10-May-2013 imp

Remove the commented out code I just committed. If we need it, I'll
bring it back uncommented our, or rewrite it.


250428 10-May-2013 imp

Add support from GE Intelligent Platform Cavium Octeon boards. Add
options OCTEON_VENDOR_GEFES to enable support for these boards, to
match changes that GE publishes to the Octeon Simple Executive. Since
board types overlap with other boards, it is unlikely that we will
properly boot on other Octeon boards with OCTEON_VENDOR_GEFES enabled.
Tested extensively on the WANIC 6354, but I retained support for all
the other models. Some features need changes in the base kernel, and
those are in progress.


250426 10-May-2013 imp

Both my EBH5200 and GE WANIC 6354 have a RTC as well. It looks from
the Linux tree that they always include this chip in their FDT, so
make support for the ds1337 opt-out rather than opt-in. Now my boards
boot with the correct time.


250341 08-May-2013 jkim

MFV: r250336

Fix for _INI regression introduced in version 20130328.


250191 02-May-2013 imp

Expose cvmx_mgmt_port_num_ports() as a wrapper to the static
__cvmx_mgmt_port_num_ports() mostly to avoid exporting a function
starting with __.


250172 02-May-2013 adrian

Fix this code to compile without warnings - AH_DEBUG was pulling in
ichan, but OS_MARK was not using it. It only uses it when
AH_DEBUG_ALQ is also defined.


250166 02-May-2013 adrian

Add device identification and probe/attach support for the QCA9565.

The QCA9565 is a 1x1 2.4GHz 11n chip with integrated on-chip bluetooth.
The AR9300 HAL already has support for this chip; it just wasn't
included in the probe/attach path.

Tested:

* This commit brought to you over a QCA9565 wifi connection from
FreeBSD.
* .. ie, basic STA, pings, no iperf or antenna diversity checking just yet.


250132 01-May-2013 eadler

Fix incorrect sizeof() in bzero()

Submitted by: swildner@DragonFlyBSD.org
Reviewed by: alfred, jmallett


250130 01-May-2013 adrian

Disable TXCONT, it's not here in FreeBSD.


250129 01-May-2013 adrian

There's no HAL_EEPROM in FreeBSD - use ar9300_eeprom_t instead.


250082 30-Apr-2013 adrian

Sync from git - ah_config is in 'ath_hal', not 'ath_hal_private' on
FreeBSD.


250008 28-Apr-2013 adrian

Bring over my FreeBSD modifications for the AR9300 HAL to make it
work in FreeBSD.

This is still heavily a work in progress but I'd rather it start
shipping in -HEAD sooner rather than later.

This doesn't (yet) link it into the build system either for a static
kernel or as a module; that will come later (after many, many make universe
tests.)


250007 28-Apr-2013 adrian

Copy the vendor branch ar9300 code from qcamain_open_hal into this
directory.

Only copy the ar9300 HAL, we don't want to grab everything.


250006 28-Apr-2013 adrian

Create a placeholder directory for the upcoming ar9300 HAL from
qcamain_open_hal.


249663 19-Apr-2013 jkim

Merge ACPICA 20130418.


249266 08-Apr-2013 glebius

Forcibly defining _KERNEL is bad idea. Toss some code so that ip_var.h
isn't included with forced _KERNEL define.


249112 04-Apr-2013 jkim

Merge ACPICA 20130328.


247830 05-Mar-2013 glebius

Simplify TAILQ usage and avoid additional memory allocations.

Tested by: Eugene M. Zheganin <emz norma.perm.ru>
Sponsored by: Nginx, Inc


246849 15-Feb-2013 jkim

Merge ACPICA 20130214.


246040 28-Jan-2013 jkim

Merge two bug fixes from the vendor branch.

Reported by: pjd


245748 21-Jan-2013 jkim

Fix another build breakage for ia64.


245712 21-Jan-2013 jmallett

Fix packet reception and other issues arising from incorrect ASX clock
configuration on the physical ports of the Ubiquiti EdgeRouter Lite.


245636 19-Jan-2013 jkim

Work around build breakage with GCC 4.2.


245582 18-Jan-2013 jkim

Merge ACPICA 20130117.


244985 02-Jan-2013 jmallett

Use the right USB clock type on the EdgeRouter Lite. This fixes USB.


244984 02-Jan-2013 jmallett

Add basic support for the Ubiquiti EdgeRouter Lite.

Note that USB does not currently work, and the flash is connected via USB, so
local storage is not working.


243587 27-Nov-2012 jmallett

Allow this file to build on FreeBSD.


243473 24-Nov-2012 jmallett

o) Have the FreeBSD kernel option "INVARIANTS" trickle down into the Simple
Executive code where similar invariant knobs exist.
o) Make the Simple Executive's warning function print "WARNING: " on the same
line as the warning it is displaying, rather than on a separate line.


243470 24-Nov-2012 jmallett

Use bootverbose to control debug printfs from the Cavium Simple Executive
code. Also remove an unnecessary CVMX_ENABLE_DEBUG_PRINTS conditional around
what is already a cvmx_dprintf.


243469 24-Nov-2012 jmallett

o) Add support for specifying a model of Octeon to target at compile-time,
reducing the number of runtime checks done by the SDK code.
o) Group board/CPU information at early startup by subject matter, so that e.g.
CPU information is adjacent to CPU information and board information is
adjacent to board information.


243347 20-Nov-2012 jkim

Merge ACPICA 20121114.


243265 19-Nov-2012 jmallett

Return port numbers for ATCA-7220 SPI interfaces in a different place for
consistency reasons, and to ensure that CRC addition is disabled on output.
With this, transmit seems to be working properly on the ATCA-7220.


243260 19-Nov-2012 jmallett

Fix packet receive on the ATCA-7220 by disabling FCS-related checks, since the
FCS is stripped by the underlying hardware before it reaches the Octeon.


242952 13-Nov-2012 jmallett

Fix build for FreeBSD kernel.


242623 05-Nov-2012 dim

In sys/contrib/ngatm/netnatm/msg/uni_ie.c, fix a few warnings from newer
versions of clang 3.2, about comparing enum uni_cause values against
integer constants which fall outside the enum range. No functional
change.

MFC after: 3 days


242423 01-Nov-2012 jmallett

Handle the management port on the EBT5600 and disable loopback. The XAUI
port connected to the Broadcom switch does not seem operable, but it's unclear
if that's simply due to a lack of configuration information for the switch.
The switch does not seem to present any identifying information via MDIO,
and is a BCM56512.


242342 30-Oct-2012 jmallett

Speed feature tests and initialize helper configuration that some CPUs require.


242273 29-Oct-2012 jmallett

Use Simple Executive LED display routines, which correctly use the LED base
address passed from the bootloader, rather than using a hard-coded value.

Make FreeBSD announce itself on the LED display similar to other kernels.

Remove uses of the previous LED routines, which were under-used and only used
in drivers for what seem like debugging purposes, despite those drivers being
widely-tested.

Remove several inlines for accessing memory that duplicate other functions
which are now used instead, as they are now entirely unused.


242116 26-Oct-2012 jmallett

No MII on the RSYS4GBE (AMC-7211/ATCA-7220).


242104 26-Oct-2012 jmallett

Add support for Radisys as a vendor of Octeon hardware. Add some preliminary
support for what their boot loader refers to as the "RSYS4GBE", of which there
are two instances ("Data Processing Blocks") on the Radisys ATCA-7220.


241973 23-Oct-2012 jkim

Merge ACPICA 20121018.


241546 14-Oct-2012 glebius

Fix defines in r241245. We actually don't define FreeBSD.

Reported & tested by: Oleg Ginzburg


241394 10-Oct-2012 kevlo

Revert previous commit...

Pointyhat to: kevlo (myself)


241370 09-Oct-2012 kevlo

Prefer NULL over 0 for pointers


241245 06-Oct-2012 glebius

A step in resolving mess with byte ordering for AF_INET. After this change:

- All packets in NETISR_IP queue are in net byte order.
- ip_input() is entered in net byte order and converts packet
to host byte order right _after_ processing pfil(9) hooks.
- ip_output() is entered in host byte order and converts packet
to net byte order right _before_ processing pfil(9) hooks.
- ip_fragment() accepts and emits packet in net byte order.
- ip_forward(), ip_mloopback() use host byte order (untouched actually).
- ip_fastforward() no longer modifies packet at all (except ip_ttl).
- Swapping of byte order there and back removed from the following modules:
pf(4), ipfw(4), enc(4), if_bridge(4).
- Swapping of byte order added to ipfilter(4), based on __FreeBSD_version
- __FreeBSD_version bumped.
- pfil(9) manual page updated.

Reviewed by: ray, luigi, eri, melifaro
Tested by: glebius (LE), ray (BE)


241002 27-Sep-2012 fjoe

Fix pseudo checksum calculation.

This fixes ipfilter w/ network controllers that implement only
partial rx csum offloading.

PR: 106438
Obtained from: upstream
MFC after: 1 week


240918 25-Sep-2012 glebius

Fix panic introduced by me in r240835, when zero weight
was passed to wtab_alloc().

Reported by: Kim Culhan <w8hdkim gmail.com>


240835 22-Sep-2012 glebius

Use M_NOWAIT in wtab_alloc(), too. Convert panic() to
a soft failure here. wtab_alloc() is used by red_alloc(),
which can fail.

Reported by: Kim Culhan <w8hdkim gmail.com>


240830 22-Sep-2012 pjd

Fix an obvious typo.


240824 22-Sep-2012 glebius

Convert more M_WAITOK malloc() to M_NOWAIT.

Reported by: Kim Culhan <w8hdkim gmail.com>


240784 21-Sep-2012 rpaulo

Remove #ident macro.
-This line, and those below, will be ignored--
> Description of fields to fill in above: 76 columns --|
> PR: If a GNATS PR is affected by the change.
> Submitted by: If someone else sent in the change.
> Reviewed by: If someone else reviewed your modification.
> Approved by: If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email.
> Security: Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M altq/altq/altq_rmclass.c


240725 20-Sep-2012 kevlo

Fix typo: s/pakcet/packet


240716 19-Sep-2012 jkim

Merge ACPICA 20120913.


240646 18-Sep-2012 glebius

Do more than r236298 did in the projects/pf branch: use M_NOWAIT in
altq_add() and its descendants. Currently altq(4) in FreeBSD is configured
via pf(4) ioctls, which can't configure altq(4) w/o holding locks.
Fortunately, altq(4) code in spife of using M_WAITOK is ready to receive
NULL from malloc(9), so change is mostly mechanical. While here, utilize
M_ZERO instead of bzero().

A large redesign needed to achieve M_WAITOK usage when configuring altq(4).
Or an alternative (not pf(4)) configuration interface should be implemented.

Reported by: pluknet


240494 14-Sep-2012 glebius

o Create directory sys/netpfil, where all packet filters should
reside, and move there ipfw(4) and pf(4).

o Move most modified parts of pf out of contrib.

Actual movements:

sys/contrib/pf/net/*.c -> sys/netpfil/pf/
sys/contrib/pf/net/*.h -> sys/net/
contrib/pf/pfctl/*.c -> sbin/pfctl
contrib/pf/pfctl/*.h -> sbin/pfctl
contrib/pf/pfctl/pfctl.8 -> sbin/pfctl
contrib/pf/pfctl/*.4 -> share/man/man4
contrib/pf/pfctl/*.5 -> share/man/man5

sys/netinet/ipfw -> sys/netpfil/ipfw

The arguable movement is pf/net/*.h -> sys/net. There are
future plans to refactor pf includes, so I decided not to
break things twice.

Not modified bits of pf left in contrib: authpf, ftp-proxy,
tftp-proxy, pflogd.

The ipfw(4) movement is planned to be merged to stable/9,
to make head and stable match.

Discussed with: bz, luigi


240233 08-Sep-2012 glebius

Merge the projects/pf/head branch, that was worked on for last six months,
into head. The most significant achievements in the new code:

o Fine grained locking, thus much better performance.
o Fixes to many problems in pf, that were specific to FreeBSD port.

New code doesn't have that many ifdefs and much less OpenBSDisms, thus
is more attractive to our developers.

Those interested in details, can browse through SVN log of the
projects/pf/head branch. And for reference, here is exact list of
revisions merged:

r232043, r232044, r232062, r232148, r232149, r232150, r232298, r232330,
r232332, r232340, r232386, r232390, r232391, r232605, r232655, r232656,
r232661, r232662, r232663, r232664, r232673, r232691, r233309, r233782,
r233829, r233830, r233834, r233835, r233836, r233865, r233866, r233868,
r233873, r234056, r234096, r234100, r234108, r234175, r234187, r234223,
r234271, r234272, r234282, r234307, r234309, r234382, r234384, r234456,
r234486, r234606, r234640, r234641, r234642, r234644, r234651, r235505,
r235506, r235535, r235605, r235606, r235826, r235991, r235993, r236168,
r236173, r236179, r236180, r236181, r236186, r236223, r236227, r236230,
r236252, r236254, r236298, r236299, r236300, r236301, r236397, r236398,
r236399, r236499, r236512, r236513, r236525, r236526, r236545, r236548,
r236553, r236554, r236556, r236557, r236561, r236570, r236630, r236672,
r236673, r236679, r236706, r236710, r236718, r237154, r237155, r237169,
r237314, r237363, r237364, r237368, r237369, r237376, r237440, r237442,
r237751, r237783, r237784, r237785, r237788, r237791, r238421, r238522,
r238523, r238524, r238525, r239173, r239186, r239644, r239652, r239661,
r239773, r240125, r240130, r240131, r240136, r240186, r240196, r240212.

I'd like to thank people who participated in early testing:

Tested by: Florian Smeets <flo freebsd.org>
Tested by: Chekaluk Vitaly <artemrts ukr.net>
Tested by: Ben Wilber <ben desync.com>
Tested by: Ian FREISLICH <ianf cloudseed.co.za>


239340 16-Aug-2012 jkim

Merge ACPICA 20120816.


238742 24-Jul-2012 imp

Update to latest git version of dtc to get new dtsv2 support,
including the include directive.

Fix minor build issue corrected by converting yypush_buffer_state and
yypop_buffer_state to yy_set_buffer_state and a hard-coded 100-deep
stack. It was easier to fix it here than to import that support into
our flex.

The new tools and test hardness remain unsupported at the moment.


238498 15-Jul-2012 glebius

Use M_NOWAIT while holding the pf giant lock.


238381 11-Jul-2012 jkim

Merge ACPICA 20120711.


237652 27-Jun-2012 jkim

MFV: r237650

Do not malloc(9) while holding a spin lock, to avoid panic.

Reported by: kib (and many others)
Tested by: kib (and many others)


237651 27-Jun-2012 bschmidt

Add new firmware for the g2a (6205) and g2b (623x) devices.

MFC after: 3 days


237412 22-Jun-2012 jkim

Merge ACPICA 20120620.


237263 19-Jun-2012 np

- Updated TOE support in the kernel.

- Stateful TCP offload drivers for Terminator 3 and 4 (T3 and T4) ASICs.
These are available as t3_tom and t4_tom modules that augment cxgb(4)
and cxgbe(4) respectively. The cxgb/cxgbe drivers continue to work as
usual with or without these extra features.

- iWARP driver for Terminator 3 ASIC (kernel verbs). T4 iWARP in the
works and will follow soon.

Build-tested with make universe.

30s overview
============
What interfaces support TCP offload? Look for TOE4 and/or TOE6 in the
capabilities of an interface:
# ifconfig -m | grep TOE

Enable/disable TCP offload on an interface (just like any other ifnet
capability):
# ifconfig cxgbe0 toe
# ifconfig cxgbe0 -toe

Which connections are offloaded? Look for toe4 and/or toe6 in the
output of netstat and sockstat:
# netstat -np tcp | grep toe
# sockstat -46c | grep toe

Reviewed by: bz, gnn
Sponsored by: Chelsio communications.
MFC after: ~3 months (after 9.1, and after ensuring MFC is feasible)


236671 06-Jun-2012 glebius

Merge revision 1.715 from OpenBSD:

date: 2010/12/24 20:12:56; author: henning; state: Exp; lines: +3 -3
in pf_src_connlimit, the indices to sk->addr were swapped.
tracked down and diff sent by Robert B Mills <rbmills at sdf.lonestar.org>
thanks, very good work! ok claudio

Impact is that the "flush" keyword didn't work.

Obtained from: OpenBSD
MFC after: 1 week


236364 31-May-2012 eri

Correct table counter functionality to not panic.
This was caused by not proper initialization of necessary parameters.

PR: 168200
Reviewed by: bz@, glebius@
MFC after: 1 week


235945 24-May-2012 jkim

Merge ACPICA 20120518.


234946 03-May-2012 melifaro

Revert r234834 per luigi@ request.

Cleaner solution (e.g. adding another header) should be done here.

Original log:
Move several enums and structures required for L2 filtering from ip_fw_private.h to ip_fw.h.
Remove ipfw/ip_fw_private.h header from non-ipfw code.

Requested by: luigi
Approved by: kib(mentor)


234834 30-Apr-2012 melifaro

Move several enums and structures required for L2 filtering from ip_fw_private.h to ip_fw.h.
Remove ipfw/ip_fw_private.h header from non-ipfw code.

Approved by: ae(mentor)
MFC after: 2 weeks


234623 23-Apr-2012 jkim

Merge ACPICA 20120420.


234507 20-Apr-2012 dim

Fix the following compilation warnings in sys/contrib/rdma/rdma_cma.c:

sys/contrib/rdma/rdma_cma.c:1259:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch]
case ECONNRESET:
^
@/sys/errno.h:118:20: note: expanded from macro 'ECONNRESET'
#define ECONNRESET 54 /* Connection reset by peer */
^
sys/contrib/rdma/rdma_cma.c:1263:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch]
case ETIMEDOUT:
^
@/sys/errno.h:124:19: note: expanded from macro 'ETIMEDOUT'
#define ETIMEDOUT 60 /* Operation timed out */
^
sys/contrib/rdma/rdma_cma.c:1260:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch]
case ECONNREFUSED:
^
@/sys/errno.h:125:22: note: expanded from macro 'ECONNREFUSED'
#define ECONNREFUSED 61 /* Connection refused */
^

This is because the switch uses iw_cm_event::status, which is an enum
iw_cm_event_status, while ECONNRESET, ETIMEDOUT and ECONNREFUSED are
just plain defines from errno.h.

It looks like there is only one use of any of the enumeration values of
iw_cm_event_status, in:

sys/contrib/rdma/rdma_iwcm.c: if (iw_event->status == IW_CM_EVENT_STATUS_ACCEPTED) {

So messing around with the enum definitions to fix the warning seems too
disruptive; the simplest fix is to cast the argument of the switch to
int.

Reviewed by: kmacy
MFC after: 1 week


233917 05-Apr-2012 ae

Fix VIMAGE build.


233874 04-Apr-2012 glebius

Merge from OpenBSD:
revision 1.173
date: 2011/11/09 12:36:03; author: camield; state: Exp; lines: +11 -12
State expire time is a baseline time ("last active") for expiry
calculations, and does _not_ denote the time when to expire. So
it should never be added to (set into the future).

Try to reconstruct it with an educated guess on state import and
just set it to the current time on state updates.

This fixes a problem on pfsync listeners where the expiry time
could be double the expected value and cause a lot more states
to linger.


233846 03-Apr-2012 glebius

Since pf 4.5 import pf(4) has a mechanism to defer
forwarding a packet, that creates state, until
pfsync(4) peer acks state addition (or 10 msec
timeout passes).

This is needed for active-active CARP configurations,
which are poorly supported in FreeBSD and arguably
a good idea at all.

Unfortunately by the time of import this feature in
OpenBSD was turned on, and did not have a switch to
turn it off. This leaked to FreeBSD.

This change make it possible to turn this feature
off via ioctl() and turns it off by default.

Obtained from: OpenBSD


233617 28-Mar-2012 jkim

MFV: r233615

Revert r233555 and apply a fix for the reference counting regressions.

Tested by: andreast, lme, nwhitehorn,
Sevan / Venture37 (venture37 at gmail dot com)
Submitted by: Robert Moore (robert dot moore at intel dot com)


233558 27-Mar-2012 jkim

MFV: r233551

Fix two possible memory leaks in error path.

Obtained from: ACPICA


233555 27-Mar-2012 jkim

MFV: r233550

Temporarily revert an upstream commit. This change caused regressions for
too many laptop users. Especially, automatic repair for broken _BIF caused
strange reference counting issues and kernal panics. This reverts:

https://github.com/otcshare/acpica/commit/c995fed15ab41f6feae1299876271ea330f5c1c5


233284 21-Mar-2012 bschmidt

Update the firmware to version 0.236

Submitted by: PseudoCylon
MFC after: 2 weeks


233250 20-Mar-2012 jkim

Merge ACPICA 20120320.


232958 14-Mar-2012 bschmidt

Import the latest microcode.h which was used to generate the current
firmware files and adjust the Makefile.

Obtained from: OpenBSD


232946 13-Mar-2012 bschmidt

Update the rt2860's firmware and add a Makefile for the module. While
here remove the ucode header file which was used to generate the fw files
but by now is outdated.

Reviewed by: ray
Obtained from: OpenBSD


232915 13-Mar-2012 jmallett

Remove some files not used by the FreeBSD kernel which have been adding quite
a bit of bloat to the kernel source tree's size.


232816 11-Mar-2012 jmallett

Disable the Simple Executive's error decoding/reporting code.


232815 11-Mar-2012 jmallett

Do not try to use libfdt in FreeBSD.


232813 11-Mar-2012 jmallett

Remove files not needed by FreeBSD.


232812 11-Mar-2012 jmallett

Merge the Cavium Octeon SDK 2.3.0 Simple Executive code and update FreeBSD to
make use of it where possible.

This primarily brings in support for newer hardware, and FreeBSD is not yet
able to support the abundance of IRQs on new hardware and many features in the
Ethernet driver.

Because of the changes to IRQs in the Simple Executive, we have to maintain our
own list of Octeon IRQs now, which probably can be pared-down and be specific
to the CIU interrupt unit soon, and when other interrupt mechanisms are added
they can maintain their own definitions.

Remove unmasking of interrupts from within the UART device now that the
function used is no longer present in the Simple Executive. The unmasking
seems to have been gratuitous as this is more properly handled by the buses
above the UART device, and seems to work on that basis.


232685 08-Mar-2012 glebius

Merge from OpenBSD:

revision 1.146
date: 2010/05/12 08:11:11; author: claudio; state: Exp; lines: +2 -3
bzero() the full compressed update struct before setting the values.
This is needed because pf_state_peer_hton() skips some fields in certain
situations which could result in garbage beeing sent to the other peer.
This seems to fix the pfsync storms seen by stephan@ and so dlg owes me
a whiskey.

I didn't see any storms, but this definitely fixes a useless memory
allocation on the receiving side, due to non zero scrub_flags field
in a pfsync_state_peer structure.


231852 17-Feb-2012 bz

Merge multi-FIB IPv6 support from projects/multi-fibv6/head/:

Extend the so far IPv4-only support for multiple routing tables (FIBs)
introduced in r178888 to IPv6 providing feature parity.

This includes an extended rtalloc(9) KPI for IPv6, the necessary
adjustments to the network stack, and user land support as in netstat.

Sponsored by: Cisco Systems, Inc.
Reviewed by: melifaro (basically)
MFC after: 10 days


231844 16-Feb-2012 jkim

Merge ACPICA 20120215.


230265 17-Jan-2012 glebius

Allocate our mbuf with m_get2().


230135 15-Jan-2012 uqs

Remove spurious 8bit chars, turning files into plain ASCII.


230119 14-Jan-2012 csjp

Revert to the old behavior of allocating table/table entries using
M_NOWAIT. Currently, the code allows for sleeping in the ioctl path
to guarantee allocation. However code also handles ENOMEM gracefully, so
propagate this error back to user-space, rather than sleeping while
holding the global pf mutex.

Reviewed by: glebius
Discussed with: bz


230040 13-Jan-2012 gonzo

- Do not enumerate PCIe bus on CN56XX Pass 1 devices to avoid hard hang.
There is known issue with this hardware.

Submitted by: Andrew Duane <aduane@juniper.net>


229989 11-Jan-2012 jkim

Merge ACPICA 20120111.


229976 11-Jan-2012 glebius

Redo r226660:
- Define schednetisr() to swi_sched.
- In the swi handler check if there is some data prepared,
and if true, then call pfsync_sendout(), however tell it
not to schedule swi again.
- Since now we don't obtain the pfsync lock in the swi handler,
don't use ifqueue mutex to synchronize queue access.


229964 11-Jan-2012 glebius

Fix some spacing in code under __FreeBSD__.


229963 11-Jan-2012 glebius

Add necessary locking in pfsync_in_ureq().


229962 11-Jan-2012 glebius

Move PF_LOCK_ASSERT() under __FreeBSD__.


229961 11-Jan-2012 glebius

Merge from OpenBSD:
revision 1.128
date: 2009/08/16 13:01:57; author: jsg; state: Exp; lines: +1 -5
remove prototypes of a bunch of functions that had their implementations
removed in pfsync v5.


229959 11-Jan-2012 glebius

When running with INVARIANTS the mutex(9) code does all necessary
asserts for non-recursive mutexes.


229857 09-Jan-2012 glebius

Can't pass MSIZE to m_cljget(), an mbuf can't be attached as external storage
to another mbuf.


229853 09-Jan-2012 glebius

Backout of backout: we need SI_SUB_PROTO_DOMAIN for pfsync, since
it needs existing inetdomain on startup.


229852 09-Jan-2012 glebius

Revert sub argument of MODULE_DECLARE back to r226532.

Noticed by: bz


229851 09-Jan-2012 glebius

In FreeBSD we determine presence of pfsync(4) at run-time, not
at compile time, so define NPFSYNC to 1 always. While here, remove
unused defines.


229850 09-Jan-2012 glebius

Bunch of fixes to pfsync(4) module load/unload:

o Make the pfsync.ko actually usable. Before this change loading it
didn't register protosw, so was a nop. However, a module /boot/kernel
did confused users.
o Rewrite the way we are joining multicast group:
- Move multicast initialization/destruction to separate functions.
- Don't allocate memory if we aren't going to join a multicast group.
- Use modern API for joining/leaving multicast group.
- Now the utterly wrong pfsync_ifdetach() isn't needed.
o Move module initialization from SYSINIT(9) to moduledata_t method.
o Refuse to unload module, unless asked forcibly.
o Improve a bit some FreeBSD porting code:
- Use separate malloc type.
- Simplify swi sheduling.

This change is probably wrong from VIMAGE viewpoint, however pfsync
wasn't VIMAGE-correct before this change, too.

Glanced at by: bz


229849 09-Jan-2012 glebius

o Fix panic on module unload, that happened due to mutex being
destroyed prior to pfsync_uninit(). To do this, move all the
initialization to the module_t method, instead of SYSINIT(9).
o Fix another panic after module unload, due to not clearing the
m_addr_chg_pf_p pointer.
o Refuse to unload module, unless being unloaded forcibly.
o Revert the sub argument to MODULE_DECLARE, to the stable/8 value.

This change probably isn't correct from viewpoint of VIMAGE, but
the module wasn't VIMAGE-correct before the change, as well.

Glanced at by: bz


229777 07-Jan-2012 glebius

Merge from OpenBSD:
revision 1.170
date: 2011/10/30 23:04:38; author: mikeb; state: Exp; lines: +6 -7
Allow setting big MTU values on the pfsync interface but not larger
than the syncdev MTU. Prompted by the discussion with and tested
by Maxim Bourmistrov; ok dlg, mpf

Consistently use sc_ifp->if_mtu in the MTU check throughout the
module. This backs out r228813.


229773 07-Jan-2012 glebius

Fix indentation.


229753 07-Jan-2012 dim

In sys/contrib/rdma/ib_addr.h, bump MAX_ADDR_LEN to 20 bytes (the same
value used in sys/ofed/include/linux/netdevice.h), so there will be no
buffer overruns in the rest of the inline functions in this file.

Reviewed by: kmacy
MFC after: 1 week


229533 04-Jan-2012 ray

Update contrib/xz-embedded to build with new GEOM_UNCOMPRESS module.

Approved by: adrian (mentor)


229211 01-Jan-2012 adrian

Initial copy of xz-embedded to sys/contrib/.

The upcoming geom_compress module (a read-only gzip/ulzma translation layer,
similar to what geom_uzip does) will leverage parts of this.


229071 31-Dec-2011 gonzo

- Properly clean state structure in cvmx_usb_initialize


229070 31-Dec-2011 gonzo

- CAPK-0100 board's USB timer is 12MHz


228855 24-Dec-2011 pluknet

Fix LINT-VIMAGE build after r228814: use virtualized pf_pool_limits.


228816 22-Dec-2011 glebius

Merge from OpenBSD:
revision 1.122
date: 2009/05/13 01:01:34; author: dlg; state: Exp; lines: +6 -4
only keep track of the number of updates on tcp connections. state sync on
all the other protocols is simply pushing the timeouts along which has a
resolution of 1 second, so it isnt going to be hurt by pfsync taking up
to a second to send it over.

keep track of updates on tcp still though, their windows need constant
attention.


228815 22-Dec-2011 glebius

Merge from OpenBSD:
revision 1.120
date: 2009/04/04 13:09:29; author: dlg; state: Exp; lines: +5 -5
use time_uptime instead of time_second internally. time_uptime isnt
affected by adjusting the clock.

revision 1.175
date: 2011/11/25 12:52:10; author: dlg; state: Exp; lines: +3 -3
use time_uptime to set state creation values as time_second can be
skewed at runtime by things like date(1) and ntpd. time_uptime is
monotonic and therefore more useful to compare against.


228814 22-Dec-2011 glebius

Merge couple more fixes from OpenBSD to bulk processing:

revision 1.118
date: 2009/03/23 06:19:59; author: dlg; state: Exp; lines: +8 -6
wait an appropriate amount of time before giving up on a bulk update,
rather than giving up after a hardcoded 5 seconds (which is generally much
too short an interval for a bulk update).
pointed out by david@, eyeballed by mcbride@

revision 1.171
date: 2011/10/31 22:02:52; author: mikeb; state: Exp; lines: +2 -1
Don't forget to cancel bulk update failure timeout when destroying an
interface. Problem report and fix from Erik Lax, thanks!

Start a brief note of revisions merged from OpenBSD.


228813 22-Dec-2011 glebius

We really mean MTU of the real interface here, not of our pseudo.


228811 22-Dec-2011 glebius

In FreeBSD we always have bpf(4) API, either real or stub. No need
in detecting presense of 'device bpf'.


228736 20-Dec-2011 glebius

Restore a feature that was present in 5.x and 6.x, and was cleared in
7.x, 8.x and 9.x with pf(4) imports: pfsync(4) should suppress CARP
preemption, while it is running its bulk update.

However, reimplement the feature in more elegant manner, that is
partially inspired by newer OpenBSD:

- Rename term "suppression" to "demotion", to match with OpenBSD.
- Keep a global demotion factor, that can be raised by several
conditions, for now these are:
- interface goes down
- carp(4) has problems with ip_output() or ip6_output()
- pfsync performs bulk update
- Unlike in OpenBSD the demotion factor isn't a counter, but
is actual value added to advskew. The adjustment values for
particular error conditions are also configurable, and their
defaults are maximum advskew value, so a single failure bumps
demotion to maximum. This is for POLA compatibility, and should
satisfy most users.
- Demotion factor is a writable sysctl, so user can do
foot shooting, if he desires to.


228732 20-Dec-2011 glebius

- Cover pfsync callouts deletion with PF_LOCK().
- Cover setting up interface between pf and pfsync with PF_LOCK().


228554 15-Dec-2011 dim

In sys/contrib/ngatm/netnatm/msg/uni_ie.c, use a more appropriate way to
tell the compiler some parameters are purposefully unused.

MFC after: 1 week


228150 30-Nov-2011 glebius

Return value should be conditional on return value of pfsync_defer_ptr()

PR: kern/162947
Submitted by: Matthieu Kraus <matthieu.kraus s2008.tu-chemnitz.de>


228110 28-Nov-2011 jkim

Merge ACPICA 20111123.


227957 24-Nov-2011 rmh

Adjust a few old checks to use __FreeBSD_version macro to
determine which version of FreeBSD kernel we're compiling.

Approved by: kib (mentor)


226938 30-Oct-2011 kevlo

Add missing PF_UNLOCK in pf_test

Reviewed by: bz


226831 27-Oct-2011 glebius

Utilize new IF_DEQUEUE_ALL(ifq, m) macro in pfsyncintr() to reduce
contention on ifqueue lock.


226663 23-Oct-2011 glebius

Merge several fixes to bulk update processing from OpenBSD. Merged
revisions: 1.148, 1.149, 1.150. This makes number of states on
master/slave to be of a sane value.


226662 23-Oct-2011 glebius

Fix indentation, no code changed.


226661 23-Oct-2011 glebius

- Fix a bad typo (FreeBSD specific) in pfsync_bulk_update(). Instead
of scheduling next run pfsync_bulk_update(), pfsync_bulk_fail()
was scheduled.
This lead to instant 100% state leak after first bulk update
request.
- After above fix, it appeared that pfsync_bulk_update() lacks
locking. To fix this, sc_bulk_tmo callout was converted to an
mtx one. Eventually, all pf/pfsync callouts should be converted
to mtx version, since it isn't possible to stop or drain a
non-mtx callout without risk of race.
- Add comment that callout_stop() in pfsync_clone_destroy() lacks
locking. Since pfsync0 can't be destroyed (yet), let it be here.


226660 23-Oct-2011 glebius

Fix from r226623 is not sufficient to close all races in pfsync(4).

The root of problem is re-locking at the end of pfsync_sendout().
Several functions are calling pfsync_sendout() holding pointers
to pf data on stack, and these functions expect this data to be
consistent.

To fix this, the following approach was taken:

- The pfsync_sendout() doesn't call ip_output() directly, but
enqueues the mbuf on sc->sc_ifp's interfaces queue, that
is currently unused. Then pfsync netisr is scheduled. PF_LOCK
isn't dropped in pfsync_sendout().
- The netisr runs through queue and ip_output()s packets
on it.

Apart from fixing race, this also decouples stack, fixing
potential issues, that may happen, when sending pfsync(4)
packets on input path.

Reviewed by: eri (a quick review)


226656 23-Oct-2011 glebius

Absense of M_WAITOK in malloc flags for UMA doesn't
equals presense of M_NOWAIT. Specify M_NOWAIT explicitly.

This fixes sleeping with PF_LOCK().


226655 23-Oct-2011 glebius

Correct flag for uma_zalloc() is M_WAITOK. M_WAIT is an old and
deprecated flag from historical mbuf(9) allocator.

This is style only change.


226623 21-Oct-2011 glebius

Fix a race: we should update sc_len before dropping the pf lock, otherwise a
number of packets can be queued on sc, while we are in ip_output(), and then
we wipe the accumulated sc_len. On next pfsync_sendout() that would lead to
writing beyond our mbuf cluster.


226609 21-Oct-2011 glebius

In FreeBSD ip_output() expects ip_len and ip_off in host byte order

PR: kern/159029


226544 19-Oct-2011 bz

Fix recursive pf locking leading to panics. Splatter PF_LOCK_ASSERT()s
to document where we are expecting to be called with a lock held to
more easily catch unnoticed code paths.
This does not neccessarily improve locking in pfsync, it just tries
to avoid the panics reported.

PR: kern/159390, kern/158873
Submitted by: pluknet (at least something that partly resembles
my patch ignoring other cleanup, which I only saw
too late on the 2nd PR)
MFC After: 3 days


226536 19-Oct-2011 bz

De-virtualize the pf_task_mtx lock. At the current state of pf locking
and virtualization it is not helpful but complicates things.

Current state of art is to not virtualize these kinds of locks -
inp_group/hash/info/.. are all not virtualized either.

MFC after: 3 days


226535 19-Oct-2011 bz

Adjust the PF_ASSERT() macro to what we usually use in the network stack:
PF_LOCK_ASSERT() and PF_UNLOCK_ASSERT().

MFC after: 3 days


226533 19-Oct-2011 bz

In the non-FreeBSD case we do not expect PF_LOCK and friends to do anything.

MFC after: 3 days


226532 19-Oct-2011 bz

Pseudo interfaces should go at SI_SUB_PSEUDO. However at least
pfsync also depends on pf to be initialized already so pf goes at
FIRST and the interfaces go at ANY.
Then the (VNET_)SYSINIT startups for pf stays at SI_SUB_PROTO_BEGIN
and for pfsync we move to the later SI_SUB_PROTO_IF.

This is not ideal either but at least an order that should work for
the moment and can be re-fined with the VIMAGE merge, once this will
actually work with more than one network stack.

MFC after: 3 days


226531 19-Oct-2011 bz

Fix an obvious locking bug where we would lock again rather than unlock.

MFC after: 3 days


226530 19-Oct-2011 bz

Fix a bug when NPFSYNC > 0 that on FreeBSD we would always return
and never remove state.

This fixes the problem some people are seeing that state is removed when pf
is loaded as a module but not in situations when compiled into the kernel.

Reported by: many on freebsd-pf
Tested by: flo
MFC after: 3 days


226527 19-Oct-2011 bz

Fix indentation in a loop and a tiny maze of #ifdefs for just the
__FreeBSD__ parts that had it wrong.

MFC after: 3 days


225171 25-Aug-2011 bz

Use the correct byte order for the ip_divert(4) mbuf tag port meta
information in pf(4).

Submitted by: Yaocl (chunlinyao gmail.com), forum post 145106
Approved by: re (kib)


224936 17-Aug-2011 pluknet

Fix build failure without BPF.

Reported by: deeptech71 at gmail dot com
Approved by: re (kib)


223758 04-Jul-2011 attilio

With retirement of cpumask_t and usage of cpuset_t for representing a
mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient.

Remove them and replace their usage with custom pc_cpuid magic (as,
atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and
pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))).

This change is not targeted for MFC because of struct pcpu members
removal and dependency by cpumask_t retirement.

MD review by: marcel, marius, alc
Tested by: pluknet
MD testing by: marcel, marius, gonzo, andreast


223637 28-Jun-2011 bz

Update packet filter (pf) code to OpenBSD 4.5.

You need to update userland (world and ports) tools
to be in sync with the kernel.

Submitted by: mlaier
Submitted by: eri


222813 07-Jun-2011 attilio

etire the cpumask_t type and replace it with cpuset_t usage.

This is intended to fix the bug where cpu mask objects are
capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever
value. Anyway, as long as several structures in the kernel are
statically allocated and sized as MAXCPU, it is suggested to keep it
as low as possible for the time being.

Technical notes on this commit itself:
- More functions to handle with cpuset_t objects are introduced.
The most notable are cpusetobj_ffs() (which calculates a ffs(3)
for a cpuset_t object), cpusetobj_strprint() (which prepares a string
representing a cpuset_t object) and cpusetobj_strscan() (which
creates a valid cpuset_t starting from a string representation).
- pc_cpumask and pc_other_cpus are target to be removed soon.
With the moving from cpumask_t to cpuset_t they are now inefficient
and not really useful. Anyway, for the time being, please note that
access to pcpu datas is protected by sched_pin() in order to avoid
migrating the CPU while reading more than one (possible) word
- Please note that size of cpuset_t objects may differ between kernel
and userland. While this is not directly related to the patch itself,
it is good to understand that concept and possibly use the patch
as a reference on how to deal with cpuset_t objects in userland, when
accessing kernland members.
- KTR_CPUMASK is changed and now is represented through a string, to be
set as the example reported in NOTES.

Please additively note that no MAXCPU is bumped in this patch, but
private testing has been done until to MAXCPU=128 on a real 8x8x2(htt)
machine (amd64).

Please note that the FreeBSD version is not yet bumped because of
the upcoming pcpu changes. However, note that this patch is not
targeted for MFC.

People to thank for the time spent on this patch:
- sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested
several revision of the patches and really helped in improving
stability of this work.
- marius fixed several bugs in the sparc64 implementation and reviewed
patches related to ktr.
- jeff and jhb discussed the basic approach followed.
- kib and marcel made targeted review on some specific part of the
patch.
- marius, art, nwhitehorn and andreast reviewed MD specific part of
the patch.
- marius, andreast, gonzo, nwhitehorn and jceel tested MD specific
implementations of the patch.
- Other people have made contributions on other patches that have been
already committed and have been listed separately.

Companies that should be mentioned for having participated at several
degrees:
- Yahoo! for having offered the machines used for testing on big
count of CPUs.
- The FreeBSD Foundation for having sponsored my devsummit attendance,
which has been instrumental.
- Sandvine for having offered offices and infrastructure during
development.

(I really hope I didn't forget anyone, if it happened I apologize in
advance).


222691 04-Jun-2011 rwatson

Add _mbuf() variants of various inpcb-related interfaces, including lookup,
hash install, etc. For now, these are arguments are unused, but as we add
RSS support, we will want to use hashes extracted from mbufs, rather than
manually calculated hashes of header fields, due to the expensive of the
software version of Toeplitz (and similar hashes).

Add notes that it would be nice to be able to pass mbufs into lookup
routines in pf(4), optimising firewall lookup in the same way, but the
code structure there doesn't facilitate that currently.

(In principle there is no reason this couldn't be MFCed -- the change
extends rather than modifies the KBI. However, it won't be useful without
other previous possibly less MFCable changes.)

Reviewed by: bz
Sponsored by: Juniper Networks, Inc.


222544 31-May-2011 jkim

Merge ACPICA 20110527.


222529 31-May-2011 bz

Remove some further INET related symbols from pf to allow the module
to not only compile bu load as well for testing with IPv6-only kernels.
For the moment we ignore the csum change in pf_ioctl.c given the
pending update to pf45.

Reported by: dru
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 20 days


222488 30-May-2011 rwatson

Decompose the current single inpcbinfo lock into two locks:

- The existing ipi_lock continues to protect the global inpcb list and
inpcb counter. This lock is now relegated to a small number of
allocation and free operations, and occasional operations that walk
all connections (including, awkwardly, certain UDP multicast receive
operations -- something to revisit).

- A new ipi_hash_lock protects the two inpcbinfo hash tables for
looking up connections and bound sockets, manipulated using new
INP_HASH_*() macros. This lock, combined with inpcb locks, protects
the 4-tuple address space.

Unlike the current ipi_lock, ipi_hash_lock follows the individual inpcb
connection locks, so may be acquired while manipulating a connection on
which a lock is already held, avoiding the need to acquire the inpcbinfo
lock preemptively when a binding change might later be required. As a
result, however, lookup operations necessarily go through a reference
acquire while holding the lookup lock, later acquiring an inpcb lock --
if required.

A new function in_pcblookup() looks up connections, and accepts flags
indicating how to return the inpcb. Due to lock order changes, callers
no longer need acquire locks before performing a lookup: the lookup
routine will acquire the ipi_hash_lock as needed. In the future, it will
also be able to use alternative lookup and locking strategies
transparently to callers, such as pcbgroup lookup. New lookup flags are,
supplementing the existing INPLOOKUP_WILDCARD flag:

INPLOOKUP_RLOCKPCB - Acquire a read lock on the returned inpcb
INPLOOKUP_WLOCKPCB - Acquire a write lock on the returned inpcb

Callers must pass exactly one of these flags (for the time being).

Some notes:

- All protocols are updated to work within the new regime; especially,
TCP, UDPv4, and UDPv6. pcbinfo ipi_lock acquisitions are largely
eliminated, and global hash lock hold times are dramatically reduced
compared to previous locking.
- The TCP syncache still relies on the pcbinfo lock, something that we
may want to revisit.
- Support for reverting to the FreeBSD 7.x locking strategy in TCP input
is no longer available -- hash lookup locks are now held only very
briefly during inpcb lookup, rather than for potentially extended
periods. However, the pcbinfo ipi_lock will still be acquired if a
connection state might change such that a connection is added or
removed.
- Raw IP sockets continue to use the pcbinfo ipi_lock for protection,
due to maintaining their own hash tables.
- The interface in6_pcblookup_hash_locked() is maintained, which allows
callers to acquire hash locks and perform one or more lookups atomically
with 4-tuple allocation: this is required only for TCPv6, as there is no
in6_pcbconnect_setup(), which there should be.
- UDPv6 locking remains significantly more conservative than UDPv4
locking, which relates to source address selection. This needs
attention, as it likely significantly reduces parallelism in this code
for multithreaded socket use (such as in BIND).
- In the UDPv4 and UDPv6 multicast cases, we need to revisit locking
somewhat, as they relied on ipi_lock to stablise 4-tuple matches, which
is no longer sufficient. A second check once the inpcb lock is held
should do the trick, keeping the general case from requiring the inpcb
lock for every inpcb visited.
- This work reminds us that we need to revisit locking of the v4/v6 flags,
which may be accessed lock-free both before and after this change.
- Right now, a single lock name is used for the pcbhash lock -- this is
undesirable, and probably another argument is required to take care of
this (or a char array name field in the pcbinfo?).

This is not an MFC candidate for 8.x due to its impact on lookup and
locking semantics. It's possible some of these issues could be worked
around with compatibility wrappers, if necessary.

Reviewed by: bz
Sponsored by: Juniper Networks, Inc.


221132 27-Apr-2011 bz

Make pf compile without INET support by adding #ifdef INETs and
correcting few #includes.

Reviewed by: gnn
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 4 days


220893 20-Apr-2011 bschmidt

Add firmware images for the 6000 series g2a and g2b adapters.


220892 20-Apr-2011 bschmidt

Update iwn(4) firmware blobs:
- bump iwn1000fw to 39.31.5.1
- bump iwn5000fw to 8.83.5.1
- bump iwn6050fw to 41.28.5.1


220681 15-Apr-2011 jkim

Re-merge with ACPICA vendor source.


220663 15-Apr-2011 jkim

Merge ACPICA 20110413.


220433 07-Apr-2011 jkim

Use atomic load & store for TSC frequency. It may be overkill for amd64 but
safer for i386 because it can be easily over 4 GHz now. More worse, it can
be easily changed by user with 'machdep.tsc_freq' tunable (directly) or
cpufreq(4) (indirectly). Note it is intentionally not used in performance
critical paths to avoid performance regression (but we should, in theory).
Alternatively, we may add "virtual TSC" with lower frequency if maximum
frequency overflows 32 bits (and ignore possible incoherency as we do now).


219707 17-Mar-2011 jkim

Merge ACPICA 20110316.


219694 16-Mar-2011 jmallett

o) Clean up FPA pools on module unload.
o) Allocate output buffer pool based on available output queues.

Submitted by: Bhanu Prakash (with modifications)


219673 15-Mar-2011 jkim

Deprecate tsc_present as the last of its real consumers finally disappeared.


219473 11-Mar-2011 jkim

Add a tunable "machdep.disable_tsc" to turn off TSC. Specifically, it turns
off boot-time CPU frequency calibration, DELAY(9) with TSC, and using TSC as
a CPU ticker. Note tsc_present does not change by this tunable.


219461 10-Mar-2011 jkim

Deprecate rarely used tsc_is_broken. Instead, we zero out tsc_freq because
it is almost always used with tsc_freq any way.


219459 10-Mar-2011 jkim

Remove alpha reminiscence from altq.


219458 10-Mar-2011 jkim

Consistently add TSC support for amd64.


219457 10-Mar-2011 jkim

Remove support for FreeBSD 4.x and below.


218590 12-Feb-2011 jkim

Merge ACPICA 20110211.


217388 14-Jan-2011 csjp

Correct bogus initialization. It should be noted that this change
has been corrected in the vendor branch, but for now, silence clang
warnings.

Found by: clang
Discussed with: mlaier
MFC after: 1 week


217365 13-Jan-2011 jkim

Merge ACPICA 20110112. Switch to BSD/GPLv2 dual license[1].

Discussed with: core [1]


217214 10-Jan-2011 jmallett

o) Expand the CIU driver to be aware of newly-allocated parts of the IRQ range.
o) Add 'octm', a trivial driver for the 10/100 management ports found on some
Octeon systems.
o) Make the Simple Executive's management port helper routines compile on
FreeBSD (namely by not doing math on void pointers.)
o) Add a cvmx_mgmt_port_sendm routine to the Simple Executive to send an mbuf
so there is only one copy in the transmit path, rather than having to first
copy the mbuf to an intermediate buffer and then copy that to the Simple
Executive's transmit ring.
o) Properly work out MII addresses of management ports on the Lanner MR-730.
XXX The MR-730 also needs some patches to the MII read/write routines, but
this is sufficient for now. Media detection will be fixed in the future
when I can spend more time reading the vendor-supplied patches.


216559 19-Dec-2010 bschmidt

Update firmware for wpi(4) from version 2.14.4 to 15.32.2.9.

PR: kern/142907
Submitted by: Craig Butler <craig001 at lerwick.hopto.org>
MFC after: 2 weeks


216476 16-Dec-2010 jmallett

o) Add support for the Lanner MR-321X/MR-325, which is just a modified MR-320.
o) On the Lanner MR-730, disable PCIe lane swap, per vendor.


216471 15-Dec-2010 jkim

Merge ACPICA 20101209.


215990 28-Nov-2010 jmallett

Merge Cavium Octeon SDK 2.0 Simple Executive; this brings some fixes and new
facilities as well as support for the Octeon 2 family of SoCs.

XXX Note that with our antediluvian assembler, we can't support some Octeon 2
instructions and fall back to using the old ones instead.


215681 22-Nov-2010 jhb

Remove some bogus, self-referential mergeinfo.


215014 08-Nov-2010 jmallett

o) Recognize the Lanner MR-730.
o) Fix enumeration of PHY addresses on the MR-955.
o) Parse link state for the MR-730 using the Broadcom PHY support in the SDK.
It's not clear that this is entirely-correct, but it seems to work. Since
this board uses a BCM5482S, this may mean that we work correctly for copper
but not SFI, which is untested.


213806 13-Oct-2010 jkim

Merge ACPICA 20101013.


213792 13-Oct-2010 rpaulo

Ignore the return value of ADDCARRY().


213789 13-Oct-2010 rpaulo

Properly tell the compiler that we want to ignore the return value of
certain macros.


213788 13-Oct-2010 rpaulo

Fix several cases were a conditional operator was used instead of a
bitwise operator.

Found with: clang


213782 13-Oct-2010 rpaulo

Pass a format string to make_dev().

Found by: clang


213346 02-Oct-2010 jmallett

o) Allow devices to override the MDIO read and write functions presented to
the miibus attached to octe interfaces.
o) Add an SMI/MDIO interface to the MV88E61XX and use it for the switch PHY on
the Lanner MR-320. An actual driver for the switch PHY will come later.
Note that for now it intercepts and fakes MII_BMSR reads to prevent the
miibus from talking to anything but the switch itself.


212844 19-Sep-2010 jmallett

Add preliminary support for the Lanner MR-955. It boots multi-user but there
seem to be problems both with the on-board Ethernet interfaces and the em(4)
interfaces on PCI under FreeBSD.

Thanks to Lanner for providing access to hardware.


212761 16-Sep-2010 jkim

Merge ACPICA 20100915.


212403 10-Sep-2010 bz

When using pf routing options, properly handle IP fragmentation
for interfaces with TSO enabled, otherwise one would see an extra
ICMP unreach, frag needed pre matching packet on lo0.
This syncs pf code to ip_output.c r162084.

PR: kern/144311
Submitted by: yongari via mlaier
Reviewed by: eri
Tested by: kib
MFC after: 8 days


210976 06-Aug-2010 jkim

Merge ACPICA 20100806.


210311 20-Jul-2010 jmallett

Update the port of FreeBSD to Cavium Octeon to use the Cavium Simple Executive
library:
o) Increase inline unit / large function growth limits for MIPS to accommodate
the needs of the Simple Executive, which uses a shocking amount of inlining.
o) Remove TARGET_OCTEON and use CPU_CNMIPS to do things required by cnMIPS and
the Octeon SoC.
o) Add OCTEON_VENDOR_LANNER to use Lanner's allocation of vendor-specific
board numbers, specifically to support the MR320.
o) Add OCTEON_BOARD_CAPK_0100ND to hard-wire configuration for the CAPK-0100nd,
which improperly uses an evaluation board's board number and breaks board
detection at runtime. This board is sold by Portwell as the CAM-0100.
o) Add support for the RTC available on some Octeon boards.
o) Add support for the Octeon PCI bus. Note that rman_[sg]et_virtual for IO
ports can not work unless building for n64.
o) Clean up the CompactFlash driver to use Simple Executive macros and
structures where possible (it would be advisable to use the Simple Executive
API to set the PIO mode, too, but that is not done presently.) Also use
structures from FreeBSD's ATA layer rather than structures copied from
Linux.
o) Print available Octeon SoC features on boot.
o) Add support for the Octeon timecounter.
o) Use the Simple Executive's routines rather than local copies for doing reads
and writes to 64-bit addresses and use its macros for various device
addresses rather than using local copies.
o) Rename octeon_board_real to octeon_is_simulation to reduce differences with
Cavium-provided code originally written for Linux. Also make it use the
same simplified test that the Simple Executive and Linux both use rather
than our complex one.
o) Add support for the Octeon CIU, which is the main interrupt unit, as a bus
to use normal interrupt allocation and setup routines.
o) Use the Simple Executive's bootmem facility to allocate physical memory for
the kernel, rather than assuming we know which addresses we can steal.
NB: This may reduce the amount of RAM the kernel reports you as having if
you are leaving large temporary allocations made by U-Boot allocated
when starting FreeBSD.
o) Add a port of the Cavium-provided Ethernet driver for Linux. This changes
Ethernet interface naming from rgmxN to octeN. The new driver has vast
improvements over the old one, both in performance and functionality, but
does still have some features which have not been ported entirely and there
may be unimplemented code that can be hit in everyday use. I will make
every effort to correct those as they are reported.
o) Support loading the kernel on non-contiguous cores.
o) Add very conservative support for harvesting randomness from the Octeon
random number device.
o) Turn SMP on by default.
o) Clean up the style of the Octeon kernel configurations a little and make
them compile with -march=octeon.
o) Add support for the Lanner MR320 and the CAPK-0100nd to the Simple
Executive.
o) Modify the Simple Executive to build on FreeBSD and to build without
executive-config.h or cvmx-config.h. In the future we may want to
revert part of these changes and supply executive-config.h and
cvmx-config.h and access to the options contained in those files via
kernel configuration files.
o) Modify the Simple Executive USB routines to support getting and setting
of the USB PID.


210286 20-Jul-2010 jmallett

Import the Cavium Simple Executive from the Cavium Octeon SDK. The Simple
Executive is a library that can be used by standalone applications and kernels
to abstract access to Octeon SoC and board-specific hardware and facilities.
The FreeBSD port to Octeon will be updated to use this where possible.


210113 15-Jul-2010 bschmidt

- Update 6000 firmware to 9.221.4.1
- Add 6050 firmware

MFC after: 2 weeks


209746 06-Jul-2010 jkim

Merge ACPICA 20100702.


208750 02-Jun-2010 raj

Provide kernel level headers for the libfdt code.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation


208019 13-May-2010 thompsa

Sync run(4) driver from author's site.

Submitted by: Akinori Furukoshi
Obtained from: git://gitorious.org/run/run.git


207736 07-May-2010 mckusick

Merger of the quota64 project into head.

This joint work of Dag-Erling Smørgrav and myself updates the
FFS quota system to support both traditional 32-bit and new 64-bit
quotas (for those of you who want to put 2+Tb quotas on your users).

By default quotas are not compiled into the kernel. To include them
in your kernel configuration you need to specify:

options QUOTA # Enable FFS quotas

If you are already running with the current 32-bit quotas, they
should continue to work just as they have in the past. If you
wish to convert to using 64-bit quotas, use `quotacheck -c 64';
if you wish to revert from 64-bit quotas back to 32-bit quotas,
use `quotacheck -c 32'.

There is a new library of functions to simplify the use of the
quota system, do `man quotafile' for details. If your application
is currently using the quotactl(2), it is highly recommended that
you convert your application to use the quotafile interface.
Note that existing binaries will continue to work.

Special thanks to John Kozubik of rsync.net for getting me
interested in pursuing 64-bit quota support and for funding
part of my development time on this project.


207369 29-Apr-2010 bz

MFP4: @176978-176982, 176984, 176990-176994, 177441

"Whitspace" churn after the VIMAGE/VNET whirls.

Remove the need for some "init" functions within the network
stack, like pim6_init(), icmp_init() or significantly shorten
others like ip6_init() and nd6_init(), using static initialization
again where possible and formerly missed.

Move (most) variables back to the place they used to be before the
container structs and VIMAGE_GLOABLS (before r185088) and try to
reduce the diff to stable/7 and earlier as good as possible,
to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9.

This also removes some header file pollution for putatively
static global variables.

Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are
no longer needed.

Reviewed by: jhb
Discussed with: rwatson
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
MFC after: 6 days


207344 28-Apr-2010 jkim

Merge ACPICA 20100428.


206627 14-Apr-2010 imp

We don't need the definition for in_cksum repeated here since we get
it from machine/in_cksum.h. This definition prevents us from using
hand-tuned assembler versions of in_cksum.

# this fixes the modules build on arm for ipfilter.


206446 10-Apr-2010 bschmidt

Update firmware for the 6000 series Intel cards to version 9.193.4.1.

Approved by: rpaulo (mentor)
MFC after: 2 weeks


206117 02-Apr-2010 jkim

Merge ACPICA 20100331 (and four additional upstream patches).


204934 09-Mar-2010 delphij

Integrate OpenBSD rev 1.5 of x86emu.c.


204920 09-Mar-2010 jkim

Since the interpreter slack mode is a tunable now, enable a local hack only
when it is set. Note the default behaviour does not change by this change.


204773 05-Mar-2010 jkim

Merge ACPICA 20100304.


204488 28-Feb-2010 raj

Merge DTC-d75b33af.

This is a split merge because of non-uniform licensing of the DTC package
contents and the way these components will be used in the FreeBSD environment.

The original DTC package is composed of the following two major pieces:

1. sys/contrib/libfdt (BSD [dual] license)
2. contrib/dtc (GPLv2)

The libfdt component is going to be shared in all aspects of the environment:
- /boot/loader
- kernel
- dtc (the device tree compiler proper, userspace tool)


203148 29-Jan-2010 thompsa

Uuencode the rt2870 firmware into ascii like the other firmware blobs.


203134 28-Jan-2010 thompsa

Add run(4), a driver for Ralink RT2700U/RT2800U/RT3000U USB 802.11agn devices.

This driver was written for OpenBSD by Damien Bergamini and ported over by
Akinori Furukoshi.


202773 21-Jan-2010 jkim

Fix a new header inclusion.


202771 21-Jan-2010 jkim

Merge ACPICA 20100121.


202607 19-Jan-2010 weongyo

Fixes a firmware bug that in some devices (e.g. Netgear WG111T or
TRENDnet TEW-504UB/EU) idProduct didn't be decreased after loading the
firmware.

Pointed by: Steven Friedrich <freebsd at insightbb.com>
Reviewed by: sam


201818 08-Jan-2010 trasz

Fix array overflow.

Reviewed by: philip


201212 29-Dec-2009 rpaulo

Delete old firmware.


201209 29-Dec-2009 rpaulo

iwn(4) update. Notable changes:
* new firmware
* untested support for 1000 and 6000 series
* bgscan support
* remove unnecessary RXON changes
* allow setting of country/regdomain by enforcing channel flags read
from the EEPROM
* suspend/resume fixes
* RF kill switch fixes
* LED adjustments
* several bus_dma*() related fixes
* addressed some LORs
* many other bug fixes

Submitted by: Bernhard Schmidt <bschmidt at techwires.net>
Obtained from: Brandon Gooch <jamesbrandongooch at gmail dot com> (LED
related changes), Benjamin Kaduk <kaduk at mit dot edu>
(LOR fixes), OpenBSD


200930 24-Dec-2009 delphij

Adapt OpenBSD pf's "sloopy" TCP state machine which is useful for Direct
Server Return mode, where not all packets would be visible to the load
balancer or gateway.

This commit should be reverted when we merge future pf versions. The
benefit it would provide is that this version does not break any existing
public interface and thus won't be a problem if we want to MFC it to
earlier FreeBSD releases.

Discussed with: mlaier
Obtained from: OpenBSD
Sponsored by: iXsystems, Inc.
MFC after: 1 month


200553 14-Dec-2009 jkim

Merge ACPICA 20091214.


199337 16-Nov-2009 jkim

Merge ACPICA 20091112.


199223 12-Nov-2009 attilio

Remove the explicit definition of inet_aton() as it was introduced as a
general function in r199208.

Reported by: np
Sponsored by: Sandvine Incorporated
MFC: 1 week


198952 05-Nov-2009 brueffer

Fix two memory leaks in error cases.

PR: 138378
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
Approved by: mlaier
MFC after: 1 week


198429 23-Oct-2009 rpaulo

Updated iwn(4) driver supporting the newer series, 5000, 5150 and 5300.

Submitted by: Bernhard Schmidt <bschmidt at techwires.net>


198251 19-Oct-2009 jkim

Rewrite x86bios and update its dependent drivers.

- Do not map entire real mode memory (1MB). Instead, we map IVT/BDA and
ROM area separately. Most notably, ROM area is mapped as device memory
(uncacheable) as it should be. User memory is dynamically allocated and
free'ed with contigmalloc(9) and contigfree(9). Remove now redundant and
potentially dangerous x86bios_alloc.c. If this emulator ever grows to
support non-PC hardware, we may implement it with rman(9) later.
- Move all host-specific initializations from x86emu_util.c to x86bios.c and
remove now unnecessary x86emu_util.c. Currently, non-PC hardware is not
supported. We may use bus_space(9) later when the KPI is fixed.
- Replace all bzero() calls for emulated registers with more obviously named
x86bios_init_regs(). This function also initializes DS and SS properly.
- Add x86bios_get_intr(). This function checks if the interrupt vector is
available for the platform. It is not necessary for PC-compatible hardware
but it may be needed later. ;-)
- Do not try turning off monitor if DPMS does not support the state.
- Allocate stable memory for VESA OEM strings instead of just holding
pointers to them. They may or may not be accessible always. Fix a memory
leak of video mode table while I am here.
- Add (experimental) BIOS POST call for vesa(4). This function calls VGA
BIOS POST code from the current VGA option ROM. Some video controllers
cannot save and restore the state properly even if it is claimed to be
supported. Usually the symptom is blank display after resuming from suspend
state. If the video mode does not match the previous mode after restoring,
we try BIOS POST and force the known good initial state. Some magic was
taken from NetBSD (and it was taken from vbetool, I believe.)
- Add a loader tunable for vgapci(4) to give a hint to dpms(4) and vesa(4)
to identify who owns the VESA BIOS. This is very useful for multi-display
adapter setup. By default, the POST video controller is automatically
probed and the tunable "hw.pci.default_vgapci_unit" is set to corresponding
vgapci unit number. You may override it from loader but it is very unlikely
to be necessary. Unfortunately only AGP/PCI/PCI-E controllers can be
matched because ISA controller does not have necessary device IDs.
- Fix a long standing bug in state save/restore function. The state buffer
pointer should be ES:BX, not ES:DI according to VBE 3.0. If it ever worked,
that's because BX was always zero. :-)
- Clean up register initializations more clearer per VBE 3.0.
- Fix a lot of style issues with vesa(4).


198237 19-Oct-2009 jkim

Merge ACPICA 20091013.


197386 21-Sep-2009 delphij

Use __FBSDID to embed RCS ID.


197383 21-Sep-2009 delphij

Collapase interrupt supporting functions to a new module, and switch from
x86emu to this new module.

This changeset also brings a fix for bugs introduced with the initial
x86emu commit, which prevents the user from using some display mode or
cause instant reboots during mode switch.

Submitted by: paradox <ddkprog yahoo com>


197107 11-Sep-2009 jkim

Canonify include paths for newly added files.


197104 11-Sep-2009 jkim

MFV: r196804

Import ACPICA 20090903


197019 09-Sep-2009 delphij

- Port x86emu to FreeBSD.
- Connect x86emu to build.

Tested with: make universe
Submitted by: swell.k at gmail com


197009 09-Sep-2009 delphij

Import x86emu from OpenBSD as of OPENBSD_4_6.


196970 08-Sep-2009 phk

Revert previous commit and add myself to the list of people who should
know better than to commit with a cat in the area.


196969 08-Sep-2009 phk

Add necessary include.


196551 25-Aug-2009 mlaier

Fix argument ordering to memcpy as well as the size of the copy in the
(theoretical) case that pfi_buffer_cnt should be greater than ~_max.

Submitted by: pjd
Reviewed by: {krw,sthen,markus}@openbsd.org
MFC after: 3 days


196481 23-Aug-2009 rwatson

Rework global locks for interface list and index management, correcting
several critical bugs, including race conditions and lock order issues:

Replace the single rwlock, ifnet_lock, with two locks, an rwlock and an
sxlock. Either can be held to stablize the lists and indexes, but both
are required to write. This allows the list to be held stable in both
network interrupt contexts and sleepable user threads across sleeping
memory allocations or device driver interactions. As before, writes to
the interface list must occur from sleepable contexts.

Reviewed by: bz, julian
MFC after: 3 days


196372 19-Aug-2009 mlaier

If we cannot immediately get the pf_consistency_lock in the purge thread,
restart the scan after acquiring the lock the hard way. Otherwise we might
end up with a dead reference.

Reported by: pfsense
Reviewed by: eri
Initial patch by: eri
Tested by: pfsense
Approved by: re (kib)


196039 02-Aug-2009 rwatson

Many network stack subsystems use a single global data structure to hold
all pertinent statatistics for the subsystem. These structures are
sometimes "borrowed" by kernel modules that require a place to store
statistics for similar events.

Add KPI accessor functions for statistics structures referenced by kernel
modules so that they no longer encode certain specifics of how the data
structures are named and stored. This change is intended to make it
easier to move to per-CPU network stats following 8.0-RELEASE.

The following modules are affected by this change:

if_bridge
if_cxgb
if_gif
ip_mroute
ipdivert
pf

In practice, most of these statistics consumers should, in fact, maintain
their own statistics data structures rather than borrowing structures
from the base network stack. However, that change is too agressive for
this point in the release cycle.

Reviewed by: bz
Approved by: re (kib)


196019 01-Aug-2009 rwatson

Merge the remainder of kern_vimage.c and vimage.h into vnet.c and
vnet.h, we now use jails (rather than vimages) as the abstraction
for virtualization management, and what remained was specific to
virtual network stacks. Minor cleanups are done in the process,
and comments updated to reflect these changes.

Reviewed by: bz
Approved by: re (vimage blanket)


195699 14-Jul-2009 rwatson

Build on Jeff Roberson's linker-set based dynamic per-CPU allocator
(DPCPU), as suggested by Peter Wemm, and implement a new per-virtual
network stack memory allocator. Modify vnet to use the allocator
instead of monolithic global container structures (vinet, ...). This
change solves many binary compatibility problems associated with
VIMAGE, and restores ELF symbols for virtualized global variables.

Each virtualized global variable exists as a "reference copy", and also
once per virtual network stack. Virtualized global variables are
tagged at compile-time, placing the in a special linker set, which is
loaded into a contiguous region of kernel memory. Virtualized global
variables in the base kernel are linked as normal, but those in modules
are copied and relocated to a reserved portion of the kernel's vnet
region with the help of a the kernel linker.

Virtualized global variables exist in per-vnet memory set up when the
network stack instance is created, and are initialized statically from
the reference copy. Run-time access occurs via an accessor macro, which
converts from the current vnet and requested symbol to a per-vnet
address. When "options VIMAGE" is not compiled into the kernel, normal
global ELF symbols will be used instead and indirection is avoided.

This change restores static initialization for network stack global
variables, restores support for non-global symbols and types, eliminates
the need for many subsystem constructors, eliminates large per-subsystem
structures that caused many binary compatibility issues both for
monitoring applications (netstat) and kernel modules, removes the
per-function INIT_VNET_*() macros throughout the stack, eliminates the
need for vnet_symmap ksym(2) munging, and eliminates duplicate
definitions of virtualized globals under VIMAGE_GLOBALS.

Bump __FreeBSD_version and update UPDATING.

Portions submitted by: bz
Reviewed by: bz, zec
Discussed with: gnn, jamie, jeff, jhb, julian, sam
Suggested by: peter
Approved by: re (kensmith)


195626 11-Jul-2009 cperciva

Remove build timestamps from the following files:
/boot/kernel/hptrr.ko
/etc/mail/*.cf
/lib/libcrypto.so.5
/usr/bin/ntpq
/usr/sbin/amd
/usr/sbin/iasl
/usr/sbin/ntpd
/usr/sbin/ntpdate
/usr/sbin/ntpdc

There does not appear to be any purpose to having these timestamps, and
they have the irritating consequence that the aforementioned files will
be different every time they are rebuilt.

After this commit, the only remaining build timestamps are in the kernel,
the boot loaders, /usr/include/osreldate.h (the year in the copyright
notice), and lib*.a (the timestamps on all of the included .o files).

Reviewed by: scottl (hptrr), gshapiro (sendmail), simon (openssl),
roberto (ntp), jkim (acpica)
Approved by: re (kib)


195171 29-Jun-2009 sam

Update to 3.6.2.2 firmware (latest w/o host-based power save support):
o new tx ack queue (not used right now)
o proxy-sta related changes (no proxy sta in driver)
o explicit dwds ena/dis (needed only with proxy sta)
o cleanup BA policy handling
o new ampdu aggressive mode support
o CFEnd use now controllable

Approved by: re (kensmith)


194825 24-Jun-2009 rdivacky

Use proper form of gnu designated initalizers. This lets
clang compile this files.

Approved by: ed (mentor)
Silence from: harti (maintainer?)


194760 23-Jun-2009 rwatson

Modify most routines returning 'struct ifaddr *' to return references
rather than pointers, requiring callers to properly dispose of those
references. The following routines now return references:

ifaddr_byindex
ifa_ifwithaddr
ifa_ifwithbroadaddr
ifa_ifwithdstaddr
ifa_ifwithnet
ifaof_ifpforaddr
ifa_ifwithroute
ifa_ifwithroute_fib
rt_getifa
rt_getifa_fib
IFP_TO_IA
ip_rtaddr
in6_ifawithifp
in6ifa_ifpforlinklocal
in6ifa_ifpwithaddr
in6_ifadd
carp_iamatch6
ip6_getdstifaddr

Remove unused macro which didn't have required referencing:

IFP_TO_IA6

This closes many small races in which changes to interface
or address lists while an ifaddr was in use could lead to use of freed
memory (etc). In a few cases, add missing if_addr_list locking
required to safely acquire references.

Because of a lack of deep copying support, we accept a race in which
an in6_ifaddr pointed to by mbuf tags and extracted with
ip6_getdstifaddr() doesn't hold a reference while in transmit. Once
we have mbuf tag deep copy support, this can be fixed.

Reviewed by: bz
Obtained from: Apple, Inc. (portions)
MFC after: 6 weeks (portions)


194739 23-Jun-2009 bz

After cleaning up rt_tables from vnet.h and cleaning up opt_route.h
a lot of files no longer need route.h either. Garbage collect them.
While here remove now unneeded vnet.h #includes as well.


193900 10-Jun-2009 bz

All consumers of in_cksum.h have been properly #ifdefed already,
so do not include the file either as it would give as an extra
dependency on INET.


193750 08-Jun-2009 jkim

Rewrite OsdSynch.c to reflect the latest ACPICA more closely:

- Implement ACPI semaphore (ACPI_SEMAPHORE) with condvar(9) and mutex(9).
- Implement ACPI mutex (ACPI_MUTEX) with mutex(9).
- Implement ACPI lock (ACPI_SPINLOCK) with spin mutex(9).


193744 08-Jun-2009 bz

After r193232 rt_tables in vnet.h are no longer indirectly dependent on
the ROUTETABLES kernel option thus there is no need to include opt_route.h
anymore in all consumers of vnet.h and no longer depend on it for module
builds.

Remove the hidden include in flowtable.h as well and leave the two
explicit #includes in ip_input.c and ip_output.c.


193730 08-Jun-2009 jkim

Clean up FreeBSD-specific header file:

- Define ACPI_USE_DO_WHILE_0 to add do while(0) around return_*() macros.
- Define __cdecl only for user land. It will never be used in kernel.
- Remove __cli() and __sti(). They were deprecated long ago.


193529 05-Jun-2009 jkim

Import ACPICA 20090521.


193511 05-Jun-2009 rwatson

Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC
and used in a large number of files, but also because an increasing number
of incorrect uses of MAC calls were sneaking in due to copy-and-paste of
MAC-aware code without the associated opt_mac.h include.

Discussed with: pjd


193274 01-Jun-2009 zec

V_loif is not an array but a pure pointer, so treat it as such.

Reviewed by: bz
Approved by: julian (mentor)


193240 01-Jun-2009 sam

driver for Marvell 88W8363 Wireless LAN controller


192895 27-May-2009 jamie

Add hierarchical jails. A jail may further virtualize its environment
by creating a child jail, which is visible to that jail and to any
parent jails. Child jails may be restricted more than their parents,
but never less. Jail names reflect this hierarchy, being MIB-style
dot-separated strings.

Every thread now points to a jail, the default being prison0, which
contains information about the physical system. Prison0's root
directory is the same as rootvnode; its hostname is the same as the
global hostname, and its securelevel replaces the global securelevel.
Note that the variable "securelevel" has actually gone away, which
should not cause any problems for code that properly uses
securelevel_gt() and securelevel_ge().

Some jail-related permissions that were kept in global variables and
set via sysctls are now per-jail settings. The sysctls still exist for
backward compatibility, used only by the now-deprecated jail(2) system
call.

Approved by: bz (mentor)


192388 19-May-2009 avg

bootstrap merge history for acpica contrib code

Approved by: rpaulo (mentor)


192278 18-May-2009 bz

tbr_timeout() is a timer driven function[1]. While the previous commit
made LINT happy this does the proper looping over all vnets as we are
only called `globally' and not once per vnet instance.

Reported by: zec [1]
Missed by: bz [1] in r192264
Reviewed by: zec


192264 17-May-2009 bz

Add a missing INIT_VNET_NET() to get VIMAGE closer to full LINT again.


191945 09-May-2009 sam

Makefile to record the technique by which the .uu files are generated
from the Intel-distributed .fw files


191944 09-May-2009 sam

update to v3.1


191548 26-Apr-2009 zec

In preparation for turning on options VIMAGE in next commits,
rearrange / replace / adjust several INIT_VNET_* initializer
macros, all of which currently resolve to whitespace.

Reviewed by: bz (an older version of the patch)
Approved by: julian (mentor)


191148 16-Apr-2009 kmacy

Change if_output to take a struct route as its fourth argument in order
to allow passing a cached struct llentry * down to L2

Reviewed by: rwatson


190964 12-Apr-2009 rwatson

Update stats in struct icmpstat and icmp6stat using four new
macros: ICMPSTAT_ADD(), ICMPSTAT_INC(), ICMP6STAT_ADD(), and
ICMP6STAT_INC(), rather than directly manipulating the fields
of these structures across the kernel. This will make it
easier to change the implementation of these statistics,
such as using per-CPU versions of the data structures.

In on case, icmp6stat members are manipulated indirectly, by
icmp6_errcount(), and this will require further work to fix
for per-CPU stats.

MFC after: 3 days


190962 12-Apr-2009 rwatson

Update stats in struct udpstat using two new macros, UDPSTAT_ADD()
and UDPSTAT_INC(), rather than directly manipulating the fields
across the kernel. This will make it easier to change the
implementation of these statistics, such as using per-CPU versions
of the data structures.

MFC after: 3 days


190951 11-Apr-2009 rwatson

Update stats in struct ipstat using four new macros, IPSTAT_ADD(),
IPSTAT_INC(), IPSTAT_SUB(), and IPSTAT_DEC(), rather than directly
manipulating the fields across the kernel. This will make it easier
to change the implementation of these statistics, such as using
per-CPU versions of the data structures.

MFC after: 3 days


190948 11-Apr-2009 rwatson

Update stats in struct tcpstat using two new macros, TCPSTAT_ADD() and
TCPSTAT_INC(), rather than directly manipulating the fields across the
kernel. This will make it easier to change the implementation of
these statistics, such as using per-CPU versions of the data structures.

MFC after: 3 days


190688 04-Apr-2009 weongyo

Add uath(4) wireless USB driver for Atheros AR5005UG and AR5005UX
chipsets.

Reviewed by: sam


190633 01-Apr-2009 piso

Implement an ipfw action to reassemble ip packets: reass.


190581 30-Mar-2009 mav

Integrate user/mav/ata branch:

Add ch_suspend/ch_resume methods for PCI controllers and implement them
for AHCI. Refactor AHCI channel initialization according to it.

Fix Port Multipliers operation. It is far from perfect yet, but works now.
Tested with JMicron JMB363 AHCI + SiI 3726 PMP pair.
Previous version was also tested with SiI 4726 PMP.

Hardware sponsored by: Vitsch Electronics / VEHosting.nl


189699 11-Mar-2009 dfr

Merge in support for Xen HVM on amd64 architecture.


189106 27-Feb-2009 bz

For all files including net/vnet.h directly include opt_route.h and
net/route.h.

Remove the hidden include of opt_route.h and net/route.h from net/vnet.h.

We need to make sure that both opt_route.h and net/route.h are included
before net/vnet.h because of the way MRT figures out the number of FIBs
from the kernel option. If we do not, we end up with the default number
of 1 when including net/vnet.h and array sizes are wrong.

This does not change the list of files which depend on opt_route.h
but we can identify them now more easily.


189105 27-Feb-2009 bz

Move the include of vinet.h further up before the ipfilter includes.


189103 27-Feb-2009 bz

Shuffle the vimage.h includes or add where missing.


189004 24-Feb-2009 rdivacky

Change the functions to ANSI in those cases where it breaks promotion
to int rule. See ISO C Standard: SS6.7.5.3:15.

Approved by: kib (mentor)
Reviewed by: warner
Tested by: silence on -current


187689 25-Jan-2009 ed

Revert my previous two changes.

Even though the code seems to be FreeBSD kernel code, it isn't compiled
on FreeBSD. I could have known this, because I was a little amazed that
I couldn't find a prototype of pfopen()/pfclose() somewhere else,
because it isn't marked as static.

Apart from that, removing these functions wouldn't have been harmful
anyway, because there are some other strange things about them (the
implementation isn't consistent with the prototype at the top). Still,
it's better to leave it, because it makes merging code back to older
branches a little harder.

Requested by: mlaier


187688 25-Jan-2009 ed

Remove pfopen() and pfclose() entirely.

It turns out I was patching functions that weren't used by pf(4) anyway.
They still seem to use `struct proc *' instead of `struct thread *'.
They weren't listed in pf_cdevsw.


187687 25-Jan-2009 ed

Remove unneeded checking for invalid minor numbers from pf(4).

Because it is not possible to access the pf(4) character device through
any other device node as the one in devfs, there is no need to check for
unknown device minor numbers.

Approved by: mlaier


187566 21-Jan-2009 jkim

Change __FreeBSD_version to prepare for merging r184102.


187192 13-Jan-2009 thompsa

Restore the if_*var.h and if_*reg.h to their original names, they dont need to
be different.


186436 23-Dec-2008 bz

Check for ipprotosw.h more precisely.
It hasn't been needed for more than 5 years, since r120386.

MFC after: 4 weeks


186352 20-Dec-2008 sam

Merge support for Gateworks Cambria boards:
o add support for IXP435 cpu's (e.g. 64 irq's)
o add support for Cambria-specific devices: npe, led's (front panel and
octal latch), ehci, mcu, ide cf
o redo memory mapping for xscale/ixp4xx boards: previously memory
was assumed aliased to 0x10000000 but this appears to be true only
for ixp425 systems and breaks operation on others; rework so memory
is assumed to start at 0
o rework NPE configuration support to use NPE id's instead of port #'s;
these changes also rename the associated MAC's to follow the NPE's
they are attached to
o update npe firmware to latest rev (same license) and update default fw
imageid's to match; in particular this adds NPE-A and crypto support
o re-style NPE fw handling code and add a console msg identifying the
attributes of the loaded fw
o fix numerous problems with handling failures during npe setup
o fix npe rx q setup; need to spin waiting for mailbox responses during
early boot stages as qmgr interrupts are not delivered; this fixes
the problem where all 8 traffic classifications were not tied to the
rx q (and eliminates the console msg "remember to fix rx q setup")
o add DELAY to npe MII wait logic for IXP435
o strip down builtin phys->virt address translation table in resource
handling to just those resources that require it and add a console msg
to alert people when this (kludge) table needs to be extended
o purge a bunch of dead netbsd-ism's
o cleanup avila led driver
o add Cambria support to boot2 and rework code for better multi-board support

Notes:
1. NPE-A doesn't work and causes NPE-C to stop working; it is disabled
in the hints
2. USB isn't working yet; controller communicates ok but device
discovery fails
3. Cambria support must be configured separately from IXP425 boards;
multi-board support is TBD

Sponsored by: Hobnob, Gateworks (board donation)
Reviewed by: imp


186119 15-Dec-2008 qingli

This main goals of this project are:
1. separating L2 tables (ARP, NDP) from the L3 routing tables
2. removing as much locking dependencies among these layers as
possible to allow for some parallelism in the search operations
3. simplify the logic in the routing code,

The most notable end result is the obsolescent of the route
cloning (RTF_CLONING) concept, which translated into code reduction
in both IPv4 ARP and IPv6 NDP related modules, and size reduction in
struct rtentry{}. The change in design obsoletes the semantics of
RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland
applications such as "arp" and "ndp" have been modified to reflect
those changes. The output from "netstat -r" shows only the routing
entries.

Quite a few developers have contributed to this project in the
past: Glebius Smirnoff, Luigi Rizzo, Alessandro Cerri, and
Andre Oppermann. And most recently:

- Kip Macy revised the locking code completely, thus completing
the last piece of the puzzle, Kip has also been conducting
active functional testing
- Sam Leffler has helped me improving/refactoring the code, and
provided valuable reviews
- Julian Elischer setup the perforce tree for me and has helped
me maintaining that branch before the svn conversion


186058 13-Dec-2008 bz

Like for tcp_subr.c in r186057 make the MD5 context a function local
variable in this copy of the code[1].

While here prefix the variables with 'pf_' to avoid file static global
variables with colliding names that are or will be virtualized.

Discussed with: rwatson, silby [1]


186048 13-Dec-2008 bz

Second round of putting global variables, which were virtualized
but formerly missed under VIMAGE_GLOBAL.

Put the extern declarations of the virtualized globals
under VIMAGE_GLOBAL as the globals themsevles are already.
This will help by the time when we are going to remove the globals
entirely.

Sponsored by: The FreeBSD Foundation


185895 10-Dec-2008 zec

Conditionally compile out V_ globals while instantiating the appropriate
container structures, depending on VIMAGE_GLOBALS compile time option.

Make VIMAGE_GLOBALS a new compile-time option, which by default will not
be defined, resulting in instatiations of global variables selected for
V_irtualization (enclosed in #ifdef VIMAGE_GLOBALS blocks) to be
effectively compiled out. Instantiate new global container structures
to hold V_irtualized variables: vnet_net_0, vnet_inet_0, vnet_inet6_0,
vnet_ipsec_0, vnet_netgraph_0, and vnet_gif_0.

Update the VSYM() macro so that depending on VIMAGE_GLOBALS the V_
macros resolve either to the original globals, or to fields inside
container structures, i.e. effectively

#ifdef VIMAGE_GLOBALS
#define V_rt_tables rt_tables
#else
#define V_rt_tables vnet_net_0._rt_tables
#endif

Update SYSCTL_V_*() macros to operate either on globals or on fields
inside container structs.

Extend the internal kldsym() lookups with the ability to resolve
selected fields inside the virtualization container structs. This
applies only to the fields which are explicitly registered for kldsym()
visibility via VNET_MOD_DECLARE() and vnet_mod_register(), currently
this is done only in sys/net/if.c.

Fix a few broken instances of MODULE_GLOBAL() macro use in SCTP code,
and modify the MODULE_GLOBAL() macro to resolve to V_ macros, which in
turn result in proper code being generated depending on VIMAGE_GLOBALS.

De-virtualize local static variables in sys/contrib/pf/net/pf_subr.c
which were prematurely V_irtualized by automated V_ prepending scripts
during earlier merging steps. PF virtualization will be done
separately, most probably after next PF import.

Convert a few variable initializations at instantiation to
initialization in init functions, most notably in ipfw. Also convert
TUNABLE_INT() initializers for V_ variables to TUNABLE_FETCH_INT() in
initializer functions.

Discussed at: devsummit Strassburg
Reviewed by: bz, julian
Approved by: julian (mentor)
Obtained from: //depot/projects/vimage-commit2/...
X-MFC after: never
Sponsored by: NLnet Foundation, The FreeBSD Foundation


185747 07-Dec-2008 kmacy

- convert radix node head lock from mutex to rwlock
- make radix node head lock not recursive
- fix LOR in rtexpunge
- fix LOR in rtredirect

Reviewed by: sam


185571 02-Dec-2008 bz

Rather than using hidden includes (with cicular dependencies),
directly include only the header files needed. This reduces the
unneeded spamming of various headers into lots of files.

For now, this leaves us with very few modules including vnet.h
and thus needing to depend on opt_route.h.

Reviewed by: brooks, gnn, des, zec, imp
Sponsored by: The FreeBSD Foundation


185548 02-Dec-2008 peter

Merge user/peter/kinfo branch as of r185547 into head.

This changes struct kinfo_filedesc and kinfo_vmentry such that they are
same on both 32 and 64 bit platforms like i386/amd64 and won't require
sysctl wrapping.

Two new OIDs are assigned. The old ones are available under
COMPAT_FREEBSD7 - but it isn't that simple. The superceded interface
was never actually released on 7.x.

The other main change is to pack the data passed to userland via the
sysctl. kf_structsize and kve_structsize are reduced for the copyout.
If you have a process with 100,000+ sockets open, the unpacked records
require a 132MB+ copyout. With packing, it is "only" ~35MB. (Still
seriously unpleasant, but not quite as devastating). A similar problem
exists for the vmentry structure - have lots and lots of shared libraries
and small mmaps and its copyout gets expensive too.

My immediate problem is valgrind. It traditionally achieves this
functionality by parsing procfs output, in a packed format. Secondly, when
tracing 32 bit binaries on amd64 under valgrind, it uses a cross compiled
32 bit binary which ran directly into the differing data structures in 32
vs 64 bit mode. (valgrind uses this to track file descriptor operations
and this therefore affected every single 32 bit binary)

I've added two utility functions to libutil to unpack the structures into
a fixed record length and to make it a little more convenient to use.


185522 01-Dec-2008 sam

Switch to ath hal source code. Note this removes the ath_hal
module; the ath module now brings in the hal support. Kernel
config files are almost backwards compatible; supplying

device ath_hal

gives you the same chip support that the binary hal did but you
must also include

options AH_SUPPORT_AR5416

to enable the extended format descriptors used by 11n parts.
It is now possible to control the chip support included in a
build by specifying exactly which chips are to be supported
in the config file; consult ath_hal(4) for information.


185419 28-Nov-2008 zec

Unhide declarations of network stack virtualization structs from
underneath #ifdef VIMAGE blocks.

This change introduces some churn in #include ordering and nesting
throughout the network stack and drivers but is not expected to cause
any additional issues.

In the next step this will allow us to instantiate the virtualization
container structures and switch from using global variables to their
"containerized" counterparts.

Reviewed by: bz, julian
Approved by: julian (mentor)
Obtained from: //depot/projects/vimage-commit2/...
X-MFC after: never
Sponsored by: NLnet Foundation, The FreeBSD Foundation


184214 23-Oct-2008 des

Fix a number of style issues in the MALLOC / FREE commit. I've tried to
be careful not to fix anything that was already broken; the NFSv4 code is
particularly bad in this respect.


184205 23-Oct-2008 des

Retire the MALLOC and FREE macros. They are an abomination unto style(9).

MFC after: 3 months


184102 21-Oct-2008 jkim

Turn off CPU frequency change notifiers when the TSC is P-state invariant
or it is forced by setting 'kern.timecounter.invariant_tsc' tunable
to non-zero.


183606 04-Oct-2008 bz

Cache so_cred as inp_cred in the inpcb.
This means that inp_cred is always there, even after the socket
has gone away. It also means that it is constant for the lifetime
of the inp.
Both facts lead to simpler code and possibly less locking.

Suggested by: rwatson
Reviewed by: rwatson
MFC after: 6 weeks
X-MFC Note: use a inp_pspare for inp_cred


183550 02-Oct-2008 zec

Step 1.5 of importing the network stack virtualization infrastructure
from the vimage project, as per plan established at devsummit 08/08:
http://wiki.freebsd.org/Image/Notes200808DevSummit

Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator
macros, and CURVNET_SET() context setting macros, all currently
resolving to NOPs.

Prepare for virtualization of selected SYSCTL objects by introducing a
family of SYSCTL_V_*() macros, currently resolving to their global
counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT().

Move selected #defines from sys/sys/vimage.h to newly introduced header
files specific to virtualized subsystems (sys/net/vnet.h,
sys/netinet/vinet.h etc.).

All the changes are verified to have zero functional impact at this
point in time by doing MD5 comparision between pre- and post-change
object files(*).

(*) netipsec/keysock.c did not validate depending on compile time options.

Implemented by: julian, bz, brooks, zec
Reviewed by: julian, bz, brooks, kris, rwatson, ...
Approved by: julian (mentor)
Obtained from: //depot/projects/vimage-commit2/...
X-MFC after: never
Sponsored by: NLnet Foundation, The FreeBSD Foundation


183397 27-Sep-2008 ed

Replace all calls to minor() with dev2unit().

After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by: kib


182804 05-Sep-2008 rpaulo

Merge ath again (addition of wisoc files).


182787 05-Sep-2008 rpaulo

Merge fix for P4 expansion from vendor branch.


182312 28-Aug-2008 rpaulo

Merge ath_hal 0.10.5.10 to head.

Approved by: sam


182306 27-Aug-2008 rpaulo

Bootstrap svn:mergeinfo.


182152 25-Aug-2008 julian

I think we can remove the conditionals for freebsd 2.0 now


181803 17-Aug-2008 bz

Commit step 1 of the vimage project, (network stack)
virtualization work done by Marko Zec (zec@).

This is the first in a series of commits over the course
of the next few weeks.

Mark all uses of global variables to be virtualized
with a V_ prefix.
Use macros to map them back to their global names for
now, so this is a NOP change only.

We hope to have caught at least 85-90% of what is needed
so we do not invalidate a lot of outstanding patches again.

Obtained from: //depot/projects/vimage-commit2/...
Reviewed by: brooks, des, ed, mav, julian,
jamie, kris, rwatson, zec, ...
(various people I forgot, different versions)
md5 (with a bit of help)
Sponsored by: NLnet Foundation, The FreeBSD Foundation
X-MFC after: never
V_Commit_Message_Reviewed_By: more people than the patch


181295 04-Aug-2008 mlaier

Merge state reuse for tcp.

PR: kern/125261
Obtained from: OpenBSD
MFC after: 1 week


181290 04-Aug-2008 mlaier

Record initial merge histroy.


180832 26-Jul-2008 darrenr

2020447 IPFilter's NAT can undo name server random port selection
(fix output port range, was a random number in [0,max-min]
(byteswapped on litle endian), instead of [min,max])

Submitted by: darrenr


180788 24-Jul-2008 julian

Fix spelling error in comment


180778 24-Jul-2008 darrenr

2020447 IPFilter's NAT can undo name server random port selection

Approved by: darrenr
MFC after: 1 week
Security: CERT VU#521769


180259 04-Jul-2008 jhb

Remove the oltr(4) driver. No one responded to calls for testing on
current@ and stable@ for the locking patches. The driver can always be
revived if someone tests it.

This driver also sleeps in its if_init routine, so it likely doesn't really
work at all anyway in modern releases.


180258 04-Jul-2008 jhb

Make oltr(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device
hardware.
- Setup interrupt handler after interface attach.
- Retire 'unit' from softc and use if_printf() instead.
- Don't frob IFF_UP in the driver.
- Use callout_() rather than timeout() and untimeout().


179570 05-Jun-2008 mlaier

Fix range check for rtable id.


178888 09-May-2008 julian

Add code to allow the system to handle multiple routing tables.
This particular implementation is designed to be fully backwards compatible
and to be MFC-able to 7.x (and 6.x)

Currently the only protocol that can make use of the multiple tables is IPv4
Similar functionality exists in OpenBSD and Linux.

From my notes:

-----

One thing where FreeBSD has been falling behind, and which by chance I
have some time to work on is "policy based routing", which allows
different
packet streams to be routed by more than just the destination address.

Constraints:
------------

I want to make some form of this available in the 6.x tree
(and by extension 7.x) , but FreeBSD in general needs it so I might as
well do it in -current and back port the portions I need.

One of the ways that this can be done is to have the ability to
instantiate multiple kernel routing tables (which I will now
refer to as "Forwarding Information Bases" or "FIBs" for political
correctness reasons). Which FIB a particular packet uses to make
the next hop decision can be decided by a number of mechanisms.
The policies these mechanisms implement are the "Policies" referred
to in "Policy based routing".

One of the constraints I have if I try to back port this work to
6.x is that it must be implemented as a EXTENSION to the existing
ABIs in 6.x so that third party applications do not need to be
recompiled in timespan of the branch.

This first version will not have some of the bells and whistles that
will come with later versions. It will, for example, be limited to 16
tables in the first commit.
Implementation method, Compatible version. (part 1)
-------------------------------
For this reason I have implemented a "sufficient subset" of a
multiple routing table solution in Perforce, and back-ported it
to 6.x. (also in Perforce though not always caught up with what I
have done in -current/P4). The subset allows a number of FIBs
to be defined at compile time (8 is sufficient for my purposes in 6.x)
and implements the changes needed to allow IPV4 to use them. I have not
done the changes for ipv6 simply because I do not need it, and I do not
have enough knowledge of ipv6 (e.g. neighbor discovery) needed to do it.

Other protocol families are left untouched and should there be
users with proprietary protocol families, they should continue to work
and be oblivious to the existence of the extra FIBs.

To understand how this is done, one must know that the current FIB
code starts everything off with a single dimensional array of
pointers to FIB head structures (One per protocol family), each of
which in turn points to the trie of routes available to that family.

The basic change in the ABI compatible version of the change is to
extent that array to be a 2 dimensional array, so that
instead of protocol family X looking at rt_tables[X] for the
table it needs, it looks at rt_tables[Y][X] when for all
protocol families except ipv4 Y is always 0.
Code that is unaware of the change always just sees the first row
of the table, which of course looks just like the one dimensional
array that existed before.

The entry points rtrequest(), rtalloc(), rtalloc1(), rtalloc_ign()
are all maintained, but refer only to the first row of the array,
so that existing callers in proprietary protocols can continue to
do the "right thing".
Some new entry points are added, for the exclusive use of ipv4 code
called in_rtrequest(), in_rtalloc(), in_rtalloc1() and in_rtalloc_ign(),
which have an extra argument which refers the code to the correct row.

In addition, there are some new entry points (currently called
rtalloc_fib() and friends) that check the Address family being
looked up and call either rtalloc() (and friends) if the protocol
is not IPv4 forcing the action to row 0 or to the appropriate row
if it IS IPv4 (and that info is available). These are for calling
from code that is not specific to any particular protocol. The way
these are implemented would change in the non ABI preserving code
to be added later.

One feature of the first version of the code is that for ipv4,
the interface routes show up automatically on all the FIBs, so
that no matter what FIB you select you always have the basic
direct attached hosts available to you. (rtinit() does this
automatically).

You CAN delete an interface route from one FIB should you want
to but by default it's there. ARP information is also available
in each FIB. It's assumed that the same machine would have the
same MAC address, regardless of which FIB you are using to get
to it.

This brings us as to how the correct FIB is selected for an outgoing
IPV4 packet.

Firstly, all packets have a FIB associated with them. if nothing
has been done to change it, it will be FIB 0. The FIB is changed
in the following ways.

Packets fall into one of a number of classes.

1/ locally generated packets, coming from a socket/PCB.
Such packets select a FIB from a number associated with the
socket/PCB. This in turn is inherited from the process,
but can be changed by a socket option. The process in turn
inherits it on fork. I have written a utility call setfib
that acts a bit like nice..

setfib -3 ping target.example.com # will use fib 3 for ping.

It is an obvious extension to make it a property of a jail
but I have not done so. It can be achieved by combining the setfib and
jail commands.

2/ packets received on an interface for forwarding.
By default these packets would use table 0,
(or possibly a number settable in a sysctl(not yet)).
but prior to routing the firewall can inspect them (see below).
(possibly in the future you may be able to associate a FIB
with packets received on an interface.. An ifconfig arg, but not yet.)

3/ packets inspected by a packet classifier, which can arbitrarily
associate a fib with it on a packet by packet basis.
A fib assigned to a packet by a packet classifier
(such as ipfw) would over-ride a fib associated by
a more default source. (such as cases 1 or 2).

4/ a tcp listen socket associated with a fib will generate
accept sockets that are associated with that same fib.

5/ Packets generated in response to some other packet (e.g. reset
or icmp packets). These should use the FIB associated with the
packet being reponded to.

6/ Packets generated during encapsulation.
gif, tun and other tunnel interfaces will encapsulate using the FIB
that was in effect withthe proces that set up the tunnel.
thus setfib 1 ifconfig gif0 [tunnel instructions]
will set the fib for the tunnel to use to be fib 1.

Routing messages would be associated with their
process, and thus select one FIB or another.
messages from the kernel would be associated with the fib they
refer to and would only be received by a routing socket associated
with that fib. (not yet implemented)

In addition Netstat has been edited to be able to cope with the
fact that the array is now 2 dimensional. (It looks in system
memory using libkvm (!)). Old versions of netstat see only the first FIB.

In addition two sysctls are added to give:
a) the number of FIBs compiled in (active)
b) the default FIB of the calling process.

Early testing experience:
-------------------------

Basically our (IronPort's) appliance does this functionality already
using ipfw fwd but that method has some drawbacks.

For example,
It can't fully simulate a routing table because it can't influence the
socket's choice of local address when a connect() is done.

Testing during the generating of these changes has been
remarkably smooth so far. Multiple tables have co-existed
with no notable side effects, and packets have been routes
accordingly.

ipfw has grown 2 new keywords:

setfib N ip from anay to any
count ip from any to any fib N

In pf there seems to be a requirement to be able to give symbolic names to the
fibs but I do not have that capacity. I am not sure if it is required.

SCTP has interestingly enough built in support for this, called VRFs
in Cisco parlance. it will be interesting to see how that handles it
when it suddenly actually does something.

Where to next:
--------------------

After committing the ABI compatible version and MFCing it, I'd
like to proceed in a forward direction in -current. this will
result in some roto-tilling in the routing code.

Firstly: the current code's idea of having a separate tree per
protocol family, all of the same format, and pointed to by the
1 dimensional array is a bit silly. Especially when one considers that
there is code that makes assumptions about every protocol having the
same internal structures there. Some protocols don't WANT that
sort of structure. (for example the whole idea of a netmask is foreign
to appletalk). This needs to be made opaque to the external code.

My suggested first change is to add routing method pointers to the
'domain' structure, along with information pointing the data.
instead of having an array of pointers to uniform structures,
there would be an array pointing to the 'domain' structures
for each protocol address domain (protocol family),
and the methods this reached would be called. The methods would have
an argument that gives FIB number, but the protocol would be free
to ignore it.

When the ABI can be changed it raises the possibilty of the
addition of a fib entry into the "struct route". Currently,
the structure contains the sockaddr of the desination, and the resulting
fib entry. To make this work fully, one could add a fib number
so that given an address and a fib, one can find the third element, the
fib entry.

Interaction with the ARP layer/ LL layer would need to be
revisited as well. Qing Li has been working on this already.

This work was sponsored by Ironport Systems/Cisco

Reviewed by: several including rwatson, bz and mlair (parts each)
Obtained from: Ironport systems/Cisco


178812 06-May-2008 kmacy

fix build


178791 05-May-2008 kmacy

conditionally define PANIC_IF


178784 05-May-2008 kmacy

Import basic common and iwarp kernel RDMA infrastructure.

Supported by: Chelsio Inc.


178676 29-Apr-2008 sam

Intel 4965 wireless driver (derived from openbsd driver of the same name)


178354 20-Apr-2008 sam

Multi-bss (aka vap) support for 802.11 devices.

Note this includes changes to all drivers and moves some device firmware
loading to use firmware(9) and a separate module (e.g. ral). Also there
no longer are separate wlan_scan* modules; this functionality is now
bundled into the wlan module.

Supported by: Hobnob and Marvell
Reviewed by: many
Obtained from: Atheros (some bits)


178325 20-Apr-2008 rwatson

Teach pf and ipfw to use read locks in inpcbs write than write locks
when reading credential data from sockets.

Teach pf to unlock the pcbinfo more quickly once it has acquired an
inpcb lock, as the inpcb lock is sufficient to protect the reference.

Assert locks, rather than read locks or write locks, on inpcbs in
subroutines--this is necessary as the inpcb may be passed down with a
write lock from the protocol, or may be passed down with a read lock
from the firewall lookup routine, and either is sufficient.

MFC after: 3 months


178285 17-Apr-2008 rwatson

Convert pcbinfo and inpcb mutexes to rwlocks, and modify macros to
explicitly select write locking for all use of the inpcb mutex.
Update some pcbinfo lock assertions to assert locked rather than
write-locked, although in practice almost all uses of the pcbinfo
rwlock main exclusive, and all instances of inpcb lock acquisition
are exclusive.

This change should introduce (ideally) little functional change.
However, it lays the groundwork for significantly increased
parallelism in the TCP/IP code.

MFC after: 3 months
Tested by: kris (superset of committered patch)


177700 29-Mar-2008 mlaier

Make ALTQ cope with disappearing interfaces (particularly common with mpd
and netgraph in gernal). This also allows to add queues for an interface
that is not yet existing (you have to provide the bandwidth for the
interface, however).

PR: kern/106400, kern/117827
MFC after: 2 weeks


177677 28-Mar-2008 jb

Remove the last 3 files I missed. These have been repo copied to the new
location under a cddl part of the tree following the core@ license review.


177675 28-Mar-2008 jb

Remove files that have been repo copied to their new location
in cddl-specific parts of the source tree.


177633 26-Mar-2008 dfr

Add the new kernel-mode NFS Lock Manager. To use it instead of the
user-mode lock manager, build a kernel with the NFSLOCKD option and
add '-k' to 'rpc_lockd_flags' in rc.conf.

Highlights include:

* Thread-safe kernel RPC client - many threads can use the same RPC
client handle safely with replies being de-multiplexed at the socket
upcall (typically driven directly by the NIC interrupt) and handed
off to whichever thread matches the reply. For UDP sockets, many RPC
clients can share the same socket. This allows the use of a single
privileged UDP port number to talk to an arbitrary number of remote
hosts.

* Single-threaded kernel RPC server. Adding support for multi-threaded
server would be relatively straightforward and would follow
approximately the Solaris KPI. A single thread should be sufficient
for the NLM since it should rarely block in normal operation.

* Kernel mode NLM server supporting cancel requests and granted
callbacks. I've tested the NLM server reasonably extensively - it
passes both my own tests and the NFS Connectathon locking tests
running on Solaris, Mac OS X and Ubuntu Linux.

* Userland NLM client supported. While the NLM server doesn't have
support for the local NFS client's locking needs, it does have to
field async replies and granted callbacks from remote NLMs that the
local client has contacted. We relay these replies to the userland
rpc.lockd over a local domain RPC socket.

* Robust deadlock detection for the local lock manager. In particular
it will detect deadlocks caused by a lock request that covers more
than one blocking request. As required by the NLM protocol, all
deadlock detection happens synchronously - a user is guaranteed that
if a lock request isn't rejected immediately, the lock will
eventually be granted. The old system allowed for a 'deferred
deadlock' condition where a blocked lock request could wake up and
find that some other deadlock-causing lock owner had beaten them to
the lock.

* Since both local and remote locks are managed by the same kernel
locking code, local and remote processes can safely use file locks
for mutual exclusion. Local processes have no fairness advantage
compared to remote processes when contending to lock a region that
has just been unlocked - the local lock manager enforces a strict
first-come first-served model for both local and remote lockers.

Sponsored by: Isilon Systems
PR: 95247 107555 115524 116679
MFC after: 2 weeks


177253 16-Mar-2008 rwatson

In keeping with style(9)'s recommendations on macros, use a ';'
after each SYSINIT() macro invocation. This makes a number of
lightweight C parsers much happier with the FreeBSD kernel
source, including cflow's prcc and lxr.

MFC after: 1 month
Discussed with: imp, rink


177230 15-Mar-2008 pjd

Fix mmap(2) on ZFS after some changes in VM subsystem.

Submitted by: alc
Reported by: kris (originally) and many others
Tested with: fsx
MFC after: 1 week


176559 25-Feb-2008 attilio

Axe the 'thread' argument from VOP_ISLOCKED() and lockstatus() as it is
always curthread.

As KPI gets broken by this patch, manpages and __FreeBSD_version will be
updated by further commits.

Tested by: Andrea Barberio <insomniac at slackware dot it>


176519 24-Feb-2008 attilio

Introduce some functions in the vnode locks namespace and in the ffs
namespace in order to handle lockmgr fields in a controlled way instead
than spreading all around bogus stubs:
- VN_LOCK_AREC() allows lock recursion for a specified vnode
- VN_LOCK_ASHARE() allows lock sharing for a specified vnode

In FFS land:
- BUF_AREC() allows lock recursion for a specified buffer lock
- BUF_NOREC() disallows recursion for a specified buffer lock

Side note: union_subr.c::unionfs_node_update() is the only other function
directly handling lockmgr fields. As this is not simple to fix, it has
been left behind as "sole" exception.


175633 24-Jan-2008 pjd

- Reduce how much ZFS caches by default. This is another change to mitigate
'kmem_map too small panics'.
- Print two warnings if there is not enough memory and not enough address
space.
- Improve comment.


175294 13-Jan-2008 attilio

VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in
conjuction with 'thread' argument passing which is always curthread.
Remove the unuseful extra-argument and pass explicitly curthread to lower
layer functions, when necessary.

KPI results broken by this change, which should affect several ports, so
version bumping and manpage update will be further committed.

Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>


175257 12-Jan-2008 njl

This commit was generated by cvs2svn to compensate for changes in r175256,
which included commits to RCS files with non-trunk default branches.


175202 10-Jan-2008 attilio

vn_lock() is currently only used with the 'curthread' passed as argument.
Remove this argument and pass curthread directly to underlying
VOP_LOCK1() VFS method. This modify makes the code cleaner and in
particular remove an annoying dependence helping next lockmgr() cleanup.
KPI results, obviously, changed.

Manpage and FreeBSD_version will be updated through further commits.

As a side note, would be valuable to say that next commits will address
a similar cleanup about VFS methods, in particular vop_lock1 and
vop_unlock.

Tested by: Diego Sardina <siarodx at gmail dot com>,
Andrea Di Pasquale <whyx dot it at gmail dot com>


174049 28-Nov-2007 jb

* Check endianness the FreeBSD way.

* Use LBOLT rather than lbolt to avoid a clash with a FreeBSD global
variable.


174048 28-Nov-2007 jb

Fix a prototype definition.


174047 28-Nov-2007 jb

Check endianness the FreeBSD way.


174046 28-Nov-2007 jb

Include an extra header to get this to compile cleanly.


173931 26-Nov-2007 darrenr

Fix 3 issues relating to the use of "auth" rules in IPFilter, from sourceforge:
1837014 Kernel panics after authentication of an outgoing packet
1836992 Potential bugs in packet auth code (w/patches)
1836967 Kernel panic when using auth rule with keep state
and another reported only to FreeBSD by Andiry (see PR)

PR: kern/118251
Submitted by: Andriy Syrovenko <andriys@gmail.com>
Reviewed by: darrenr
MFC after: 5 days


173825 21-Nov-2007 mlaier

Bring back pf_if.c revs 1.8 and 1.6 also lost during last import:
- Use correct time for tzero when compiled in
- Don't use bogus interface addresses on ptp-interfaces with :0

MFC after: 3 days


173822 21-Nov-2007 mlaier

Cleanup pf interface mangement - esp. remove EVENTHANDLER before unloading
the coresponding code. This was lost during 4.1 import.

Reported by: ru
MFC after: 3 days


173815 21-Nov-2007 mlaier

Reloop OpenBSD rev. 1.563:
In pf_test_fragment(), ignore protocol-specific criteria for packets of
different protocols.

Reported by: des
Obtained from: OpenBSD
MFC after: 3 days


173419 07-Nov-2007 pjd

Warn if kmem_map size is set to less than 512MB. Previous warning was a bit
pointless, because default is set to something around 300MB and also
insufficient.

MFC after: 3 days


173374 05-Nov-2007 pjd

Remove unused header.

MFC after: 3 days


173373 05-Nov-2007 pjd

If setting a state to anything but open state, close access to vdev.
This fixes replacing drive in place, eg. zpool replace tank da1 da1.
Before it complained that device is already open.

MFC after: 1 week


173362 05-Nov-2007 benjsc

Initial Import of wpi driver based on p4 changeset 128641.

This import includes:
o wpi Wireless driver for the Intel 3945 Wireless Lan Controller (802.11abg) (sys/dev/wpi)
o Intel firmware revision 2.14.4 & associated LICENSE (sys/dev/contrib/wpi, sys/contrib/dev/wpi/LICENSE)
o wpifw Firmware driver (sys/modules/wpifw)

Approved by: mlaier, sam (co-mentors)


173268 02-Nov-2007 lulf

- Add sysctl for sizeof(znode_t), which will be used by fstat(1).

Approved by: pjd (mentor)


173250 01-Nov-2007 pjd

Call zil_commit() (if ZIL is not disabled) after every non-read request
(BIO_WRITE and BIO_FLUSH) as it is done is Solaris. The difference is
that Solaris calls it only for sync requests, but we can't say in GEOM
is the request is sync or async, so we do it for every request.

MFC after: 1 week


173181 30-Oct-2007 darrenr

Apply a few changes from ipfilter-current:
* Do not hold any locks over calls to copyin/copyout.
* Clean up some #ifdefs
* fix a possible mbuf leak when NAT fails on policy routed packets

PR: 117216


173102 28-Oct-2007 rwatson

Continue to move from generic network entry points in the TrustedBSD MAC
Framework by moving from mac_mbuf_create_netlayer() to more specific
entry points for specific network services:

- mac_netinet_firewall_reply() to be used when replying to in-bound TCP
segments in pf and ipfw (etc).

- Rename mac_netinet_icmp_reply() to mac_netinet_icmp_replyinplace() and
add mac_netinet_icmp_reply(), reflecting that in some cases we overwrite
a label in place, but in others we apply the label to a new mbuf.

Obtained from: TrustedBSD Project


173018 26-Oct-2007 rwatson

Rename 'mac_mbuf_create_from_firewall' to 'mac_netinet_firewall_send' as
we move towards netinet as a pseudo-object for the MAC Framework.

Rename 'mac_create_mbuf_linklayer' to 'mac_mbuf_create_linklayer' to
reflect general object-first ordering preference.

Sponsored by: SPARTA (original patches against Mac OS X)
Obtained from: TrustedBSD Project, Apple Computer


172933 24-Oct-2007 mlaier

Properly drop the pf mutex around all copyout (consistency still protected
by the sx) and avoid a WITNESS panic. Overlooked during last import.

Reported and tested by: Max N. Boyarov
MFC after: 3 days


172930 24-Oct-2007 rwatson

Merge first in a series of TrustedBSD MAC Framework KPI changes
from Mac OS X Leopard--rationalize naming for entry points to
the following general forms:

mac_<object>_<method/action>
mac_<object>_check_<method/action>

The previous naming scheme was inconsistent and mostly
reversed from the new scheme. Also, make object types more
consistent and remove spaces from object types that contain
multiple parts ("posix_sem" -> "posixsem") to make mechanical
parsing easier. Introduce a new "netinet" object type for
certain IPv4/IPv6-related methods. Also simplify, slightly,
some entry point names.

All MAC policy modules will need to be recompiled, and modules
not updates as part of this commit will need to be modified to
conform to the new KPI.

Sponsored by: SPARTA (original patches against Mac OS X)
Obtained from: TrustedBSD Project, Apple Computer


172836 20-Oct-2007 julian

Rename the kthread_xxx (e.g. kthread_create()) calls
to kproc_xxx as they actually make whole processes.
Thos makes way for us to add REAL kthread_create() and friends
that actually make theads. it turns out that most of these
calls actually end up being moved back to the thread version
when it's added. but we need to make this cosmetic change first.

I'd LOVE to do this rename in 7.0 so that we can eventually MFC the
new kthread_xxx() calls.


172776 18-Oct-2007 darrenr

Pullup IPFilter 4.1.28 from the vendor branch into HEAD.

MFC after: 7 days


172772 18-Oct-2007 darrenr

This commit was generated by cvs2svn to compensate for changes in r172771,
which included commits to RCS files with non-trunk default branches.


172645 14-Oct-2007 thompsa

ZFS_LOG adds a newline by itself.

Pointed out by: pjd


172624 14-Oct-2007 thompsa

Print the ZFS ereport to the console if vfs.zfs.debug is set to help diagnose
problems with zfs-on-root since devd isnt running yet.

Reviewed by: pjd


172443 04-Oct-2007 pjd

Fix lock leak leading to the 'System call <name> returning with 1 locks held'
panic.

Reported by: kris
Approved by: re (kensmith)


172358 27-Sep-2007 cognet

Ok I hope I got it right this time.
After discussion with Sam, switch back to use firmware(9) instead of
having the firmware in hex format.
Put the binary firmware uuencoded into sys/contrib/dev/npe, and slap a
LICENSE file, as found on the Intel website.

Approved by: re (blanket), mux (mentor)
MFC After: 1 week


172315 24-Sep-2007 jkim

This commit was generated by cvs2svn to compensate for changes in r172314,
which included commits to RCS files with non-trunk default branches.


172301 23-Sep-2007 pjd

Now that we have CDDLed code in the tree, add CDDL license.

Discussed with: core
Approved by: re (kensmith)


172135 10-Sep-2007 pjd

Reduce the limit of vnodes on i386 when ZFS is loaded to 3/4 of the original
value, so we don't run out of KVA. The default vnodes limit fits better for
UFS, but ZFS allocated more file system specific memory for a vnode than UFS.

Don't touch vnodes limit if we detect it was tuned by system administrator
and restore original value when ZFS is unloaded.

This isn't final fix, but before we implement something better, this will
help to stabilize ZFS under heavy load on i386.

Approved by: re (bmah)


172130 10-Sep-2007 pjd

After dfr@ vnode leak fix, we can allow ARC to consume more memory.

Tested by: kris
Approved by: re (bmah)


172030 01-Sep-2007 pjd

Use CTLFLAG_RDTUN for tunable sysctls.

Approved by: re (bmah)


171929 23-Aug-2007 dhartmei

When checking the sequence number of a TCP header embedded in an
ICMP error message, do not access th_flags. The field is beyond
the first eight bytes of the header that are required to be present
and were pulled up in the mbuf.

A random value of th_flags can have TH_SYN set, which made the
sequence number comparison not apply the window scaling factor,
which led to legitimate ICMP(v6) packets getting blocked with
"BAD ICMP" debug log messages (if enabled with pfctl -xm), thus
breaking PMTU discovery.

Triggering the bug requires TCP window scaling to be enabled
(sysctl net.inet.tcp.rfc1323, enabled by default) on both end-
points of the TCP connection. Large scaling factors increase
the probability of triggering the bug.

PR: kern/115413: [ipv6] ipv6 pmtu not working
Tested by: Jacek Zapala
Reviewed by: mlaier
Approved by: re (kensmith)


171637 28-Jul-2007 rwatson

Replace references to NET_CALLOUT_MPSAFE with CALLOUT_MPSAFE, and remove
definition of NET_CALLOUT_MPSAFE, which is no longer required now that
debug.mpsafenet has been removed.

The once over: bz
Approved by: re (kensmith)


171567 24-Jul-2007 pjd

Update assertion after revision 1.23.

Reviewed by: dfr
Approved by: re (rwatson)


171407 12-Jul-2007 njl

Fix a bug where the callout might not be initialized before being used.
Rev 1.9 introduced another path where machclk_freq would be initialized
before the rest of setup was done (i.e. initializing the callout). Make
the one-time initialization a separate function and make init_machclk()
able to be called multiple times, any time. We depend on tsc_freq first
being updated from the highest priority eventhandler, thus we run last
and call init_machclk() to set machclk_freq. Also, don't initialize
static variables to 0.

Tested by: Eygene Ryabinkin
Approved by: re


171365 11-Jul-2007 harti

This commit was generated by cvs2svn to compensate for changes in r171364,
which included commits to RCS files with non-trunk default branches.


171316 09-Jul-2007 dfr

Correct a reference-counting mistake in the ZFS code which led to abnormal
memory usage and pessimal cache performance.

Reviewed by: pjd
Approved by: re (rwatson)


171257 05-Jul-2007 mlaier

Remove unused variable from pf_subr.c to make it -Werror buildable.

Approved by: re (kensmith)


171174 03-Jul-2007 mlaier

Add two place holders in struct pf_rule for future netgraph integration.

Submitted by: Ermal Luçi
Approved by: re (kensmith)


171173 03-Jul-2007 mlaier

Link pf 4.1 to the build:
- move ftp-proxy from libexec to usr.sbin
- add tftp-proxy
- new altq mtag link

Approved by: re (kensmith)


171168 03-Jul-2007 mlaier

Commit resolved import of OpenBSD 4.1 pf from perforce.

Approved by: re (kensmith)


171165 03-Jul-2007 mlaier

This commit was generated by cvs2svn to compensate for changes in r171164,
which included commits to RCS files with non-trunk default branches.


171163 03-Jul-2007 mlaier

Fix hardware checksum verification on fragments.

MFC after: 7 days
Reported/tested by: Hugo Koji Kobayashi, Vadym Chepkov
Reviewed/help by: yongari
Approved by: re (kensmith)


171063 27-Jun-2007 dfr

In zfs_vget, if we fail to translate an inode number to the corresponding
vnode, make sure we return an error code to the caller.

Reviewed by: pjd
Approved by: re


170459 09-Jun-2007 darrenr

Pointer to an ICMP header was getting left behind after doing a pullup.


170437 08-Jun-2007 marcel

Add my copyright.

Requested by: pjd@


170431 08-Jun-2007 pjd

- Reduce number of atomic operations needed to be implemented in asm by
implementing some of them using existing ones.
- Allow to compile ZFS on all archs and use atomic operations surrounded
by global mutex on archs we don't have or can't have all atomic
operations needed by ZFS.


170430 08-Jun-2007 pjd

Missing atomic operations for ZFS/ia64.

Submitted by: marcel


170281 04-Jun-2007 pjd

Reimplement traverse() helper function:
1. Pass locking flags to VFS_ROOT().
2. Check v_mountedhere while the vnode is locked.
3. Always return locked vnode on success.

Change 1 fixes problem reported by Stephen M. Rumble - after
zfs_vfsops.c,1.9 change, zfs_root() no longer locks the vnode
unconditionally and traverse() didn't pass right lock type to
VFS_ROOT(). The result was that kernel paniced when .zfs/ directory
was accessed via NFS.


170268 04-Jun-2007 darrenr

Merge IPFilter 4.1.23 back to HEAD
See src/contrib/ipfilter/HISTORY for details of changes since 4.1.13


170264 04-Jun-2007 darrenr

This commit was generated by cvs2svn to compensate for changes in r170263,
which included commits to RCS files with non-trunk default branches.


170044 28-May-2007 pjd

Adjust va_mask for setattr. FreeBSD doesn't have va_mask, so we initialize it
based on individual fields beeing set. This doesn't work for setattr replay,
because va_type is set there, so we add AT_TYPE flag to va_mask, which won't
be accepted by zfs_setattr().

Reported by: kris


170040 28-May-2007 pjd

Because we allocate componentname structures on stack, bzero() them before
use just in case.


169929 24-May-2007 pjd

Initialize ZFS a bit earlier and block root mounting until
initialization is complete. This fixes some root-on-ZFS
configurations.

Reported by: Bruno Damour <freebsd.ruomad@free.fr>
Tested by: Bruno Damour <freebsd.ruomad@free.fr>


169920 23-May-2007 pjd

FreeBSD's namecache works quite well with ZFS, so remove DNLC.


169919 23-May-2007 pjd

All objects we create using GFS are directories, so initialize d_type
properly, but add XXX comment saying that it can eventually change in
the future.


169884 22-May-2007 pjd

Lock vnode on lookup. This fixes ZIL replay for rmdir/unlink/rename.

Reported by: des


169843 21-May-2007 dhartmei

From OpenBSD, rev. 1.524, 1.528, 1.529
Deal with IPv6 routing headers (see FreeBSD-SA-07:03.ipv6 for background)
Block IPv6 packets with routing headers by default, unless 'allow-opts'
is specified. Block RH0 unconditionally. Deal with ip6_plen 0.

MFC after: 1 week
Discussed with: mlaier


169430 09-May-2007 pjd

Increase debug level - this message is not that important.


169325 06-May-2007 pjd

- Add missing lock destruction and remove duplicate initializations.
With this change it is possible to unload zfs.ko module from
WITNESS-enabled kernel.
- Remove bogus comment.


169303 06-May-2007 pjd

Use provider's ident to handle situations when disks are moved around
and show up with different names: first try to open provider using
remembered name and compare its ident, if equal, this is our provider,
if not equal or there is no provider with such name, find provider with
remembered ident and don't care about the name.


169302 06-May-2007 pjd

MFp4: We don't need to cover vnode_pager_setsize() with the z_map_lock.


169199 02-May-2007 pjd

Share-lock a vnode where possible.


169198 02-May-2007 pjd

When parent directory has to be unlocked, lock it back with the same lock
type. Before this change, if directory was shared-locked, it was relocked
exclusively.


169197 02-May-2007 pjd

Lock vnode using cn_lkflags in case the caller wants the vnode to be
shared-locked.


169196 02-May-2007 pjd

The getnewvnode() function sets LK_NOSHARE by default, so if we want to
support shared vnodes locking, we need to remove that flag.
Also add LK_CANRECURSE flag as found in nfsclient.


169195 02-May-2007 pjd

ZFS should update timestamps upon the creat() of an existing file.

Obtained from: OpenSolaris
Bug: http://bugs.opensolaris.org/view_bug.do?bug_id=6465105


169194 02-May-2007 pjd

- Lock vnode with flags passed in as argument in zfs_vget() and zfs_root().

Pointed out by: ups
Also reported by: kris

- Add comments where I'm not sure if LK_RETRY should be used.


169172 01-May-2007 pjd

MFp4: Remove LK_RETRY flag when locking vnode in zfs_lookup, we don't want
dead vnodes here.

Suggested by: kib


169170 01-May-2007 pjd

White space fixes.


169167 01-May-2007 pjd

Add a comment explaining why we call dmu_write() unconditionally, even if
uiomove() fails, especially that it is different from what OpenSolaris
does (I'm not entirely sure they are right).

Suggested by: darrenr


169108 29-Apr-2007 pjd

- Define d_type for ".", ".." and ".zfs" directories.
- Add a TODO comment where d_type is still noe defined.


169107 29-Apr-2007 pjd

Oops, correct important typo in last commit.


169106 29-Apr-2007 pjd

Avoid freeing NULL pointer in case of an error.


169087 29-Apr-2007 pjd

Fix two use-after-free cases.


169059 26-Apr-2007 pjd

MFp4: Optimize mappedwrite() and mappedread() functions to write/read as much
non-mapped data as possible at once and not page-by-page. Which this change we
combain I/Os, but also saves many VM_OBJECT_UNLOCK()/VM_OBJECT_LOCK()
operations.

Simple 'fsx -l 33554432 -o 524288 -N 10000 /tank/fsx' test shows ~23%
performance increase.


169057 26-Apr-2007 pjd

- Always try to write one whole page at a time.
- vm_page_undirty() is enough (instead of vm_page_set_validclean()), but it has
to be called before we write the data in case someone makes page dirty after
our write, but before our vm_page_undirty() call.
- Always dmu_write, not matter if uiomove() succeeded, because it could
partially be ok and we would lose some changes.

All good ideas from: ups


169056 26-Apr-2007 pjd

MFV: Free znodes immediatelly, allowing the ARC to hold onto less memory.

Full description at: http://bugs.opensolaris.org/view_bug.do?bug_id=6543706


169055 26-Apr-2007 pjd

MFV: Functions name change.


169028 24-Apr-2007 pjd

ZIL (ZFS Intent Log) can be safely turned on and off at run time, because
it is only used when dataset is beeing mounted to decide if log should also
be opened.


169027 24-Apr-2007 pjd

MFp4: Now that ZFS can use FreeBSD's namecache, turn it off by default and
turn off DNLC, but don't remove DNLC yet just in case.


169025 24-Apr-2007 pjd

MFp4: Rearange the code so vobject is destroyed from reclaim() method like
in all other file system on FreeBSD (instead from inactive() method).

A nice side-effect of this change, except that it speedups file system
when mmaped file are often open/closed, is that it makes FreeBSD's
namecache work:)


169024 24-Apr-2007 pjd

MFp4: Once page is written successfully, we should clear the dirty bits.
This fixes slow operations on mmaped files, because without this fix,
pages were written to disk multiple times.

If one is looking for even greater speed up for such operation, he should
disable ZIL (by setting vfs.zfs.zil_disable to 1 in /boot/loader.conf).
Disabling ZIL makes fsx run ~9 times faster.


169023 24-Apr-2007 pjd

MFp4: Reduce diff against vendor.


169022 24-Apr-2007 pjd

MFp4: We have stronger 'lock already initialized' check now, so we can
reduce diff against the vendor by removing bzero of this mutex.


168987 23-Apr-2007 bmah

Mostly-cosmetic fixes in low-memory warning messages:

o Fix linewrap issues.

o Fix two typos (s/Recomended/Recommended/ and s/tunning/tuning/)

o Remove a couple of extra instances of the word "of".

o Update names of kmem_size variables.

Approved by: pjd


168978 23-Apr-2007 pjd

Too much diff reduction. 'cmd' has to be u_long.

Reported by: delphij


168962 23-Apr-2007 pjd

MFp4: Reduce diff against vendor code:
- Move FreeBSD-specific code to zfs_freebsd_*() functions in zfs_vnops.c
and keep original functions as similar to vendor's code as possible.
- Add various includes back, now that we have them.


168959 22-Apr-2007 pjd

Fix 'zpool status -v'. To get object number we should use ZFS_DIRENT_OBJ()
macro, as za_first_integer field also contains type. This should be fixed in
ZFS itself, but this bug is not visible on Solaris, because there, type is
not stored in za_first_integer. On the other hand it will be visible on
MacOS X.

Reported by: Barry Pederson <bp@barryp.org>


168958 22-Apr-2007 pjd

Fix st_rdev handling (implement it, actually).

Reported by: gj


168926 21-Apr-2007 pjd

MFp4:

@118370 Correct typo.

@118371 Integrate changes from vendor.

@118491 Show backtrace on unexpected code paths.

@118494 Integrate changes from vendor.

@118504 Fix sendfile(2). I had two ways of fixing it:
1. Fixing sendfile(2) itself to use VOP_GETPAGES() instead of
hacking around with vn_rdwr(UIO_NOCOPY), which was suggested
by ups.
2. Modify ZFS behaviour to handle this special case.

Although 1 is more correct, I've choosen 2, because hack from 1
have a side-effect of beeing faster - it reads ahead MAXBSIZE
bytes instead of reading page by page. This is not easy to implement
with VOP_GETPAGES(), at least not for me in this very moment.

Reported by: Andrey V. Elsukov <bu7cher@yandex.ru>

@118525 Reorganize the code to reduce diff.

@118526 This code path is expected. It is simply when file is opened with
O_FSYNC flag.

Reported by: kris
Reported by: Michal Suszko <dry@dry.pl>


168839 18-Apr-2007 pjd

MFp4: We check for PRIV_VFS_MOUNT already in mount(2) syscall and we don't
want to do the check when snapshot is automatically mounted by an
unprivileged user doing lookup on a snapshot directory.


168826 17-Apr-2007 pjd

Simplify.


168821 17-Apr-2007 pjd

Ignore hostid check for root-on-ZFS configurations. Making hostid available
before the root is mounted is tricky and having it in /boot/ is not really
desire.

Reported by: Zephiris <zephiris@gmail.com>


168775 16-Apr-2007 pjd

Uncomment forgotten check. Without this check in-place, ZFS will panic on
unload instead of returning EBUSY. This check tells if there are mounted
ZFS file systems or not. We can't unload if there are mounted file systems.

Reported by: Andrey V. Elsukov <bu7cher@yandex.ru>


168753 15-Apr-2007 pjd

MFp4: Start DNLC after desiredvnodes variable is initialized.
Before this change if zfs.ko was loaded by the loader, DNLC was
automatically disabled.

Reported by: Zephiris <zephiris@gmail.com>


168738 14-Apr-2007 pjd

Fix RAID-Z resilvering.

Obtained from: OpenSolaris


168724 14-Apr-2007 pjd

MFp4: Hmm, it seems to work now.


168715 14-Apr-2007 pjd

MFp4: Use max_ncpus, which is used in other places in the code.


168714 14-Apr-2007 pjd

MFp4: Add more debug, so we can see if zpool.cache was loaded or why it
wasn't loaded.


168713 14-Apr-2007 pjd

MFp4: Allow to tune vfs.zfs.debug from loader.conf.


168712 14-Apr-2007 pjd

MFp4: - Allow to tune number of spa_zio_* threads.
- Reduce default number of spa_zio_* threads to N*spa_zio_issue
plus N*spa_zio_intr threads per ZIO type, where N is the number
of CPUs.
- Put ZIO type number in thread's name.


168700 14-Apr-2007 bms

In member interface detach event handler, do not attempt to free state
which has already been freed by in_ifdetach(). With this cumulative change,
the removal of a member interface will not cause a panic in pfsync(4).

Requested by: yar
PR: 86848


168696 13-Apr-2007 pjd

Fix overflow, which was causing endless loops when 32bit machine had more
than 2GB of RAM. This was because our physmem is long and 'physmem*PAGESIZE'
can be negative for more than 2GB of memory.

Reported by: Andrey V. Elsukov <bu7cher@yandex.ru>

It is not yet tested by Andrey, so there can be other problems, but this
was definiately a bug, so I'm committing a fix now.


168683 13-Apr-2007 pjd

Fix vnodes starvation caused by DNLC (ZFS name cache):
- Tune number of namecache entires better (based on desiredvnodes).
- Handle vfs_lowvnodes event by releasing requested number of name cache
entries, but no less than 5%.

Reported by: simokawa


168676 12-Apr-2007 pjd

MFp4: Synchronize with vendor (mostly 'zfs rename -r').


168675 12-Apr-2007 pjd

MFp4: Bring back comments.

Requested by: jhb


168617 11-Apr-2007 ru

This commit was generated by cvs2svn to compensate for changes in r168616,
which included commits to RCS files with non-trunk default branches.


168610 11-Apr-2007 njl

This commit was generated by cvs2svn to compensate for changes in r168609,
which included commits to RCS files with non-trunk default branches.


168583 10-Apr-2007 pjd

MFp4: Allow to set zfs_recover via vfs.zfs.recover from /boot/loader.conf.


168582 10-Apr-2007 pjd

MFp4: Hide under '#ifdef _KERNEL' only what's really needed.


168566 10-Apr-2007 pjd

Try to stabilize ZFS with regard to memory consumption:
- Allow to shrink ARC down to 16MB (instead of 64MB).
- Set arc_max to 1/2 of kmem_map by default.
- Start freeing things earlier when low memory situation is detected.
- Serialize execution of arc_lowmem().

I decided to setup minimum ZFS memory requirements to 512MB of RAM and 256MB of
kmem_map size. If there is less RAM or kmem_map, a warning will be printed.
World is cruel, be no better. In other words: modern file system requires
modern hardware:)

From ZFS administration guide:

"Currently the minimum amount of memory recommended to install a Solaris
system is 512 Mbytes. However, for good ZFS performance, at least one
Gbyte or more of memory is recommended."


168565 10-Apr-2007 pjd

Reduce diff against vendor - we have now stronger check for "mutex already
initialized", so we can go back to kmem_alloc().


168559 09-Apr-2007 pjd

Remove unused #define.


168511 09-Apr-2007 pjd

We don't have to wait for the root file system to be mounted anymore, now that
kobj KPI supports operating on files loaded by the loader.


168510 09-Apr-2007 pjd

Drop the Giant lock before calling zfs_domount(), which is held when
mounting root file system.


168509 08-Apr-2007 pjd

Move zpool.cache from /etc/zfs/ to /boot/zfs/, so we can keep it on
dedicated /boot/ file system and use ZFS for the root file system.


168498 08-Apr-2007 pjd

MFp4: Synchronize with recent OpenSolaris changes.


168494 08-Apr-2007 pjd

- Use 'name=value' so it can be properly recognized by devd(8).
- Use only subclass as devd's type.


168488 08-Apr-2007 pjd

Take vnode pointer and hold it under znode lock, so we won't race with
zfs_reclaim(). This may or may not fix problem reported by kris, but it's
definiatelly better that way.


168482 07-Apr-2007 pjd

Move atomic.S files to directories that better fit OpenSolaris directory
layout.


168481 07-Apr-2007 pjd

Fix libzpool compilation.

Reported by: des


168478 07-Apr-2007 pjd

Limit the number of system taskq threads to the number of CPUs.
They are only used when there is a need for reducing namecache.

Observed by: kris, csjp


168474 07-Apr-2007 des

Fix some type mismatches.

Reviewed by: pjd@


168473 07-Apr-2007 pjd

Allow to tune maximum and minimum memory used by ARC.


168460 07-Apr-2007 pjd

Add missing mutex_init() which was causing assertion panic when on clone
destruction.

Reported by: kris


168404 06-Apr-2007 pjd

Please welcome ZFS - The last word in file systems.

ZFS file system was ported from OpenSolaris operating system. The code in under
CDDL license.

I'd like to thank all SUN developers that created this great piece of software.

Supported by: Wheel LTD (http://www.wheel.pl/)
Supported by: The FreeBSD Foundation (http://www.freebsdfoundation.org/)
Supported by: Sentex (http://www.sentex.net/)


167905 26-Mar-2007 njl

Add an interface for drivers to be notified of changes to CPU frequency.
cpufreq_pre_change is called before the change, giving each driver a chance
to revoke the change. cpufreq_post_change provides the results of the
change (success or failure). cpufreq_levels_changed gives the unit number
of the cpufreq device whose number of available levels has changed. Hook
in all the drivers I could find that needed it.

* TSC: update TSC frequency value. When the available levels change, take the
highest possible level and notify the timecounter set_cputicker() of that
freq. This gets rid of the "calcru: runtime went backwards" messages.
* identcpu: updates the sysctl hw.clockrate value
* Profiling: if profiling is active when the clock changes, let the user
know the results may be inaccurate.

Reviewed by: bde, phk
MFC after: 1 month


167819 22-Mar-2007 jkim

Merge from vendor branch to fix tinderbox breakage.


167818 22-Mar-2007 jkim

This commit was generated by cvs2svn to compensate for changes in r167817,
which included commits to RCS files with non-trunk default branches.


167813 22-Mar-2007 jkim

Update to reflect import of ACPI-CA 20070320.


167812 22-Mar-2007 jkim

Resolve conflicts from import of Intel ACPI-CA 20070320.


167811 22-Mar-2007 jkim

Resolve conflicts of unchanged files that are off the vendor branch.


167809 22-Mar-2007 jkim

Remove files that removed on the vendor branch.


167808 22-Mar-2007 jkim

This commit was generated by cvs2svn to compensate for changes in r167807,
which included commits to RCS files with non-trunk default branches.


167806 22-Mar-2007 jkim

This commit was generated by cvs2svn to compensate for changes in r167805,
which included commits to RCS files with non-trunk default branches.


167803 22-Mar-2007 jkim

This commit was generated by cvs2svn to compensate for changes in r167802,
which included commits to RCS files with non-trunk default branches.


167710 19-Mar-2007 bms

Teach pfsync(4) that its member interfaces may go away.

This change partially resolves the issue in the PR. Further architectural
fixes, in the form of reference counting, are needed.

PR: 86848
Reviewed by: yar
MFC after: 1 month


167165 02-Mar-2007 flz

- Add Intel firmwares for Intel PRO/Wireless LAN 2100/2200/2915 cards in a
uuencoded format along with their respective LICENSE files.
- Add new share/doc/legal directory to BSD.usr.dist mtree file. This is the
place we install LICENSE files for restricted firmwares.
- Teach firmware(9) and kmod.mk about licensed firmwares. Restricted firmwares
won't load properly unless legal.<name>.license_ack is set to 1, either
via kenv(1) or /boot/loader.conf.

Reviewed by: mlaier, sam
Permitted by: Intel (via Andrew Wilson)
MFC after: 1 month


166901 23-Feb-2007 piso

o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@


165719 01-Jan-2007 mlaier

Clean up pfr_kentry_pl2 as well. This fixes a kernel panic in the vm.zone
sysctl after unloading pf.

Submitted by: Earl Lapus
MFC after: 3 days


165632 29-Dec-2006 jhb

Various bpf(4) related fixes to catch places up to the new bpf(4)
semantics.
- Stop testing bpf pointers for NULL. In some cases use
bpf_peers_present() and then call the function directly inside the
conditional block instead of the macro.
- For places where the entire conditional block is the macro, remove the
test and make the macro unconditional.
- Use BPF_MTAP() in if_pfsync on FreeBSD instead of an expanded version of
the old semantics.

Reviewed by: csjp (older version)


165631 29-Dec-2006 mlaier

Work around a long standing LOR with user/group rules by doing the socket
lookup early. This has some performance implications and should not be
enabled by default, but might help greatly in certain setups. After some
more testing this could be turned into a sysctl.

Tested by: avatar
LOR ids: 17, 24, 32, 46, 191 (conceptual)
MFC after: 6 weeks


165515 24-Dec-2006 darrenr

TCP Window scaling was being recognised but the recorded settings were being
clobbered and thus effectively disabled.

MFC after: 7 days


165183 13-Dec-2006 sam

This commit was generated by cvs2svn to compensate for changes in r165182,
which included commits to RCS files with non-trunk default branches.


164033 06-Nov-2006 rwatson

Sweep kernel replacing suser(9) calls with priv(9) calls, assigning
specific privilege names to a broad range of privileges. These may
require some future tweaking.

Sponsored by: nCircle Network Security, Inc.
Obtained from: TrustedBSD Project
Discussed on: arch@
Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri,
Alex Lyashkov <umka at sevcity dot net>,
Skip Ford <skip dot ford at verizon dot net>,
Antoine Brodin <antoine dot brodin at laposte dot net>


163606 22-Oct-2006 rwatson

Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h
begun with a repo-copy of mac.h to mac_framework.h. sys/mac.h now
contains the userspace and user<->kernel API and definitions, with all
in-kernel interfaces moved to mac_framework.h, which is now included
across most of the kernel instead.

This change is the first step in a larger cleanup and sweep of MAC
Framework interfaces in the kernel, and will not be MFC'd.

Obtained from: TrustedBSD Project
Sponsored by: SPARTA


163027 05-Oct-2006 oleg

Workaround bad locking design:
do not try to lock/unlock destroyed/non-existsing mutex.

PR: kern/103569
Reviewed by: guido
Approved by: glebius (mentor)
Silence from: darrenr
MFC: 2 week


162416 18-Sep-2006 sam

remove this from HEAD too since it got taken off the vendor branch


162414 18-Sep-2006 sam

This commit was generated by cvs2svn to compensate for changes in r162413,
which included commits to RCS files with non-trunk default branches.


162238 12-Sep-2006 csjp

Introduce a new entry point, mac_create_mbuf_from_firewall. This entry point
exists to allow the mandatory access control policy to properly initialize
mbufs generated by the firewall. An example where this might happen is keep
alive packets, or ICMP error packets in response to other packets.

This takes care of kernel panics associated with un-initialize mbuf labels
when the firewall generates packets.

[1] I modified this patch from it's original version, the initial patch
introduced a number of entry points which were programmatically
equivalent. So I introduced only one. Instead, we should leverage
mac_create_mbuf_netlayer() which is used for similar situations,
an example being icmp_error()

This will minimize the impact associated with the MFC

Submitted by: mlaier [1]
MFC after: 1 week

This is a RELENG_6 candidate


162069 06-Sep-2006 mlaier

Fix stateful filtering of loopback IPv6 traffic to an address not configured
on lo0. While here fix a comment.

PR: kern/102647
Reported by: Frank Steinborn
Submitted by: suz (earlier version)
MFC after: 3 days


161356 16-Aug-2006 guido

Resolve conflicts

MFC after: 2 weeks


161352 16-Aug-2006 guido

This commit was generated by cvs2svn to compensate for changes in r161351,
which included commits to RCS files with non-trunk default branches.


161244 12-Aug-2006 pjd

The strstr() function is in the libkern now.


160543 21-Jul-2006 mlaier

Import from OpenBSD 1.168, dhartmei:
fix a bug in the input sanity check of DIOCCHANGERULE (not used by pfctl,
but third-party tools). a rule must have a non-empty replacement address
list when it's a translation rule but not an anchor call (i.e. "nat ...
->" needs a replacement address, but "nat-anchor ..." doesn't). the check
confused "rule is an anchor call" with "rule is defined within an anchor".
report from Michal Mertl, Max Laier.

Obtained from: OpenBSD
MFC after: 2 weeks


160195 09-Jul-2006 sam

Revise network interface cloning to take an optional opaque
parameter that can specify configuration parameters:
o rev cloner api's to add optional parameter block
o add SIOCCREATE2 that accepts parameter data
o rev vlan support to use new api (maintain old code)

Reviewed by: arch@


160164 08-Jul-2006 mlaier

Make in-kernel multicast protocols for pfsync and carp work after enabling
dynamic resizing of multicast membership array.

Reported and testing by: Maxim Konovalov, Scott Ullrich
Reminded by: thompsa
MFC after: 2 weeks


160163 07-Jul-2006 marcel

Apply local modifications to make Unwind Express BETA 10 buildable and
usable in the FreeBSD kernel.


160161 07-Jul-2006 marcel

This commit was generated by cvs2svn to compensate for changes in r160160,
which included commits to RCS files with non-trunk default branches.


160158 07-Jul-2006 marcel

This commit was generated by cvs2svn to compensate for changes in r160157,
which included commits to RCS files with non-trunk default branches.


159656 16-Jun-2006 mlaier

Fix pfsync w/o carp compilation.

Submitted by: yar


159603 14-Jun-2006 mlaier

Fix byteorder of syncpeer and make it actually work.

Submitted by: glebius
MFC after: 1 week


159380 07-Jun-2006 sam

reposition defines so things build on architectures where AH_REGOPS_FUNC
is defined


159288 05-Jun-2006 sam

resolve merge conflicts

MFC after: 1 month


159286 05-Jun-2006 sam

This commit was generated by cvs2svn to compensate for changes in r159285,
which included commits to RCS files with non-trunk default branches.


158651 16-May-2006 phk

Since DELAY() was moved, most <machine/clock.h> #includes have been
unnecessary.


158486 12-May-2006 mlaier

Put debugging messages related to inconsistent ticket numbers under misc and
wrap it __FreeBSD__ specific as I couldn't figure out which version of
OpenBSD I got it from.

Reported by: Scott Ullrich


157836 18-Apr-2006 darrenr

fix "ipf -Z" reporting rubbish and possibly panic'ing box

MFC after: 4 days


157131 25-Mar-2006 mlaier

Loopback pf_norm.c rev. 1.106 from OpenBSD:
fixup IP checksum when modifying IP header fields

PR: kern/93849
Obtained from: OpenBSD
MFC after: 3 days


156500 09-Mar-2006 yar

Avoid pulling in the whole <net/pfvar.h> by opaquely declaring
the structs pflog_packet() takes pointers to.

Approved by: mlaier
MFC after: 3 days


156200 02-Mar-2006 thompsa

Do not use the TSC where its known to be broken, this will cause the queue
speeds to perform below the desired bitrate and throughput will be erratic.

This makes queueing work on the Geode SC1100, K5 model 0 and IDT WinChip C6
processors.

MFC after: 3 days


155514 10-Feb-2006 sam

resolve merge conflicts

MFC after: 2 weeks


155512 10-Feb-2006 sam

This commit was generated by cvs2svn to compensate for changes in r155511,
which included commits to RCS files with non-trunk default branches.


155337 05-Feb-2006 mlaier

Make pflog a seperate module. As a result pflog_packet() becomes a function
pointer that is declared in pf_ioctl.c

Requested by: yar (as part of the module build reorg)
MFC after: 1 week
X-MFC with: yar's module reorg


154551 19-Jan-2006 dhartmei

fix a bug in the fragment cache (used for 'scrub fragment crop/drop-ovl',
but not 'fragment reassemble'), which can cause some fragments to get
inserted into the cache twice, thereby violating an invariant, and panic-
ing the system subsequently.

Reviewed by: mlaier
MFC after: 1 day


154377 14-Jan-2006 mlaier

Move m_adj after checking that m_dup succeeded.

Found with: Coverity Prevent(tm)
MFC after: 3 days


153882 30-Dec-2005 guido

Add mcopywrap prototype to ip_compat.h
Remove h323 proxy from ip_proxy (copyright issue)


153876 30-Dec-2005 guido

Resolve conflicts


153873 30-Dec-2005 guido

This commit was generated by cvs2svn to compensate for changes in r153872,
which included commits to RCS files with non-trunk default branches.


153725 25-Dec-2005 mlaier

Only decrement the max-src-conn counter for tcp connections that reached
"established" state.

Similar to OpenBSD's rev. 1.499 by joel but not breaking ABI.

Obtained from: OpenBSD (with changes)
Reported by: Bruno Afonso
MFC after: 3 days
X-MFC: together with local_flags


153722 25-Dec-2005 mlaier

Fix build after timeval.tv_sec changed from long to time_t.


153545 20-Dec-2005 mlaier

Move PFSTATE_EXPIRING from sync_flags to a new local_flags. sync_flags has
special handling when zero. This caused no PFSYNC_ACT_DEL message and thus
disfunction of pfflowd and state synchronisation in general.

Discovered by: thompsa
Good catch by: thompsa
MFC after: 7 days


153201 07-Dec-2005 obrien

This commit was generated by cvs2svn to compensate for changes in r153200,
which included commits to RCS files with non-trunk default branches.


153110 05-Dec-2005 ru

Fix -Wundef warnings found when compiling i386 LINT, GENERIC and
custom kernels.


153084 04-Dec-2005 ru

Fix -Wundef from compiling the amd64 LINT.


152315 11-Nov-2005 ru

- Store pointer to the link-level address right in "struct ifnet"
rather than in ifindex_table[]; all (except one) accesses are
through ifp anyway. IF_LLADDR() works faster, and all (except
one) ifaddr_byindex() users were converted to use ifp->if_addr.

- Stop storing a (pointer to) Ethernet address in "struct arpcom",
and drop the IFP2ENADDR() macro; all users have been converted
to use IF_LLADDR() instead.


152296 11-Nov-2005 ru

- Make IFP2ENADDR() a pointer to IF_LLADDR() rather than another
copy of Ethernet address.

- Change iso88025_ifattach() and fddi_ifattach() to accept MAC
address as an argument, similar to ether_ifattach(), to make
this work.


152209 08-Nov-2005 thompsa

Move the cloned interface list management in to if_clone. For some drivers the
softc lists and associated mutex are now unused so these have been removed.

Calling if_clone_detach() will now destroy all the cloned interfaces for the
driver and in most cases is all thats needed to unload.

Idea by: brooks
Reviewed by: brooks


152070 04-Nov-2005 jkim

This commit was generated by cvs2svn to compensate for changes in r152069,
which included commits to RCS files with non-trunk default branches.


152059 04-Nov-2005 njl

This commit was generated by cvs2svn to compensate for changes in r152058,
which included commits to RCS files with non-trunk default branches.


152020 03-Nov-2005 jkim

Fix build breakage on tinderbox.


151946 01-Nov-2005 jkim

Update to reflect import of ACPI-CA 20051021 with includes fixups


151945 01-Nov-2005 jkim

Local change: remove unnecessary __cdecl


151944 01-Nov-2005 jkim

Local change: remove compilation warnings


151943 01-Nov-2005 jkim

Fix conflicts from import of Intel ACPI-CA 20051021


151942 01-Nov-2005 jkim

Unchanged files that are off the vendor branch


151941 01-Nov-2005 jkim

This commit was generated by cvs2svn to compensate for changes in r151940,
which included commits to RCS files with non-trunk default branches.


151938 01-Nov-2005 jkim

This commit was generated by cvs2svn to compensate for changes in r151937,
which included commits to RCS files with non-trunk default branches.


151897 31-Oct-2005 rwatson

Normalize a significant number of kernel malloc type names:

- Prefer '_' to ' ', as it results in more easily parsed results in
memory monitoring tools such as vmstat.

- Remove punctuation that is incompatible with using memory type names
as file names, such as '/' characters.

- Disambiguate some collisions by adding subsystem prefixes to some
memory types.

- Generally prefer lower case to upper case.

- If the same type is defined in multiple architecture directories,
attempt to use the same name in additional cases.

Not all instances were caught in this change, so more work is required to
finish this conversion. Similar changes are required for UMA zone names.


151604 24-Oct-2005 obrien

Add a commented out version of what was done for the r20041119sysinc import.


151603 24-Oct-2005 obrien

Fix conflicts of import of Intel ACPI-CA 20041119 with system includes fixups.


151601 24-Oct-2005 obrien

This commit was generated by cvs2svn to compensate for changes in r151600,
which included commits to RCS files with non-trunk default branches.


151297 13-Oct-2005 ru

In detach method, move if_free() after bus_teardown_intr().


151266 12-Oct-2005 thompsa

Change the reference counting to count the number of cloned interfaces for each
cloner. This ensures that ifc->ifc_units is not prematurely freed in
if_clone_detach() before the clones are destroyed, resulting in memory modified
after free. This could be triggered with if_vlan.

Assert that all cloners have been destroyed when freeing the memory.

Change all simple cloners to destroy their clones with ifc_simple_destroy() on
module unload so the reference count is properly updated. This also cleans up
the interface destroy routines and allows future optimisation.

Discussed with: brooks, pjd, -current
Reviewed by: brooks


150220 16-Sep-2005 ru

Fix "struct ifnet" leak if attach() fails in the middle.


150000 11-Sep-2005 obrien

Per a request from Nick Triantos of nVidia, nVidia's legal department asked
that we provide their license document beside their nForce MCP object code.


149982 11-Sep-2005 mlaier

Stop leaking a lock. This used to cause a propagate_priority() page fault
when setting syncdev and syncpeer.

Reported by: Dominic Marks


149893 08-Sep-2005 mlaier

Unbreak the build. Committed from the wrong directory.


149884 08-Sep-2005 mlaier

Commit imported changes to HEAD:
pf_ioctl.c Revision 1.153 Sun Aug 7 11:37:33 2005 UTC by dhartmei
| verify ticket in DIOCADDADDR, from Boris Polevoy, ok deraadt@

pf_ioctl.c Revision 1.158 Mon Sep 5 14:51:08 2005 UTC by dhartmei
| in DIOCCHANGERULE, properly initialize table, if used in NAT rule.
| from Boris Polevoy <vapcom at mail dot ru>, ok mcbride@

pf.c Revision 1.502 Mon Aug 22 11:54:25 2005 UTC by dhartmei
| when nat'ing icmp 'connections', replace icmp id with proxy values
| (similar to proxy ports for tcp/udp). not all clients use
| per-invokation random ids, this allows multiple concurrent
| connections from such clients.
| thanks for testing to Rod Whitworth, "looks ok" markus@

pf.c Revision 1.501 Mon Aug 22 09:48:05 2005 UTC by dhartmei
| fix rdr to bitmask replacement address pool. patch from Max Laier,
| reported by Boris Polevoy, tested by Jean Debogue, ok henning@

Obtained from: OpenBSD
MFC after: 3 days


148891 09-Aug-2005 mlaier

Wrap the new world order in __FreeBSD__ to ease future imports.


148887 09-Aug-2005 rwatson

Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags. Device drivers are now responsible for
synchronizing access to these flags, as they are in if_drv_flags. This
helps prevent races between the network stack and device driver in
maintaining the interface flags field.

Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
some less so.

Reviewed by: pjd, bz
MFC after: 7 days


148196 20-Jul-2005 mlaier

Prevent a race condition. As pf_send_tcp() - called for expired synproxy
states - has to drop the lock when calling back to ip_output(), the state
purge timeout might run and gc the state. This results in a rb-tree
inconsistency. With this change we flag expiring states while holding the
lock and back off if the flag is already set.

Reported by: glebius
MFC after: 2 weeks


148176 20-Jul-2005 ume

move RFC3542 related definitions into ip6.h.

Submitted by: Keiichi SHIMA <keiichi__at__iijlab.net>
Reviewed by: mlaier
Obtained from: KAME


148015 14-Jul-2005 mlaier

Export pfsyncstats via sysctl "net.inet.pfsync" in order to print them with
netstat (seperate commit).

Requested by: glebius
MFC after: 1 week


147614 26-Jun-2005 mlaier

Properly initialize ifq_maxlen for the defered send queue and make it
actually work. Also use the right semantics for IF_HANDOFF to get correct
stats.

Reported and tested by: Sascha Luck <sascha at c4inet dot net>
Approved by: re (blanket)


147547 23-Jun-2005 darrenr

Fix some minor problems before release:
(1) "ipf -T" is broken for fetching single entries and
(2) loading rules with numbered collections does not order insertion right.
(3) stats aren't accumulated for hash table memory failures

Approved by: re (dwhite)


147367 14-Jun-2005 darrenr

locking on exit of reading from ip_sync is not correct for all instances

Approved by: re (dwhite)


147321 12-Jun-2005 mlaier

Mark pf callouts as NET_MPSAFE.

Requested by: yongari (serveral times)
Approved by: re (blanket)
MFC after: 1 week


147261 10-Jun-2005 mlaier

Defer ip_output of pfsync updates to an independent callout thread instead
of just dropping the lock around the ip_output call. This used to cause
corrupted state tree walks for some call-paths.

In a second stage all callouts will be marked MPSAFE according to the
setting of mpsafenet.

Reported and tested by: Matthew Grooms <mgrooms at seton dot org>
MFC after: 3 days
X-MFC after: Marking callouts MPSAFE + 1 week


147256 10-Jun-2005 brooks

Stop embedding struct ifnet at the top of driver softcs. Instead the
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.

This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.

Other changes of note:
- Struct arpcom is no longer referenced in normal interface code.
Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
To enforce this ac_enaddr has been renamed to _ac_enaddr.
- The second argument to ether_ifattach is now always the mac address
from driver private storage rather than sometimes being ac_enaddr.

Reviewed by: sobomax, sam


146540 23-May-2005 harti

This commit was generated by cvs2svn to compensate for changes in r146539,
which included commits to RCS files with non-trunk default branches.


146277 16-May-2005 darrenr

Enable building /sbin/ipf (but not the rescue version) with the ability to
parse bpf strings for filter rules in ipf.conf


146229 15-May-2005 darrenr

Enable IPFilter to correctly determine if BPF has been optioned into the
kernel it is being compiled against and subsequently enable using BPF for
packet matching in ipf rules.


145886 04-May-2005 mlaier

if_mtu not ifp_mtu.


145875 04-May-2005 mlaier

Bring back fix from rev. 1.28 which was lost during the import.


145874 04-May-2005 mlaier

Combine rev. 1.29 and 1.30 to something that will make sense for future
imports.


145873 04-May-2005 mlaier

Make LINT happy.


145863 04-May-2005 andre

Pass icmp_error() the MTU argument directly instead of
an interface pointer. This simplifies a couple of uses
and removes some XXX workarounds.


145836 03-May-2005 mlaier

Resolve conflicts created during the import of pf 3.7 Some features are
missing and will be implemented in a second step. This is functional as is.

Tested by: freebsd-pf, pfsense.org
Obtained from: OpenBSD
X-MFC after: never (breaks API/ABI)


145660 29-Apr-2005 ru

Fix the following warnings on amd64:

/usr/src/sbin/ipf/ipftest/../../../sys/contrib/ipfilter/netinet/ip_frag.c: In function `fr_ipid_newfrag':
/usr/src/sbin/ipf/ipftest/../../../sys/contrib/ipfilter/netinet/ip_frag.c:397: warning: cast to pointer from integer of different size
/usr/src/sbin/ipf/ipftest/../../../sys/contrib/ipfilter/netinet/ip_frag.c: In function `fr_ipid_knownfrag':
/usr/src/sbin/ipf/ipftest/../../../sys/contrib/ipfilter/netinet/ip_frag.c:582: warning: cast from pointer to integer of different size


145640 28-Apr-2005 darrenr

Don't use quad_t on FreeBSD (deprecated) so use "long long" instead.
Someday this should be converted to uint64_t and printstate.c changed to
use those horrid PRiud64 things.


145582 27-Apr-2005 darrenr

The current H.323 proxy source has a license that isn't suitable for inclusion
with FreeBSD so we shouldn't be trying to include it here.


145579 27-Apr-2005 darrenr

- Comment out duplicate rcsid strings in *.c files
- Move SIOCPROXY from ip_nat.h to ip_proxy.h and fix ip_proxy.h so that it
can be easily compiled into kdump, et al.


145562 26-Apr-2005 darrenr

Add an include for netinet/ip_compat.h directly so that we don't need to
add another special file in the creation of ioctls.c for kdump.


145522 25-Apr-2005 darrenr

Merge the changes from 3.4.35 to 4.1.8 into the kernel source tree


145517 25-Apr-2005 darrenr

This commit was generated by cvs2svn to compensate for changes in r145516,
which included commits to RCS files with non-trunk default branches.


145398 22-Apr-2005 glebius

Fix error in synproxy connection completion. Source and
destination windows were confused, one instead of other.
This error was masked, because first segment of just
established connection is usually smaller than initially
announced window, and it was successfully passed. First
window reannouncement corrected erroneous 'seqhi' value.
The error showed up when client connected to synproxy
with zero initial window, and reannounced it after
session establishment.

In collaboration with: dhartmei [we came to same patch independtly]
Reviewed by: mlaier
Sponsored by: Rambler
MFC after: 3 days


145142 16-Apr-2005 rwatson

Modify the alq(9) alq_open() API to accept a file creation mode, rather
than defaulting the cmode argument to vn_open() to 0. Supply a default
argument of ALQ_DEFAULT_CMODE (0600) in current callers.

Discussed with/pointed out by: hmp
Reveiwed by: jeff, hmp
MFC after: 3 days


145030 13-Apr-2005 glebius

Fix mss byte order, only affects synproxy code path.

Submitted by: John L. Scarfone via OpenBSD
Reviewed by: mlaier
Obtained from: OpenBSD, rev. 1.483
MFC after: 2 days


143440 12-Mar-2005 obrien

This commit was generated by cvs2svn to compensate for changes in r143439,
which included commits to RCS files with non-trunk default branches.


142988 02-Mar-2005 scottl

Move all of the hptmv files to /sys/dev/hptmv so that they won't be mistaken
for being on a CVS vendor branch. The files were moved via a repo-copy.


142731 28-Feb-2005 obrien

Add FreeBSD ID.


142720 27-Feb-2005 phk

Use dynamic major number allocation.


142409 25-Feb-2005 sam

avoid sneaky double free

Noticed by: Coverity Prevent analysis tool
Reviewed by: scottl


142201 22-Feb-2005 green

Do not fail to initialize callouts (on SMP only) -- it leads to crashing.


142179 21-Feb-2005 mlaier

Fix a terrible braino in pfi_maybe_destroy() and unbreak "$pfctl -Fall" with
renamed interfaces.

PR: kern/77645
Reported by: Harald Schmalzbauer <harryNOschmalzbauerSPAMde>
Reviewed by: yongari
MFC after: 3 days


142178 21-Feb-2005 mlaier

Don't use the static CALLOUT_INITIALIZER for __FreeBSD_version >= 600000. It
was a bad idea, but since it is done like this in the vendor source we keep
it around for older versions. As a safe guard against future misuse we don't
even define CALLOUT_INITIALIZER anymore.

This fixes ALTQ after callout_init_mtx() and takes altq_var.h off the vendor
branch.

Submitted by: Divacky Roman <xdivac02NOstud.fit.vutbrSPAMcz> (w/ changes)


142006 17-Feb-2005 yongari

Fix inteface clear time. pf printed "Thu Jan 1 09:00:01 1970"
in "pfctl -vvsI" output when pf was statically linked to kernel.

Discussed with: mlaier


141584 09-Feb-2005 mlaier

Access softc embedded struct ifnet via function macro to make it easier to
untangle struct ifnet and softc/arpcom in the future.

Requested by: brooks


141219 03-Feb-2005 mdodd

- Split out PCI support.
- Add previously removed ISA support.

Submitted by: David S. Madole <david AT madole.net>


140518 20-Jan-2005 dhartmei

Use the packet's address family instead of the rule's when selecting a
replacement address for an rdr rule. Some rdr rules have no address family
(when the replacement is a table and no other criterion implies one AF).
In this case, pf would fail to select a replacement address and drop the
packet due to translation failure.

Found by: Gustavo A. Baratto


140494 19-Jan-2005 dhartmei

Prohibit ruleset changes at securelevel > 2, not > 1. It's documented
like this in init(8), but the code didn't match the documentation.

Submitted by: Juraj Lutter <otis at sk dot FreeBSD dot org>
Agrees: mlaier


140217 14-Jan-2005 njl

This commit was generated by cvs2svn to compensate for changes in r140216,
which included commits to RCS files with non-trunk default branches.


140095 12-Jan-2005 njl

This commit was generated by cvs2svn to compensate for changes in r140094,
which included commits to RCS files with non-trunk default branches.


139894 08-Jan-2005 darrenr

Elminate 1 LOR (actually a recursive mutex grab) involving ipfilter where
we loop through all the list of NICs (struct ifnet), holding the lock on
it and then do a name lookup with ifunit() whilst holding it.


139327 26-Dec-2004 darrenr

* Remove some code that's in a #ifndef FreeBSD that's no longer used.


139326 26-Dec-2004 darrenr

* The #ifdef's to cause mutex's for freebsd to be declared were meant to pick
up on USE_MUTEX being defined, but this patch
* Remove some code that's in a #ifndef FreeBSD that's no longer used.


139284 25-Dec-2004 scottl

Darnit, through a maze of twisty passages, ipfilter needs to have PFIL_HOOKS
defined. Revert part of the previous commit to fix this.


139282 25-Dec-2004 scottl

Sprinkle in some __FreeBSD_version checks so that this compiles again. Don't
define PFIL_HOOKS anymore.

Submitted by: keramida


139255 24-Dec-2004 darrenr

Enable fine grained locking within IPFilter, using mtx(9) and sx(9) allowing
the the "needs giant" flag to be removed from the driver.


139045 19-Dec-2004 dhartmei

Initialise init_addr in pf_map_addr() in the PF_POOL_ROUNDROBIN,
prevents a possible endless loop in pf_get_sport() with 'static-port'

ICMP state entries use the ICMP ID as port for the unique state key. When
checking for a usable key, construct the key in the same way. Otherwise,
a colliding key might be missed or a state insertion might be refused even
though it could be inserted. The second case triggers the endless loop,
possibly allowing a NATed LAN client to lock up the kernel.

PR: kern/74930
Reported and tested by: Hugo Silva, Srebrenko Sehic
MFC after: 3 days


139005 18-Dec-2004 mlaier

Make ip_nat compile again. Should read #if->n<-def LARGE_NAT as in ipf 4.x


138979 17-Dec-2004 darrenr

Move two variables that are unused if LARGE_NAT is defined inside an #ifdef
to keep them out of harms way when compiling.

PR: 72783


138947 17-Dec-2004 darrenr

Allow ipnat redirect rules to work for non-TCP/UDP packets.

PR: 70038
Submitted by: fming@borderware.com
Reviewed by: darrenr
Obtained from: fming@borderware.com


138928 16-Dec-2004 darrenr

Using just m_pullup to get all of the interesting bits in packet into one
buffer doesn't work for ipv6 packets, so use m_defrag() here instead as an
easy drop-in replacement.

PR: 70399


138666 10-Dec-2004 mlaier

Compile pfsync w/o bpf.

Noticed by: "Jayel Villamin" <jarthel operamail com>


138589 08-Dec-2004 sam

clear old files now in public


138587 08-Dec-2004 sam

resolve merge conflict


138584 08-Dec-2004 sam

This commit was generated by cvs2svn to compensate for changes in r138583,
which included commits to RCS files with non-trunk default branches.


138387 05-Dec-2004 dhartmei

IPv6 packets can contain headers (like options) before the TCP/UDP/ICMP6
header. pf finds the first TCP/UDP/ICMP6 header to filter by traversing
the header chain. In the case where headers are skipped, the protocol
checksum verification used the wrong length (included the skipped headers),
leading to incorrectly mismatching checksums. Such IPv6 packets with
headers were silently dropped.

Discovered by: Bernhard Schmidt
MFC after: 1 week


138299 02-Dec-2004 marks

This commit was generated by cvs2svn to compensate for changes in r138298,
which included commits to RCS files with non-trunk default branches.


138297 02-Dec-2004 marks

This commit was generated by cvs2svn to compensate for changes in r138296,
which included commits to RCS files with non-trunk default branches.


138295 01-Dec-2004 marks

Local change: Remove warnings from vendor files.

Approved by: njl
MFC after: 1 week


138294 01-Dec-2004 marks

Local change: In the resume path, give up after waiting for a while
for WAK_STS to be set. Some BIOSs never set it.

Approved by: njl
MFC after: 1 week


138293 01-Dec-2004 marks

Local change: Put various debugging options under ACPI_DISASSEMBLER.

Approved by: njl
MFC after: 1 week


138292 01-Dec-2004 marks

Unchanged files that are off the vendor branch.

Approved by: njl
MFC after: 1 week


138288 01-Dec-2004 marks

This commit was generated by cvs2svn to compensate for changes in r138287,
which included commits to RCS files with non-trunk default branches.


138041 24-Nov-2004 dhartmei

fix a bug that leads to a crash when binat rules of the form
'binat from ... to ... -> (if)' are used, where the interface
is dynamic.

Discovered by: kos(at)bastard(dot)net
Analyzed by: Pyun YongHyeon
Approved by: mlaier (mentor)
MFC after: 1 week


137413 08-Nov-2004 ru

Removed the remnants of gx(4).


137159 03-Nov-2004 mlaier

Improved interface handling. This should fix the use of renamed interfaces
(ifconfig xl0 name foo) as well as some special interfaces such as the 6to4
tunnel.

Reported by: Ed Schouten <ed (at) il ! fontys , nl>
Tested by: freebsd-pf
PR: kern/72444
MFC after: 3 weeks


136925 24-Oct-2004 mlaier

Fix a panic discovered with some apache2 configure test (that seemed to
trigger a socket creation race some some kind). Checking for non-NULL socket
and credential is not a bad idea anyway. Unfortunatly too late for the
release.

Reported & tested by: Gilbert Cao
MFC after: 2 weeks


136862 24-Oct-2004 scottl

Fix some warnings that only triggered in LINT.


136857 24-Oct-2004 scottl

Embed the correct name.


136849 24-Oct-2004 scottl

Import the HighPoint RocketRAID 182x driver. Thanks to HighPoint for
providing the original driver, and thanks to IronSystems for providing
hardware for testing.


135920 29-Sep-2004 mlaier

Add an additional struct inpcb * argument to pfil(9) in order to enable
passing along socket information. This is required to work around a LOR with
the socket code which results in an easy reproducible hard lockup with
debug.mpsafenet=1. This commit does *not* fix the LOR, but enables us to do
so later. The missing piece is to turn the filter locking into a leaf lock
and will follow in a seperate (later) commit.

This will hopefully be MT5'ed in order to fix the problem for RELENG_5 in
forseeable future.

Suggested by: rwatson
A lot of work by: csjp (he'd be even more helpful w/o mentor-reviews ;)
Reviewed by: rwatson, csjp
Tested by: -pf, -ipfw, LINT, csjp and myself
MFC after: 3 days

LOR IDs: 14 - 17 (not fixed yet)


135615 23-Sep-2004 mlaier

Protect sockaddr_union definitions with a protecting define. This allows to
build kernels with FAST_IPSEC and PF. This is the least disruptive fix.

PR: kern/71836
Reviewed by: bms, various mailing lists
MFC after: 3 days


135352 17-Sep-2004 mlaier

Break out altq_enable/disable from DIOC{START,STOP}ALTQ into seprate
functions that can be called from enable/disable pf as well. This improves
switching from non-altq ruleset to altq ruleset (and the other way 'round)
by a great deal and makes pfctl act like the user would except it to.

PR: kern/71746
Tested by: Aurilien "beorn" Rougemont (PR submitter)
MFC after: 3 days


135215 14-Sep-2004 mlaier

Reactivate skipping over bogus IPCP addresses on ppp interfaces. Be more
careful with the skip condition this time. Addresses are only not taken into
account if:
- The interface is POINTTOPOINT
- There is no route installed for the address
- The user specified noalias (:0)
and - We are looking at an IPv4 address.

This should be enough paranoia to not cause any false positives.

PR: misc/69954
Discussed with: yongari
MFC after: 4 days


135196 14-Sep-2004 mlaier

Move pf* init from SI_SUB_PSEUDO to SI_SUB_PROTO_IFATTACHDOMAIN where it is
save to call if_attachdomain from if_attach() (as done for if_loop.c). We
will now end up with a properly initialized if_afdata array and the nd6
callout will no longer try to deref a NULL pointer.

Still this is a temp workaround and the locking for if_afdata should be
revisited at a later point.

Requested by: rwatson
Discussed with and tested by: yongari (a while ago)
PR: kern/70393
MFC after: 5 days


135078 11-Sep-2004 mlaier

One more round on the H/W supported checksum code: Fix NICs that can't do
the pseudo header. We really need the TCP packet length here. This happens
to end up in ip->ip_len in tcp_input.c, but here we should get it from the
len function variable instead.

Submitted by: yongari
Tested by: Nicolas Linard, yongari (sparc64 + hme)
MFC after: 5 days


134402 27-Aug-2004 andre

From __FreeBSD_version 600001 on PFIL_HOOKS is permanently in the kernel and
doesn't require to include opt_pfil_hooks.h.


134166 22-Aug-2004 mlaier

Use securelevel_gt instead of reading global securelevel unprotected.

Submitted by: yongari
MFC after: 3 days


133932 18-Aug-2004 njl

This commit was generated by cvs2svn to compensate for changes in r133931,
which included commits to RCS files with non-trunk default branches.


133872 16-Aug-2004 mlaier

Comment out rev. 1.4 after problems w/ IPv6, a better solution must be
found.


133720 14-Aug-2004 dwmalone

Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD
have already done this, so I have styled the patch on their work:

1) introduce a ip_newid() static inline function that checks
the sysctl and then decides if it should return a sequential
or random IP ID.

2) named the sysctl net.inet.ip.random_id

3) IPv6 flow IDs and fragment IDs are now always random.
Flow IDs and frag IDs are significantly less common in the
IPv6 world (ie. rarely generated per-packet), so there should
be smaller performance concerns.

The sysctl defaults to 0 (sequential IP IDs).

Reviewed by: andre, silby, mlaier, ume
Based on: NetBSD
MFC after: 2 months


133705 14-Aug-2004 rwatson

Since if_oltr doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.


133577 12-Aug-2004 mlaier

Loopback fix from Mathieu Sauve-Frankel:
Add missing check for NULL in DIOCCHANGERULE. This prevents a crash
in certain rare cases.


133574 12-Aug-2004 mlaier

Loopback fix from Daniel Hartmeier:
pf_cksum_fixup() was called without last argument from
normalization, also fixup checksum when random-id modifies ip_id.
This would previously lead to incorrect checksums for packets
modified by scrub random-id.

(Originally) Submitted by: yongari


133573 12-Aug-2004 mlaier

Loopback fix from Henning Brauer:
skip over interface addresses without IFA_ROUTE, fixes some issue
with pppd

PR: misc/69954


133495 11-Aug-2004 harti

Exclusion list for easier import.


133493 11-Aug-2004 harti

This commit was generated by cvs2svn to compensate for changes in r133492,
which included commits to RCS files with non-trunk default branches.


133181 05-Aug-2004 mlaier

Use in_cksum_skip() to calculate in4_cksum instead of doing handrolled magic
(that does not compile with !gcc). Moreover we get the benefit for all archs
that have a hand optimized in_cksum_skip().

Submitted by: yongari
Tested by: me (i386, extensivly), pf4freebsd ML (various)


132767 28-Jul-2004 kan

Initialize s variable early to shut up GCC warnings.
Do not declare inline functions without body as this is useless in
general and generates a warning with GCC 3.4.x.

Glanced over by: dhartmei


132567 23-Jul-2004 mlaier

Fix the following LOR on pf module unload:
1st ifnet (ifnet) @/usr/src/sys/contrib/pf/net/pf_if.c:191
2nd pf task mtx (pf task mtx) @/usr/src/sys/contrib/pf/net/pf_if.c:197

Reported by: Pyun YongHyeon (a long time ago)


132566 23-Jul-2004 mlaier

Refine pf_check_proto_cksum() a bit in order to avoid additional in_pseudo()
calls further down the stack. If we find the cksum to be okay we pretend
that the hardware did all the work and hence keep the upper layers from
checking again.

Submitted by: Pyun YongHyeon


132350 18-Jul-2004 mlaier

Fix a stupid attemp to apply host arithmetics to network byte ordered data.
This fixes checksum for some drivers with partial H/W ckcsum offloads.

Reported by: Simon 'corecode' Schubert, Devon H. O'Dell, hmp
Reviewed by: Pyun YongHyeon


132321 18-Jul-2004 mlaier

m_tag_copy takes an additional "how" parameter in FreeBSD.

Submitted by: rwatson


132303 17-Jul-2004 mlaier

Merge in a stable fix from OpenBSD:
MFC:
Fix by dhartmei@

change pf_route() loop detection: introduce a counter (number of times
a packet is routed already) in the mbuf tag, allow at most four times.
Fixes some legitimate cases broken by the previous change.

Reviewed by: dhartmei


132280 17-Jul-2004 mlaier

Define semantic of M_SKIP_FIREWALL more precisely, i.e. also pass associated
icmp_error() packets. While here retire PACKET_TAG_PF_GENERATED (which
served the same purpose) and use M_SKIP_FIREWALL in pf as well. This should
speed up things a bit as we get rid of the tag allocations.

Discussed with: juli


132113 13-Jul-2004 phk

Send the fla driver in the Attic


131974 11-Jul-2004 darrenr

Clean up a bunch of white-space difference with IPFilter source as well as
remove some superfluous assignments for .d_version/.d_flags in a cdevsw
structure initialisation that never sees the light of day in FreeBSD.


131827 08-Jul-2004 harti

This commit was generated by cvs2svn to compensate for changes in r131826,
which included commits to RCS files with non-trunk default branches.


131445 02-Jul-2004 marks

Local change: Allow access to the field if it is within the region
size rounded up to a multiple of the access byte width. This overcomes
"off-by-one" programming errors in the AML often found in Toshiba
laptops.


131444 02-Jul-2004 marks

Local diff: allow use of the disassembler.


131443 02-Jul-2004 marks

Unchanged files that are off the vendor branch.


131441 02-Jul-2004 marks

This commit was generated by cvs2svn to compensate for changes in r131440,
which included commits to RCS files with non-trunk default branches.


131262 29-Jun-2004 darrenr

Mess from update & merge - don't release the ifnet lock twice, just once
and after we're finished with it.


130933 22-Jun-2004 brooks

Major overhaul of pseudo-interface cloning. Highlights include:

- Split the code out into if_clone.[ch].
- Locked struct if_clone. [1]
- Add a per-cloner match function rather then simply matching names of
the form <name><unit> and <name>.
- Use the match function to allow creation of <interface>.<tag>
vlan interfaces. The old way is preserved unchanged!
- Also the match function to allow creation of stf(4) interfaces named
stf0, stf, or 6to4. This is the only major user visible change in
that "ifconfig stf" creates the interface stf rather then stf0 and
does not print "stf0" to stdout.
- Allow destroy functions to fail so they can refuse to delete
interfaces. Currently, we forbid the deletion of interfaces which
were created in the init function, particularly lo0, pflog0, and
pfsync0. In the case of lo0 this was a panic implementation so it
does not count as a user visiable change. :-)
- Since most interfaces do not need the new functionality, an family of
wrapper functions, ifc_simple_*(), were created to wrap old style
cloner functions.
- The IF_CLONE_INITIALIZER macro is replaced with a new incompatible
IFC_CLONE_INITIALIZER and ifc_simple consumers use IFC_SIMPLE_DECLARE
instead.

Submitted by: Maurycy Pawlowski-Wieronski <maurycy at fouk.org> [1]
Reviewed by: andre, mlaier
Discussed on: net


130911 22-Jun-2004 darrenr

revert section of code that calls netisr_queue() to match v1.33 of this file


130910 22-Jun-2004 darrenr

#ifdef's for FreeBSD are wrong, causing too many variable declaractions to
disappear.


130898 22-Jun-2004 darrenr

one too many #endif's from the update broke the build


130886 21-Jun-2004 darrenr

Update ipfilter from 3.4.31 -> 3.4.35. Some important changes:
* block packets that fail to create state table entries
* only allow non-fragmented packets to influence whether or not a logged
packet is the same as the one logged before.
* correct the ICMP packet checksum fixing up when processing ICMP errors for NAT
* implement a maximum for the number of entries in the NAT table (NAT_TABLE_MAX
and ipf_nattable_max)
* frsynclist() wasn't paying attention to all the places where interface
names are, like it should.
* fix comparing ICMP packets with established TCP state where only 8 bytes
of header are returned in the ICMP error.

MFC after: 1 week


130680 18-Jun-2004 phk

Add missing <sys/module.h> include.

Approved by: sam


130639 17-Jun-2004 mlaier

Import two fixes from the OpenBSD stable branch:
- prevent an endless loop with route-to lo0, fixes PR 3736 (dhartmei@)
- The rule_number parameter for pf_get_pool() needs to be 32 bits, not 8 -
this fixes corruption of the address pools with large rulesets.
(mcbride@, pb@)

Reviewed-by: dhartmei


130613 16-Jun-2004 mlaier

Commit pf version 3.5 and link additional files to the kernel build.

Version 3.5 brings:
- Atomic commits of ruleset changes (reduce the chance of ending up in an
inconsistent state).
- A 30% reduction in the size of state table entries.
- Source-tracking (limit number of clients and states per client).
- Sticky-address (the flexibility of round-robin with the benefits of
source-hash).
- Significant improvements to interface handling.
- and many more ...


130611 16-Jun-2004 mlaier

This commit was generated by cvs2svn to compensate for changes in r130610,
which included commits to RCS files with non-trunk default branches.


130585 16-Jun-2004 phk

Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.


130550 15-Jun-2004 mlaier

Disable "bulk dequeue" when enabling ALTQ so it does not irritate the
timing.


130508 15-Jun-2004 mlaier

Transform tbr_dequeue into a function pointer in order to build drivers with
ALTQ enabled versions of IFQ_* macros by default, as requested by serveral
others. This is a follow-up to the quick fix I committed yesterday which
turned off the ALTQ checks for non-ALTQ kernels.


130475 14-Jun-2004 mlaier

Remove some more leftover from the old pfaltq_module hack to allow for
kernels w/ pf, but w/o altq.

Reported-by: Xin LI


130440 13-Jun-2004 mlaier

#if out an old leftover in the KAME code. opt_cpu.h is no longer useful here
and breaks build on some arch.

Found-by: tinderbox


130397 13-Jun-2004 mlaier

Prepare pf for building with ALTQ:
- remove old pfaltq module linkage
- move pfaltq_running to pf_ioctl.c It is protected by PF_LOCK()


130384 12-Jun-2004 mlaier

Add an additional queue which will be "owned by the driver". This allows to
rig a PREPEND macro for ALTQ as the POLL/DEQUEUE semantic is very bad in
terms of locking. We make this a full functional queue to allow "bulk
dequeue" which will further reduce the locking overhead (for non-altq
enabled devices). Drivers will access this via the following macros, which
will show up in <net/if_var.h> once we expose ALTQ to the build:

IFQ_DRV_DEQUEUE(ifq, m) - takes a mbuf off the queue (driver queue first)
IFQ_DRV_PREPEND(ifq, m) - pushes a mbuf back to the driver queue
IFQ_DRV_PURGE(ifq) - drops all packets in both queues
IFQ_DRV_IS_EMPTY(ifq) - checks for pending mbufs in either queue

One has to make sure that the first three are protected by a driver mutex.
At the moment most network drivers still require Giant, so this is not an
issue. Even those that have thier own mutex usually hold it in if_start and
the like, so this requirement is almost always satisfied.

This evolved from a discussion with Andrew Gallatin.


130368 12-Jun-2004 mlaier

FreeBSD-ify ALTQ:
- add locking
- disable ALTQ3_COMPAT by default (do not remove the code to keep the diff
towards KAME small)
- put some more code under ALTQ3 conditional compilation as it should be
- account for if_xname
- some more minor compile fixes

As people started wondering:
The strange path layout "altq/altq" is there to avoid "-Isys/contrib" and
make it "-Isys/contrib/altq" instead, as we will need at least <altq/altq.h>
and <altq/if_altq.h> for kernel compilation.

The "freebsd4_..." in the privious commit is just the best tag name in the
KAME tree I could find to classify this in order to track its history. It
does *not* mean that this will go to 4-STABLE or anything of that kind.


130366 12-Jun-2004 mlaier

This commit was generated by cvs2svn to compensate for changes in r130365,
which included commits to RCS files with non-trunk default branches.


130253 08-Jun-2004 darrenr

Recognise NOINET6 as an indication to not build IPv6 enabled source even
if FreeBSD header files, etc, support it.

Submitted by: Sergey Mokryshev <mokr@mokr.net>


129907 31-May-2004 mlaier

"Get rid of the nested include of <sys/module.h> from <sys/kernel.h>" or
better do no longer depend on it.

Requested-by: phk
Approved-by: bms(mentor)


129882 30-May-2004 phk

Add missing #include <sys/module.h>


129695 25-May-2004 njl

This commit was generated by cvs2svn to compensate for changes in r129694,
which included commits to RCS files with non-trunk default branches.


129691 25-May-2004 njl

Local change: allow usermode to compile this header. Submitted to vendor.


129690 25-May-2004 njl

Local change: don't hang forever if WAK_STS is never set.


129689 25-May-2004 njl

Local change: remove warnings.


129688 25-May-2004 njl

Local diff: allow use of the disassembler.


129687 25-May-2004 njl

Unchanged files that are off the vendor branch.


129685 25-May-2004 njl

This commit was generated by cvs2svn to compensate for changes in r129684,
which included commits to RCS files with non-trunk default branches.


129060 09-May-2004 marcel

This commit was generated by cvs2svn to compensate for changes in r129059,
which included commits to RCS files with non-trunk default branches.


128978 05-May-2004 njl

Add sys/types.h for both kernel and user compiles.


128846 02-May-2004 dhartmei

Commit three imported bugfixes from OpenBSD 3.4-stable:

- change pf_get_pool() argument rule_number type from u_int32_t
to u_int8_t, fixes corruption of address pools with large
rulesets (mcbride@)
- prevent endless loops with route-to (dhartmei@)
- limit option length to 2 octets max (frantzen@)

Obtained from: OpenBSD
Approved by: mlaier(mentor), bms(mentor)


128255 14-Apr-2004 njl

Remove warnings from vendor files. This takes some files off the vendor
branch but they have indicated they will not fix these warnings.


128246 14-Apr-2004 njl

Even though the patch has been submitted to the vendor, this file is off
the vendor branch. Once more, with feeling!


128218 14-Apr-2004 njl

Check in files with local changes:

* In the resume path, give up after waiting for a while
for WAK_STS to be set. Some BIOSs never set it.

* Allow access to the field if it is within the region size rounded
up to a multiple of the access byte width. This overcomes "off-by-one"
programming errors in the AML often found in Toshiba laptops.


128216 14-Apr-2004 njl

Check in unmodified files off the vendor branch.


128213 14-Apr-2004 njl

This commit was generated by cvs2svn to compensate for changes in r128212,
which included commits to RCS files with non-trunk default branches.


128211 14-Apr-2004 njl

Add another cleanfile for future imports.


128209 14-Apr-2004 brooks

Staticize <if>_clone_{create,destroy} functions.

Reviewed by: mlaier


128129 11-Apr-2004 mlaier

Commit import of OpenBSD-stable fix:

Fix by dhartmei@ and mcbride@
1.433
Properly m_copyback() modified TCP sequence number after demodulation
1.432
Fix icmp checksum when sequence number modlation is being used.
Also fix a daddr vs saddr cut-n-paste error in ICMP error handling.

Fixes PR 3724

Obtained from: OpenBSD
Reviewed by: dhartmei
Approved by: rwatson


128019 07-Apr-2004 imp

Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson


127900 05-Apr-2004 njl

Unbreak the bootloader build by excluding ctype.h.

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>


127874 05-Apr-2004 njl

Add #include for ctype.h to cover strupr() in the !_KERNEL case.

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>


127629 30-Mar-2004 mlaier

Shut up a couple of annoying gcc warnings. Do not enclose the fixes with
#ifdefs in order to loop it back to OpenBSD after the next import. There are
a some implicit asserts involved which might be better spelled out
explicitly (af == AF_INET ...)

Approved by: bms(mentor)


127585 29-Mar-2004 imp

Eliminate support for FreeBSD 3.x and earlier now that we're in the
glide path for the 5.x branch.


127531 28-Mar-2004 mlaier

Commit two fixes from OpenBSD's stable branch:
- Fix binat for incoming connections when a netblock (not just a single
address) is used for source in the binat rule. closes PR 3535, reported by
Karl O.Pinc. ok henning@, cedric@

- Fix a problem related to empty anchor rulesets, which could cause a kernel
panic.

Approved by: bms(mentor)


127313 22-Mar-2004 njl

Revert 1.22. Go back to "FreeBSD" as our _OS value. Since we now support
_OSI, we can claim compatibility with MS products without claiming to BE
one. :-)


127178 18-Mar-2004 njl

Check in files off the vendor branch as well as files with local patches.


127176 18-Mar-2004 njl

This commit was generated by cvs2svn to compensate for changes in r127175,
which included commits to RCS files with non-trunk default branches.


127145 17-Mar-2004 mlaier

Style(9) round for the pf kernel parts. Mostly #if defined() -> #ifdef

Also set HOOK_HACK to true (remove the related #ifdef's) as we have the
hooks in the kernel this was missed during the merge from the port.

Noticed by: Amir S. (for the HOOK_HACK part)
Approved by: bms(mentor)


127135 17-Mar-2004 njl

Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde


126812 10-Mar-2004 mlaier

Remove `$Name$' leftovers from the port version reporting.

Noticed by: Craig Rodrigues
Approved by: bms(mentor)


126577 04-Mar-2004 njl

Part 2 of Project Evil: Pretend to be Windows 2000 for buggy ASL that
always expects to be running on some MS OS. A survey of ASL shows that
this is the 2nd most common expected OS value. (1st is Win98 and we don't
emulate its buggy ACPI support.) Our ACPI support is similar to Win2k,
also. Put this behavior under ACPICA_PEDANTIC so we can get back to our
previous behavior for OSV testing.


126521 03-Mar-2004 njl

This commit was generated by cvs2svn to compensate for changes in r126520,
which included commits to RCS files with non-trunk default branches.


126409 29-Feb-2004 mlaier

Remove __inline keyword from functions that can't be inlined according to
LINT. This fixes LINT compliation for now, but needs to be revised.
Changes do not affect the objects.

Approved by: bms(mentor)


126382 28-Feb-2004 njl

Strip out new, unused file acnetbsd.h


126381 28-Feb-2004 njl

This commit was generated by cvs2svn to compensate for changes in r126380,
which included commits to RCS files with non-trunk default branches.


126379 28-Feb-2004 njl

Local change: emulate a ReturnOp if the AML expects one but it isn't
present. Some buggy BIOSs do not have a ReturnOp even though it is
required for a function to return a value.


126378 28-Feb-2004 njl

Local change: In the resume path, give up after waiting for a while
for WAK_STS to be set. Some BIOSs never set it.


126377 28-Feb-2004 njl

Local change: Allow access to the field if it is within the region
size rounded up to a multiple of the access byte width. This overcomes
"off-by-one" programming errors in the AML often found in Toshiba
laptops.


126376 28-Feb-2004 njl

Local change: Put various debugging options under ACPI_DISASSEMBLER.


126375 28-Feb-2004 njl

Unchanged files from ACPICA 20040220 that are off the vendor branch.


126373 28-Feb-2004 njl

This commit was generated by cvs2svn to compensate for changes in r126372,
which included commits to RCS files with non-trunk default branches.


126263 26-Feb-2004 mlaier

Tweak existing header and other build infrastructure to be able to build
pf/pflog/pfsync as modules. Do not list them in NOTES or modules/Makefile
(i.e. do not connect it to any (automatic) builds - yet).

Approved by: bms(mentor)


126261 26-Feb-2004 mlaier

Bring diff from the security/pf port. This has code been tested as a port
for a long time and is run in production use. This is the code present in
portversion 2.03 with some additional tweaks.

The rather extensive diff accounts for:
- locking (to enable pf to work with a giant-free netstack)
- byte order difference between OpenBSD and FreeBSD for ip_len/ip_off
- conversion from pool(9) to zone(9)
- api differences etc.

Approved by: bms(mentor) (in general)


126259 26-Feb-2004 mlaier

This commit was generated by cvs2svn to compensate for changes in r126258,
which included commits to RCS files with non-trunk default branches.


126080 21-Feb-2004 phk

Device megapatch 4/6:

Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.


125975 18-Feb-2004 phk

Change the disk(9) API in order to make device removal more robust.

Previously the "struct disk" were owned by the device driver and this
gave us problems when the device disappared and the users of that device
were not immediately disappearing.

Now the struct disk is allocate with a new call, disk_alloc() and owned
by geom_disk and just abandonned by the device driver when disk_create()
is called.

Unfortunately, this results in a ton of "s/\./->/" changes to device
drivers.

Since I'm doing the sweep anyway, a couple of other API improvements
have been carried out at the same time:

The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to
DISKFLAG_NEEDSGIANT

A version number have been added to disk_create() so that we can detect,
report and ignore binary drivers with old ABI in the future.

Manual page update to follow shortly.


124529 14-Jan-2004 njl

This commit was generated by cvs2svn to compensate for changes in r124528,
which included commits to RCS files with non-trunk default branches.


124121 04-Jan-2004 njl

This commit was generated by cvs2svn to compensate for changes in r124120,
which included commits to RCS files with non-trunk default branches.


123333 09-Dec-2003 njl

Changes to the import script to handle the compiler/debugger import.


123332 09-Dec-2003 njl

This commit was generated by cvs2svn to compensate for changes in r123331,
which included commits to RCS files with non-trunk default branches.


123330 09-Dec-2003 njl

This commit was generated by cvs2svn to compensate for changes in r123329,
which included commits to RCS files with non-trunk default branches.


123328 09-Dec-2003 njl

This commit was generated by cvs2svn to compensate for changes in r123327,
which included commits to RCS files with non-trunk default branches.


123324 09-Dec-2003 njl

Unchanged files that are off the vendor branch.


123323 09-Dec-2003 njl

Local change: In the resume path, give up after waiting for a while
for WAK_STS to be set. Some BIOSs never set it.


123322 09-Dec-2003 njl

Import for 20031203 file off vendor branch.


123321 09-Dec-2003 njl

Local change: emulate a ReturnOp if the AML expects one but it isn't
present. Some buggy BIOSs do not have a ReturnOp even though it is
required for a function to return a value.


123320 09-Dec-2003 njl

Local change: Allow access to the field if it is within the region
size rounded up to a multiple of the access byte width. This overcomes
"off-by-one" programming errors in the AML often found in Toshiba
laptops.


123319 09-Dec-2003 njl

Local change: Put various debugging options under ACPI_DISASSEMBLER.


123318 09-Dec-2003 njl

Unchanged files that are off the vendor branch.


123316 09-Dec-2003 njl

This commit was generated by cvs2svn to compensate for changes in r123315,
which included commits to RCS files with non-trunk default branches.


123203 07-Dec-2003 sam

This commit was generated by cvs2svn to compensate for changes in r123202,
which included commits to RCS files with non-trunk default branches.


123108 02-Dec-2003 brooks

Use parens more reasionably so we match the vendor code. This is part
of the if_xname change.

Submitted by: darrenr
Approved by: re (scottl)


123042 29-Nov-2003 sam

This commit was generated by cvs2svn to compensate for changes in r123041,
which included commits to RCS files with non-trunk default branches.


122949 22-Nov-2003 njl

Commit rev 1.1.1.20 to HEAD. This file was off the vendor branch and thus
the changes need to be made to HEAD.

Approved by: re (previously)


122946 21-Nov-2003 njl

This commit was generated by cvs2svn to compensate for changes in r122945,
which included commits to RCS files with non-trunk default branches.


122209 07-Nov-2003 harti

This commit was generated by cvs2svn to compensate for changes in r122208,
which included commits to RCS files with non-trunk default branches.


122207 07-Nov-2003 harti

These two files are generated with the ../genfiles script and are
not part of the imported distribution.


122206 07-Nov-2003 harti

This commit was generated by cvs2svn to compensate for changes in r122205,
which included commits to RCS files with non-trunk default branches.


122138 05-Nov-2003 njl

This commit was generated by cvs2svn to compensate for changes in r122137,
which included commits to RCS files with non-trunk default branches.


121937 03-Nov-2003 harti

Explain how to handle the generated files. Explain that the import
must actually be done into the netnatm sub-directory.


121936 03-Nov-2003 harti

These files are generated by the genfiles script. See FREEBSD-upgrade
for instructions how to upgrade these.


121935 03-Nov-2003 harti

This commit was generated by cvs2svn to compensate for changes in r121934,
which included commits to RCS files with non-trunk default branches.


121838 01-Nov-2003 sam

This commit was generated by cvs2svn to compensate for changes in r121837,
which included commits to RCS files with non-trunk default branches.


121816 31-Oct-2003 brooks

Replace the if_name and if_unit members of struct ifnet with new members
if_xname, if_dname, and if_dunit. if_xname is the name of the interface
and if_dname/unit are the driver name and instance.

This change paves the way for interface renaming and enhanced pseudo
device creation and configuration symantics.

Approved By: re (in principle)
Reviewed By: njl, imp
Tested On: i386, amd64, sparc64
Obtained From: NetBSD (if_xname)


121643 29-Oct-2003 marcel

This commit was generated by cvs2svn to compensate for changes in r121642,
which included commits to RCS files with non-trunk default branches.


121376 22-Oct-2003 njl

Allow access to the field if it is within the region size rounded up
to a multiple of the access byte width. This overcomes errors in the
AML often found in Toshiba laptops. These errors were allowed by
the Microsoft ASL compiler and interpreter. This will NOT be imported
by ACPI-CA so make the change on our local branch. File was already off
the vendor branch.

Submitted by: blaz
Original idea: Rick Richardson for Linux


121329 22-Oct-2003 harti

Some upgrade instructions.


121327 22-Oct-2003 harti

This commit was generated by cvs2svn to compensate for changes in r121326,
which included commits to RCS files with non-trunk default branches.


121170 17-Oct-2003 ume

use ND_IFINFO().


120926 09-Oct-2003 marcel

This commit was generated by cvs2svn to compensate for changes in r120925,
which included commits to RCS files with non-trunk default branches.


120399 24-Sep-2003 sam

o remove extraneous include of <net/pfil.h>
o guard wrapper code against user-mode compilation

Sponsored by: FreeBSD Foundation


120387 23-Sep-2003 sam

update to reflect PFIL_HOOKS api changes

Supported by: FreeBSD Foundation


120240 19-Sep-2003 njl

This commit was generated by cvs2svn to compensate for changes in r120239,
which included commits to RCS files with non-trunk default branches.


119305 22-Aug-2003 imp

Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.


118813 12-Aug-2003 njl

This commit was generated by cvs2svn to compensate for changes in r118812,
which included commits to RCS files with non-trunk default branches.


118766 11-Aug-2003 njl

This commit was generated by cvs2svn to compensate for changes in r118765,
which included commits to RCS files with non-trunk default branches.


118625 07-Aug-2003 njl

This commit was generated by cvs2svn to compensate for changes in r118624,
which included commits to RCS files with non-trunk default branches.


118618 07-Aug-2003 njl

This commit was generated by cvs2svn to compensate for changes in r118617,
which included commits to RCS files with non-trunk default branches.


118614 07-Aug-2003 njl

This commit was generated by cvs2svn to compensate for changes in r118613,
which included commits to RCS files with non-trunk default branches.


118612 07-Aug-2003 njl

This commit was generated by cvs2svn to compensate for changes in r118611,
which included commits to RCS files with non-trunk default branches.


118610 07-Aug-2003 njl

Remove the user include of ctype.h and instead include it for each utility
that uses strupr().


118600 07-Aug-2003 njl

Comment out ctype.h. It's not ok to always include in the !_KERNEL case
since the bootblocks have their own local includes. Sorry for breaking
world.


118577 07-Aug-2003 njl

Add includes to fix user-compilation of acpica. Also clarify a comment
about overriding the OS name.


118529 06-Aug-2003 bde

Broke the warning that this driver uses pessimal (u_short) types for
i/o ports by calling the implementation-detail level below inb() and
outb() instead of inb() and outb(). Unpessimizing the types is too
hard since they are mainly used in microcode.


118340 02-Aug-2003 sam

This commit was generated by cvs2svn to compensate for changes in r118339,
which included commits to RCS files with non-trunk default branches.


118119 28-Jul-2003 peter

Make this compile on 64 bit systems again. You cannot just cast a 32 bit
int to a 64 bit pointer. This file is already off the vendor branch.


117647 15-Jul-2003 njl

Fix the ACPI_DEBUG build for the non-module case. Move the #define into
acfreebsd.h and remove it from the Makefile. Now ACPI_DEBUG implies
ACPI_DISASSEMBLER.

Noticed by: marcel


117536 14-Jul-2003 njl

This commit was generated by cvs2svn to compensate for changes in r117535,
which included commits to RCS files with non-trunk default branches.


117528 13-Jul-2003 njl

This commit was generated by cvs2svn to compensate for changes in r117527,
which included commits to RCS files with non-trunk default branches.


117526 13-Jul-2003 njl

This commit was generated by cvs2svn to compensate for changes in r117525,
which included commits to RCS files with non-trunk default branches.


117524 13-Jul-2003 njl

Commit local patches for files off the vendor branch.


117523 13-Jul-2003 njl

Unmodified files from the vendor 0619 dist that should no longer be off the
vendor branch.


117522 13-Jul-2003 njl

This commit was generated by cvs2svn to compensate for changes in r117521,
which included commits to RCS files with non-trunk default branches.


117466 12-Jul-2003 marcel

This commit was generated by cvs2svn to compensate for changes in r117465,
which included commits to RCS files with non-trunk default branches.


117393 11-Jul-2003 marcel

This commit was generated by cvs2svn to compensate for changes in r117392,
which included commits to RCS files with non-trunk default branches.


116802 25-Jun-2003 sam

This commit was generated by cvs2svn to compensate for changes in r116801,
which included commits to RCS files with non-trunk default branches.


116749 23-Jun-2003 njl

This commit was generated by cvs2svn to compensate for changes in r116748,
which included commits to RCS files with non-trunk default branches.


115368 28-May-2003 njl

This commit was generated by cvs2svn to compensate for changes in r115367,
which included commits to RCS files with non-trunk default branches.


115352 27-May-2003 njl

This commit was generated by cvs2svn to compensate for changes in r115351,
which included commits to RCS files with non-trunk default branches.


115014 15-May-2003 marcel

This commit was generated by cvs2svn to compensate for changes in r115013,
which included commits to RCS files with non-trunk default branches.


114585 03-May-2003 imp

This commit was generated by cvs2svn to compensate for changes in r114584,
which included commits to RCS files with non-trunk default branches.


114457 01-May-2003 jhb

Restore local changes accidentally lost in the last import.

Reviewed by: njl


114247 29-Apr-2003 njl

Resolve conflicts.


114244 29-Apr-2003 njl

Updated import-preparation script. It now removes vendor paths from header
info. With these changes, no manual prep of the dist was necessary.


114243 29-Apr-2003 njl

Resolve conflicts


114240 29-Apr-2003 njl

This commit was generated by cvs2svn to compensate for changes in r114239,
which included commits to RCS files with non-trunk default branches.


114238 29-Apr-2003 njl

This commit was generated by cvs2svn to compensate for changes in r114237,
which included commits to RCS files with non-trunk default branches.


113799 21-Apr-2003 obrien

Explicitly declare 'int' parameters.


112946 01-Apr-2003 phk

Use bioq_flush() to drain a bio queue with a specific error code.
Retain the mistake of not updating the devstat API for now.

Spell bioq_disksort() consistently with the remaining bioq_*().

#include <geom/geom_disk.h> where this is more appropriate.


112367 18-Mar-2003 phk

Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.


112309 16-Mar-2003 mdodd

Catch up with recent infrastructure changes.


112304 15-Mar-2003 mdodd

Register module dependencies.


112302 15-Mar-2003 mdodd

G/C unused varilable.


112301 15-Mar-2003 mdodd

Catch up with recent changes.


111979 08-Mar-2003 phk

Centralize the devstat handling for all GEOM disk device drivers
in geom_disk.c.

As a side effect this makes a lot of #include <sys/devicestat.h>
lines not needed and some biofinish() calls can be reduced to
biodone() again.


111888 04-Mar-2003 jlemon

Update netisr handling; Each SWI now registers its queue, and all queue
drain routines are done by swi_net, which allows for better queue control
at some future point. Packets may also be directly dispatched to a netisr
instead of queued, this may be of interest at some installations, but
currently defaults to off.

Reviewed by: hsu, silby, jayanth, sam
Sponsored by: DARPA, NAI Labs


111815 03-Mar-2003 phk

Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by: re(scottl)


111247 22-Feb-2003 phk

NO_GEOM cleanup:

Move to "struct disk *" centric use of disk_* API.

Remove NOOP ioctl, spl*() and some debug printfs.


111119 19-Feb-2003 imp

Back out M_* changes, per decision of the TRB.

Approved by: trb


110921 15-Feb-2003 darrenr

fix bug in updating of interface pointers when resyncing state


110916 15-Feb-2003 darrenr

Commit import changed from vendor branch of ipfilter to -current head


110915 15-Feb-2003 darrenr

Commit import changed from vendor branch of ipfilter to -current head


110914 15-Feb-2003 darrenr

sometimes i hate it when you leave temp files in a directory you import from


110912 15-Feb-2003 darrenr

This commit was generated by cvs2svn to compensate for changes in r110911,
which included commits to RCS files with non-trunk default branches.


110694 11-Feb-2003 phk

Mark our struct disk with DISKFLAG_CANDELETE instead of the cdevsw with
D_CANFREE.


110232 02-Feb-2003 alfred

Consolidate MIN/MAX macros into one place (param.h).

Submitted by: Hiten Pandya <hiten@unixdaemons.com>


109623 21-Jan-2003 alfred

Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.


108172 22-Dec-2002 hsu

SMP locking for ifnet list.


107328 27-Nov-2002 iwasaki

Resolve conflicts arising from the ACPI CA 20021118 import.


107326 27-Nov-2002 iwasaki

This commit was generated by cvs2svn to compensate for changes in r107325,
which included commits to RCS files with non-trunk default branches.


106939 15-Nov-2002 sam

network interface and link layer changes:

o on input don't strip the Ethernet header from packets
o input packet handling is now done with if_input
o track changes to ether_ifattach/ether_ifdetach API
o track changes to bpf tapping
o call ether_ioctl for default handling of ioctl's
o use constants from net/ethernet.h where possible

Reviewed by: many
Approved by: re


105194 16-Oct-2002 sam

Replace aux mbufs with packet tags:

o instead of a list of mbufs use a list of m_tag structures a la openbsd
o for netgraph et. al. extend the stock openbsd m_tag to include a 32-bit
ABI/module number cookie
o for openbsd compatibility define a well-known cookie MTAG_ABI_COMPAT and
use this in defining openbsd-compatible m_tag_find and m_tag_get routines
o rewrite KAME use of aux mbufs in terms of packet tags
o eliminate the most heavily used aux mbufs by adding an additional struct
inpcb parameter to ip_output and ip6_output to allow the IPsec code to
locate the security policy to apply to outbound packets
o bump __FreeBSD_version so code can be conditionalized
o fixup ipfilter's call to ip_output based on __FreeBSD_version

Reviewed by: julian, luigi (silent), -arch, -net, darren
Approved by: julian, silence from everyone else
Obtained from: openbsd (mostly)
MFC after: 1 month


104473 04-Oct-2002 iwasaki

Resolve conflicts arising from the ACPI CA 20021002 import.


104471 04-Oct-2002 iwasaki

This commit was generated by cvs2svn to compensate for changes in r104470,
which included commits to RCS files with non-trunk default branches.


103714 20-Sep-2002 phk

(This commit touches about 15 disk device drivers in a very consistent
and predictable way, and I apologize if I have gotten it wrong anywhere,
getting prior review on a patch like this is not feasible, considering
the number of people involved and hardware availability etc.)

If struct disklabel is the messenger: kill the messenger.

Inside struct disk we had a struct disklabel which disk drivers used to
communicate certain metrics to the disklayer above (GEOM or the disk
mini-layer). This commit changes this communication to use four
explicit fields instead.

Amongst the benefits is that the fields do not get overwritten by
wrong or bogus on-disk disklabels.

Once that is clear, <sys/disk.h> which is included in the drivers
no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in,
the few places that needs them, have gotten explicit #includes for
them.

The disklabel inside struct disk is now only for internal use in
the disk mini-layer, so instead of embedding it, we malloc it as
we need it.

This concludes (modulus any mistakes) the series of disklabel related
commits.

I belive it all amounts to a NOP for all the rest of you :-)

Sponsored by: DARPA & NAI Labs.


103688 20-Sep-2002 phk

Don't call dkunit() to find our unit number, it is in our softc.

Sponsored by: DARPA & NAI Labs.


102564 29-Aug-2002 iwasaki

Fix kernel build breakage when ACPI_DEBUG option is specified.


102553 29-Aug-2002 iwasaki

Resolve conflicts arising from the ACPI CA 20020815 import.


102551 29-Aug-2002 iwasaki

This commit was generated by cvs2svn to compensate for changes in r102550,
which included commits to RCS files with non-trunk default branches.


102520 28-Aug-2002 darrenr

Finally merge in the changes from ipfilter 3.4.29 to freebsd-current.
Main changes here are related to the ftp proxy and making that work better.


102326 23-Aug-2002 archie

Don't use "NULL" when "0" is really meant.
But in this case, "-1" is really meant.

Reviewed by: darrenr


102270 22-Aug-2002 iwasaki

Prepare for importing newer version of ACPI CA.


100969 30-Jul-2002 iwasaki

Resolve conflicts arising from the ACPI CA 20020725 import.


100967 30-Jul-2002 iwasaki

This commit was generated by cvs2svn to compensate for changes in r100966,
which included commits to RCS files with non-trunk default branches.


99682 09-Jul-2002 iwasaki

Resolve conflicts arising from the ACPI CA 20020611 import.


99680 09-Jul-2002 iwasaki

This commit was generated by cvs2svn to compensate for changes in r99679,
which included commits to RCS files with non-trunk default branches.


99149 30-Jun-2002 iwasaki

Resolve conflicts arising from the ACPI CA 20020404 import.


99147 30-Jun-2002 iwasaki

This commit was generated by cvs2svn to compensate for changes in r99146,
which included commits to RCS files with non-trunk default branches.


98146 12-Jun-2002 iwasaki

- Add sanity check for argument.
- Add new entry to stripdirs. The `generate' directory appeared in
acpica-unix-20020517.


98004 07-Jun-2002 darrenr

Commit changes that happened in IPFilter versions 3.4.27 - 3.4.28


95563 27-Apr-2002 darrenr

Merge updates from 3.4.26 - 3.4.27.


95418 25-Apr-2002 darrenr

bring in changes from 3.4.26.


95416 25-Apr-2002 darrenr

This commit was generated by cvs2svn to compensate for changes in r95415,
which included commits to RCS files with non-trunk default branches.


93224 26-Mar-2002 ru

We don't need ip_ipsec_pxy.c in userland.


92720 19-Mar-2002 alfred

fix blockno printf formatting warnings.


92703 19-Mar-2002 darrenr

do not include the missing ip_h323_pxy.c


92685 19-Mar-2002 darrenr

fix conflicts (mostly damn rcs id's) generated by import


92684 19-Mar-2002 darrenr

This file is being removed pending the all clear on its licence by someone
else.


92681 19-Mar-2002 darrenr

This commit was generated by cvs2svn to compensate for changes in r92680,
which included commits to RCS files with non-trunk default branches.


92561 18-Mar-2002 dfr

Remove a couple of stray linuxisms to make this work for FreeBSD/ia64.


92394 16-Mar-2002 msmith

Merge local changes for the 20020308 ACPI CA update.


92389 16-Mar-2002 msmith

This commit was generated by cvs2svn to compensate for changes in r92388,
which included commits to RCS files with non-trunk default branches.


92387 16-Mar-2002 msmith

This commit was generated by cvs2svn to compensate for changes in r92386,
which included commits to RCS files with non-trunk default branches.


91478 28-Feb-2002 mike

Change two occurrences of HTONS() to use htons().


91441 27-Feb-2002 peter

Fix warning (unused variable)

Submitted by: LINT, -Werror


91192 24-Feb-2002 msmith

Move some debugger-only symbols around; this patch didn't make it into
the commit resolution for some reason. Fixes ACPI_DEBUG.


91119 23-Feb-2002 msmith

Resolve conflicts arising from the ACPI CA 20020217 import.


91117 23-Feb-2002 msmith

This commit was generated by cvs2svn to compensate for changes in r91116,
which included commits to RCS files with non-trunk default branches.


90380 08-Feb-2002 msmith

Add a helper script used to take an Intel-supplied ACPI CA drop and make it
ready for importing. This should save me from my own over-cleanliness.


89336 14-Jan-2002 alfred

Backout inclusion of queue.h since rev 1.38 sys/file.h now has it
included in the right order.


89316 13-Jan-2002 alfred

Include sys/_lock.h and sys/_mutex.h to reduce namespace pollution.

Requested by: jhb


88876 04-Jan-2002 darrenr

Import this patch to address user concerns.

PR: 27615
Submitted by: Andria Thomas <andria@tovaris.com>
Approved by: Me.
MFC after: 7 days


88420 22-Dec-2001 iwasaki

Add OS layer ACPI mutex and threading support.
- Temporary fix a bug of Intel ACPI CA core code.
- Add OS layer ACPI mutex support. This can be disabled by
specifying option ACPI_NO_SEMAPHORES.
- Add ACPI threading support. Now that we have a dedicate taskqueue for
ACPI tasks and more ACPI task threads can be created by specifying option
ACPI_MAX_THREADS.
- Change acpi_EvaluateIntoBuffer() behavior slightly to reuse given
caller's buffer unless AE_BUFFER_OVERFLOW occurs. Also CM battery's
evaluations were changed to use acpi_EvaluateIntoBuffer().
- Add new utility function acpi_ConvertBufferToInteger().
- Add simple locking for CM battery and temperature updating.
- Fix a minor problem on EC locking.
- Make the thermal zone polling rate to be changeable.
- Change minor things on AcpiOsSignal(); in ACPI_SIGNAL_FATAL case,
entering Debugger is easier to investigate the problem rather than panic.


87394 05-Dec-2001 guido

Fix initialisation of struct nat entry, to solve a panic that occurs
when reloading a nat table after reboot

Submitted by: Arjan de Vet <devet@devet.org>
Reviewed by: IP Filter mailing list
MFC after: 3 days


87035 28-Nov-2001 msmith

Merge local changes.

Add a fix for a minor error in the PCI routing table creation handler
where the correct size for the buffer is not returned.


87032 28-Nov-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r87031,
which included commits to RCS files with non-trunk default branches.


86632 19-Nov-2001 green

Reference lomac in its new location.


86611 19-Nov-2001 green

Use appropriaate include path for syscall_gate.h


86570 19-Nov-2001 green

Fix a license and change $Id$s to $FreeBSD$s.

Obtained from: DARPA, NAI Labs (CBOSS project)


86568 19-Nov-2001 green

This commit was generated by cvs2svn to compensate for changes in r86567,
which included commits to RCS files with non-trunk default branches.


86261 11-Nov-2001 iwasaki

Apply a local change to ACPICA.
Some BIOSes don't set WAK_STS at all,
give up waiting for wakeup if we time out.


86133 06-Nov-2001 iwasaki

Add S4BIOS sleep (BIOS hibernation) and DSDT overriding support.
- Add S4BIOS sleep implementation. This will works well if MIB
hw.acpi.s4bios is set (and of course BIOS supports it and hibernation
is enabled correctly).
- Add DSDT overriding support which is submitted by takawata originally.
If loader tunable acpi_dsdt_load="YES" and DSDT file is set to
acpi_dsdt_name (default DSDT file name is /boot/acpi_dsdt.aml),
ACPI CA core loads DSDT from given file rather than BIOS memory block.
DSDT file can be generated by iasl in ports/devel/acpicatools/.
- Add new files so that we can add our proposed additional code to Intel
ACPI CA into these files temporary. They will be removed when
similar code is added into ACPI CA officially.


85759 31-Oct-2001 msmith

Merge local changes, add new files and remove obsoleted ones.


85757 31-Oct-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r85756,
which included commits to RCS files with non-trunk default branches.


85755 31-Oct-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r85754,
which included commits to RCS files with non-trunk default branches.


84497 04-Oct-2001 msmith

Remove file obsoleted by the 20010920 snapshot.


84496 04-Oct-2001 msmith

Merge our local patches into the 20010920 snapshot. Note that the
"implicit return" hack in psparse.c was resubmitted by Iwasaki-san.

Submitted by: iwasaki


84494 04-Oct-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r84493,
which included commits to RCS files with non-trunk default branches.


84492 04-Oct-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r84491,
which included commits to RCS files with non-trunk default branches.


83380 12-Sep-2001 darrenr

IPFilter munges multicast address packets on the loopback interface.

Submitted by: Frank Zolf
Approved by: jkh
MFC after: 0


83377 12-Sep-2001 darrenr

Add IPFLITER.LICENCE to the kernel (requested by rwatson)


83366 12-Sep-2001 julian

KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after: ha ha ha ha


83178 07-Sep-2001 msmith

Merge our local branch changes with the 20010831 snapshot.


83175 07-Sep-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r83174,
which included commits to RCS files with non-trunk default branches.


82371 26-Aug-2001 msmith

Nuke the Windows platform defines; we don't need them.


82370 26-Aug-2001 msmith

Merge local changes.


82368 26-Aug-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r82367,
which included commits to RCS files with non-trunk default branches.


80625 30-Jul-2001 darrenr

fix import/merge related code problems


80482 28-Jul-2001 darrenr

fix conflicts created by import


80358 25-Jul-2001 peter

This commit was generated by cvs2svn to compensate for changes in r80357,
which included commits to RCS files with non-trunk default branches.


80065 21-Jul-2001 msmith

Merge local changes with the ACPI CA 20010717 import.


80063 21-Jul-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r80062,
which included commits to RCS files with non-trunk default branches.


80061 21-Jul-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r80060,
which included commits to RCS files with non-trunk default branches.


80031 20-Jul-2001 msmith

We haven't had AcpiSetSystemSleepState for a while now, clean out the
prototype.


78989 29-Jun-2001 msmith

Merge FreeBSD-specific changes.


78987 29-Jun-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r78986,
which included commits to RCS files with non-trunk default branches.


78217 14-Jun-2001 joerg

Do only call oltr_stop() if we are not already in OL_STOPPED state.
This avoids a null pointer deref panic in TRlldClose() inside the
vendor-supplied object code. It's now possible to unload the driver
at all.

Implement deallocation of malloc()ed memory regions.

MFC after: 2 months


77433 29-May-2001 msmith

Remove old ACPI CA code. These will be drained from the repo at some
future date.


77429 29-May-2001 msmith

- wbinvd isn't an inline on ia64.
- includes are not in subdirectories.


77428 29-May-2001 msmith

Merge FreeBSD-specific changes with the ACPI CA 20010518 release.


77425 29-May-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r77424,
which included commits to RCS files with non-trunk default branches.


77423 29-May-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r77422,
which included commits to RCS files with non-trunk default branches.


76322 06-May-2001 phk

Actually biofinish(struct bio *, struct devstat *, int error) is more general
than the bioerror().

Most of this patch is generated by scripts.


76311 06-May-2001 phk

Update the DiskOnChip firmware to OSAK version 4.1.

Sponsored by: Redfern Broadband Networks (www.RedFernNetworks.com)


75262 06-Apr-2001 darrenr

fix security hole created by fragment cache


74810 26-Mar-2001 phk

Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.


73972 08-Mar-2001 mdodd

Move configuration of work_memory to oltr_init() rather than
oltr_pci_attach(). This only affects the OC-3139 and OC-3540.

MFC candidate.

PR: kern/24074


73564 05-Mar-2001 msmith

Resolve merge conflicts.


73562 05-Mar-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r73561,
which included commits to RCS files with non-trunk default branches.


72010 04-Feb-2001 darrenr

fix duplicate rcsid


72006 04-Feb-2001 darrenr

fix conflicts


71923 02-Feb-2001 msmith

Patch the reintroduced (~0 << 32) == 1 bug with a cryptic but functional
version. This should fix the read-before-write problem again.

Obtained from: "Adam J. Richter" <adam@yggdrasil.com>


71877 31-Jan-2001 msmith

Merge conflicts from the ACPI CA 20010125 import.


71870 31-Jan-2001 msmith

Remove obsoleted files.


71868 31-Jan-2001 msmith

This commit was generated by cvs2svn to compensate for changes in r71867,
which included commits to RCS files with non-trunk default branches.


70902 10-Jan-2001 iwasaki

Disable strstr() if ACPICA is compiled in userland.

Reviewed by: msmith


70246 21-Dec-2000 msmith

Resolve conflicts from the ACPI CA 20001215 vendor import.


70244 21-Dec-2000 msmith

This commit was generated by cvs2svn to compensate for changes in r70243,
which included commits to RCS files with non-trunk default branches.


69781 08-Dec-2000 dwmalone

Convert more malloc+bzero to malloc+M_ZERO.

Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>


69774 08-Dec-2000 phk

Staticize some malloc M_ instances.


69749 08-Dec-2000 msmith

Resolve conflicts from the 20001201 merge.


69747 08-Dec-2000 msmith

This commit was generated by cvs2svn to compensate for changes in r69746,
which included commits to RCS files with non-trunk default branches.


69473 01-Dec-2000 msmith

Remove duplicate definition.


69472 01-Dec-2000 msmith

Update local changes for new hardware register interface.


69454 01-Dec-2000 msmith

Resolve conflicts from the vendor update.


69451 01-Dec-2000 msmith

This commit was generated by cvs2svn to compensate for changes in r69450,
which included commits to RCS files with non-trunk default branches.


69152 25-Nov-2000 jlemon

Lock down the network interface queues. The queue mutex must be obtained
before adding/removing packets from the queue. Also, the if_obytes and
if_omcasts fields should only be manipulated under protection of the mutex.

IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on
the queue. An IF_LOCK macro is provided, as well as the old (mutex-less)
versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which
needs them, but their use is discouraged.

Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF,
which takes care of locking/enqueue, and also statistics updating/start
if necessary.


68619 11-Nov-2000 bmilekic

While I'm here, get rid of (now useless) MCLISREFERENCED and use MEXT_IS_REF
instead.
Also, fix a small set of "avail." If we're setting `avail,' we shouldn't
be re-checking whether m_flags is M_EXT, because we know that it is, as if
it wasn't, we would have already returned several lines above.

Reviewed by: jlemon


67853 29-Oct-2000 darrenr

Fix conflicts creted by import.


67770 28-Oct-2000 msmith

We should include <machine/stdarg.h> not <stdarg.h>

Submitted by: phk


67767 28-Oct-2000 msmith

Some AML code assumes that a function without an explicit ReturnOp will
return the last value returned by a nested method call. This violates
the ACPI spec, but is implemented by the Microsoft interpreter, and thus
vendors can (and do) get away with it.

Intel's stance is that this is illegal and should not be supported.
As they put it, however, we have to live in the real world. So go ahead
and implement it.

Submitted by: Mitsaru IWASAKI <iwasaki@jp.freebsd.org>


67766 28-Oct-2000 msmith

FreeBSD-specific customisations:

- Set debugger options for kernel build
- Define some missing functions
- Bring in GCC defines
- Disable the 'wbinvd' macro as it conflicts with our inline


67765 28-Oct-2000 msmith

Add some extra fuctions:

- AcpiGetProcessorID (fetch the ACPI processor ID for a given ACPI_HANDLE)
- AcpiSetSystemSleepState (set the Sx sleeping state, proposed by Intel
but not actually implemented)


67755 28-Oct-2000 msmith

This commit was generated by cvs2svn to compensate for changes in r67754,
which included commits to RCS files with non-trunk default branches.


67711 27-Oct-2000 obrien

Include sys/param.h for `__FreeBSD_version' rather than the non-existent
osreldate.h.

Submitted by: dougb


67614 26-Oct-2000 darrenr

fix conflicts from rcsids


67564 25-Oct-2000 ru

We now keep the ip_id field in network byte order all the
time, so there is no need to make the distinction between
ip_output() and ip_input() cases.

Reviewed by: silence on freebsd-net


67287 18-Oct-2000 ru

If we do not byte-swap the ip_id in the first place, don't do it in
the second. NetBSD (from where I've taken this originally) needs
to fix this too.


67164 15-Oct-2000 phk

Remove unneeded #include <machine/clock.h>


66903 10-Oct-2000 lile

o Change TX_BUFFER_LEN from 512 to 2048.

o Remove bogus "spurious interrupt" message.

o Ring buffer head and avail were incorrectly calculated.

o Fix fragment count.

o Fix ring entry for single station, default to 16Mbit.

o Don't complain about long frames.


66795 07-Oct-2000 phk

remove unused #include.


65933 16-Sep-2000 phk

Remove SMP hack.


65837 14-Sep-2000 ru

Follow BSD/OS and NetBSD, keep the ip_id field in network order all the time.

Requested by: wollman


64674 15-Aug-2000 kris

Install mode 644, not mode 664 during kernel compile. Yes, Peter, I am
psycho :-)


64580 13-Aug-2000 darrenr

resolve conflicts


64105 01-Aug-2000 roberto

Change __FreeBSD_Version into the proper __FreeBSD_version.

Submitted by: Alain.Thivillon@hsc.fr (Alain Thivillon) (for ip_fil.c)


64078 01-Aug-2000 ache

Add missing '0' to FreeBSD_version test: 50011 -> 500011


64060 31-Jul-2000 darrenr

activate pfil_hooks and covert ipfilter to use it


63523 19-Jul-2000 darrenr

fix conflicts


61977 23-Jun-2000 peter

Remove these here, these were repocopied to src/sys/ufs/ffs.


61926 22-Jun-2000 mckusick

Update to new copyright.


61813 18-Jun-2000 mckusick

When running with quotas enabled on a filesystem using soft updates,
the system would panic when a user's inode quota was exceeded (see
PR 18959 for details). This fixes that problem.

PR: 18959
Submitted by: Jason Godsey <jason@unixguy.fidalgo.net>


61812 18-Jun-2000 mckusick

Some additional performance improvements. When freeing an inode
check to see if it has been committed to disk. If it has never
been written, it can be freed immediately. For short lived files
this change allows the same inode to be reused repeatedly.
Similarly, when upgrading a fragment to a larger size, if it
has never been claimed by an inode on disk, it too can be freed
immediately making it available for reuse often in the next slowly
growing block of the same file.


61729 16-Jun-2000 phk

ARGH! I have too many source trees :-(

Fix prototype errors in last commit.


61724 16-Jun-2000 phk

Virtualizes & untangles the bioops operations vector.

Ref: Message-ID: <18317.961014572@critter.freebsd.dk> To: current@


61483 10-Jun-2000 peter

Unused include: #include "fla.h"


61044 28-May-2000 peter

Fix a reference to an old FreeBSD 2.2 register name.
s/PCI_COMMAND_STATUS_REG/PCIR_COMMAND/


60944 26-May-2000 darrenr

define CSUM_DELAY_DATA to match merge


60938 26-May-2000 jake

Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by: msmith and others


60925 25-May-2000 darrenr

fix up #ifdef jungle for FreeBSD


60923 25-May-2000 darrenr

remove duplicate prototypes


60883 24-May-2000 darrenr

fix duplicate rcsid's


60865 24-May-2000 peter

It would have been nice if this actually compiled. Close the header
comment */.


60857 24-May-2000 darrenr

fix up conflicts


60855 24-May-2000 darrenr

fix conflicts


60854 24-May-2000 darrenr

fix conflicts


60853 24-May-2000 darrenr

fix conflicts


60852 24-May-2000 darrenr

fix conflicts


60851 24-May-2000 darrenr

fix conflicts


60850 24-May-2000 darrenr

fix conflicts


60833 23-May-2000 jake

Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by: phk
Reviewed by: phk
Approved by: mdodd


60765 21-May-2000 jlemon

Compute the checksum before handing the packet off to IPFilter.

Tested by: Cy Schubert <Cy.Schubert@uumail.gov.bc.ca>


60295 09-May-2000 darrenr

Fix bug in dealing with "hlen == 1 and opt > 1"


60265 09-May-2000 ps

Add missing include machine/in_cksum.h.

Submitted by: n_hibma


60041 05-May-2000 phk

Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.

Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.

Still a few bogus uses of struct buf to track down.

Repocopy by: peter


59874 01-May-2000 peter

Add $FreeBSD$


59532 23-Apr-2000 phk

Enforce and respect the 8 unit limit.


59249 15-Apr-2000 phk

Complete the bio/buf divorce for all code below devfs::strategy

Exceptions:
Vinum untouched. This means that it cannot be compiled.
Greg Lehey is on the case.

CCD not converted yet, casts to struct buf (still safe)

atapi-cd casts to struct buf to examine B_PHYS


59241 15-Apr-2000 rwatson

Introduce extended attribute support for FFS, allowing arbitrary
(name, value) pairs to be associated with inodes. This support is
used for ACLs, MAC labels, and Capabilities in the TrustedBSD
security extensions, which are currently under development.

In this implementation, attributes are backed to data vnodes in the
style of the quota support in FFS. Support for FFS extended
attributes may be enabled using the FFS_EXTATTR kernel option
(disabled by default). Userland utilities and man pages will be
committed in the next batch. VFS interfaces and man pages have
been in the repo since 4.0-RELEASE and are unchanged.

o ufs/ufs/extattr.h: UFS-specific extattr defines
o ufs/ufs/ufs_extattr.c: bulk of support routines
o ufs/{ufs,ffs,mfs}/*.[ch]: hooks and extattr.h includes
o contrib/softupdates/ffs_softdep.c: extattr.h includes
o conf/options, conf/files, i386/conf/LINT: added FFS_EXTATTR

o coda/coda_vfsops.c: XXX required extattr.h due to ufsmount.h
(This should not be the case, and will be fixed in a future commit)

Currently attributes are not supported in MFS. This will be fixed.

Reviewed by: adrian, bp, freebsd-fs, other unthanked souls
Obtained from: TrustedBSD Project


58934 02-Apr-2000 phk

Move B_ERROR flag to b_ioflags and call it BIO_ERROR.

(Much of this done by script)

Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED.

Move b_pblkno and b_iodone_chain to struct bio while we transition, they
will be obsoleted once bio structs chain/stack.

Add bio_queue field for struct bio aware disksort.

Address a lot of stylistic issues brought up by bde.


58641 26-Mar-2000 lile

o Get basic if_media support working.

o Add more diagnostic and status messages.

o General clean up of old debug messages and
small style fixes.


58349 20-Mar-2000 phk

Rename the existing BUF_STRATEGY() to DEV_STRATEGY()

substitute BUF_WRITE(foo) for VOP_BWRITE(foo->b_vp, foo)

substitute BUF_STRATEGY(foo) for VOP_STRATEGY(foo->b_vp, foo)

This patch is machine generated except for the ccd.c and buf.h parts.


58345 20-Mar-2000 phk

Remove B_READ, B_WRITE and B_FREEBUF and replace them with a new
field in struct buf: b_iocmd. The b_iocmd is enforced to have
exactly one bit set.

B_WRITE was bogusly defined as zero giving rise to obvious coding
mistakes.

Also eliminate the redundant struct buf flag B_CALL, it can just
as efficiently be done by comparing b_iodone to NULL.

Should you get a panic or drop into the debugger, complaining about
"b_iocmd", don't continue. It is likely to write on your disk
where it should have been reading.

This change is a step in the direction towards a stackable BIO capability.

A lot of this patch were machine generated (Thanks to style(9) compliance!)

Vinum users: Greg has not had time to test this yet, be careful.


58297 19-Mar-2000 lile

o Fix typo in the RapidFire 3540 adapter name
4/16/100 -> 100/16/4 so that it matches all of the others.

o Since we went to all the trouble of getting the correct
working memory size actually use it.

* Submitted by: Nikolai Saoukh <nms@otdel-1.org>


58267 18-Mar-2000 lile

o Replace the old "oltr" driver with the completely re-written
new-bus Olicom driver, previously known as "ol". The new
driver unfortunately does not support ISA cards yet.

o Update the microcode files, interface library and include files
to the latest PowerMACH works version. Force even byte alignment
of adapter microcode.

o Roll in some of the patches from Nikolai Saoukh <nms@ethereal.ru>.


57126 10-Feb-2000 guido

Re add rev 1.11 diffs to ip_fil.h Also discover that I did not undefine
CVS_FUBAR (which no longer exists) and thus forgot to add $FreeBSD's.
Add them.

Approved by: jkh (is part of ipfilter upgrade)


57096 09-Feb-2000 guido

Bring over ipfilter v3_3_8 kernel sources, including merging the
local modifications.
Also fix initializing fr_running in KLD case.
Rename ipl_inited to fr_runninhg in mlfk_ipl

Approved by: jkh


56908 30-Jan-2000 mckusick

When writing out bitmap buffers, need to skip over ones that already
have a write in progress. Otherwise one can get in an infinite loop
trying to get them all flushed.

Submitted by: Matthew Dillon <dillon@apollo.backplane.com>


56873 29-Jan-2000 peter

Remove a somewhat odd #if that is always true (NOLTR will be always
1 or more if this file is being compiled)


56209 18-Jan-2000 mckusick

During fastpath processing for removal of a short-lived inode, the
set of restrictions for cancelling an inode dependency (inodedep)
is somewhat stronger than originally coded. Since this check appears
in two places, we codify it into the function check_inode_unwritten
which we then call from the two sites, one freeing blocks and the
other freeing directory entries.

Submitted by: Steinar Haug via Matthew Dillon


56208 18-Jan-2000 mckusick

Need to reorganize the flushing of directory entry (pagedep) dependencies
so that they never try to lock an inode corresponding to ".." as this
can lead to deadlock. We observe that any inode with an updated link count
is always pushed into its buffer at the time of the link count change, so
we do not need to do a VOP_UPDATE, but merely find its buffer and write it.
The only time we need to get the inode itself is from the result of a
mkdir whose name will never be ".." and hence locking such an inode will
never request a lock above us in the filesystem tree. Thanks to Brian
Fundakowski Feldman for providing the test program that tickled soft updates
into hanging in "inode" sleep.

Submitted by: Brian Fundakowski Feldman <green@FreeBSD.org>


56150 17-Jan-2000 mckusick

Better bounding on softdep_flushfiles; other minor tweeks to checks.


56149 17-Jan-2000 mckusick

Must track multiple uncommitted renames until one ultimately gets
committed to disk or is removed.


55990 14-Jan-2000 guido

Apply patches in rev 1.2 and 1.9 that I forgot

Pointe out by: bde


55947 14-Jan-2000 dillon

Non-operational change, fix compiler warning.

Reviewed by: mckusick


55931 13-Jan-2000 mckusick

Confirming Peter's fix (locking 101: release the lock before you go
to sleep). Locking 101, part 2: do not look at buffer contents after
you have been asleep. There is no telling what wonderous changes may
have occurred.


55929 13-Jan-2000 guido

Bring over ipfilter kernel sources, including merging the local modifications.


55928 13-Jan-2000 peter

Free the global softupdates lock prior to tsleep() in getdirtybuf().
This seems to be responsible for a bunch of panics where the process
sleeps and something else finds softupdates "locked" when it shouldn't
be. This commit is unreviewed, but has been a big help here.
Previously my boxes would panic pretty much on the first fsync() that
wrote something to disk.


55886 13-Jan-2000 mckusick

Because cylinder group blocks are now written in background,
it is no longer sufficient to get a lock on a buffer to know
that its write has been completed. We have to first get the
lock on the buffer, then check to see if it is doing a
background write. If it is doing background write, we have
to wait for the background write to finish, then check to see
if that fullfilled our dependency, and if not to start another
write. Luckily the explanation is longer than the fix.


55885 13-Jan-2000 mckusick

A panic occurs during an fsync when a dirty block associated with
a vnode has not been written (which would clear certain of its
dependencies). The problems arises because fsync with MNT_NOWAIT
no longer pushes all the dirty blocks associated with a vnode. It
skips those that require rollbacks, since they will just get instantly
dirty again. Such skipped blocks are marked so that they will not be
skipped a second time (otherwise circular dependencies would never
clear). So, we fsync twice to ensure that everything will be written
at least once.


55794 11-Jan-2000 mckusick

We cannot proceed to free the blocks of the file until the dependencies
have been cleaned up by deallocte_dependencies(). Once that is done, it
is safe to post the request to free the blocks. A similar change is also
needed for the freefile case.


55756 10-Jan-2000 phk

Give vn_isdisk() a second argument where it can return a suitable errno.

Suggested by: bde


55726 10-Jan-2000 mckusick

Missing FREE_LOCK call before handle_workitem_freeblocks.

Submitted by: "Kenneth D. Merry" <ken@kdm.org>


55697 10-Jan-2000 mckusick

Several performance improvements for soft updates have been added:
1) Fastpath deletions. When a file is being deleted, check to see if it
was so recently created that its inode has not yet been written to
disk. If so, the delete can proceed to immediately free the inode.
2) Background writes: No file or block allocations can be done while the
bitmap is being written to disk. To avoid these stalls, the bitmap is
copied to another buffer which is written thus leaving the original
available for futher allocations.
3) Link count tracking. Constantly track the difference in i_effnlink and
i_nlink so that inodes that have had no change other than i_effnlink
need not be written.
4) Identify buffers with rollback dependencies so that the buffer flushing
daemon can choose to skip over them.


55694 09-Jan-2000 mckusick

Keep tighter control of removal dependencies by limiting the number
of dirrem structure rather than the collaterally created freeblks
and freefile structures. Limit the rate of buffer dirtying by the
syncer process during periods of intense file removal.


55692 09-Jan-2000 mckusick

Reorganize softdep_fsync so that it only does the inode-is-flushed
check before the inode is unlocked while grabbing its parent directory.
Once it is unlocked, other operations may slip in that could make
the inode-is-flushed check fail. Allowing other writes to the inode
before returning from fsync does not break the semantics of fsync
since we have flushed everything that was dirty at the time of the
fsync call.


55690 09-Jan-2000 mckusick

Make static non-exported functions from soft updates.


55460 05-Jan-2000 eivind

KERNEL -> _KERNEL


54935 21-Dec-1999 eivind

Garbage collect oltr_pci_shutdown


54892 20-Dec-1999 peter

The ipfilter module name wasn't exactly conventional..


54700 16-Dec-1999 mckusick

The function request_cleanup() had a tsleep() with PCATCH. It is
quite dangerous, since the process may hold locks at the point,
and if it is stopped in that tsleep the machine may hang. Because
the sleep is so short, the PCATCH is not required here, so it has
been removed. For the future, the FreeBSD team needs to decide
whether it is still reasonable to stop a process in tsleep, as that
may affect any other code that uses PCATCH while holding kernel locks.

Submitted by: Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
Reviewed by: Kirk McKusick <mckusick@mckusick.com>


54444 11-Dec-1999 eivind

Lock reporting and assertion changes.
* lockstatus() and VOP_ISLOCKED() gets a new process argument and a new
return value: LK_EXCLOTHER, when the lock is held exclusively by another
process.
* The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them
* Extend the vnode_if.src format to allow more exact specification than
locked/unlocked.

This commit should not do any semantic changes unless you are using
DEBUG_VFS_LOCKS.

Discussed with: grog, mch, peter, phk
Reviewed by: peter


54279 08-Dec-1999 ken

Revamp the devstat priority system. All disks now have the same priority.
The same goes for CD drivers and tape drivers. In systems with mixed IDE
and SCSI, devices in the same priority class will be sorted in attach
order.

Also, the 'CCD' priority is now the 'ARRAY' priority, and a number of
drivers have been modified to use that priority.

This includes the necessary changes to all drivers, except the ATA drivers.
Soren will modify those separately.

This does not include and does not require any change in the devstat
version number, since no known userland applications use the priority
enumerations.

Reviewed by: msmith, sos, phk, jlemon, mjacob, bde


54228 06-Dec-1999 guido

Last minute patch that I forgot to apply: check return code of iplattach()


54221 06-Dec-1999 guido

Revive mlfk_ipl here. This version is slightly changed from
the old one: an unnecessary define (KLD_MODULE) has been deleted and
the initialisation of the module is done after domaininit was called
to be sure inet is running.

Some slight changed were made to ip_auth.c and ip_state.c in order
to assure including of sys/systm.h in case we make a kld

Make sure ip_fil does nmot include osreldate in kernel mode

Remove mlfk_ipl.c from here: no sources allowed in these directories!


54048 03-Dec-1999 billf

Fix typo, add $FreeBSD$


53885 29-Nov-1999 peter

Fix a stray (ifdef'ed) reference to a non-existing file.


53645 23-Nov-1999 guido

Get rid of useless osreldate include for KLD/LKM modules (sys/param.h
already carries what is needed).
This is needed for the KLD support.


53642 23-Nov-1999 guido

Add kernel parts of revived ipfilter (3.3.3.)


53577 22-Nov-1999 phk

Convert various pieces of code to use vn_isdisk() rather than checking
for vp->v_type == VBLK.

In ccd: we don't need to call VOP_GETATTR to find the type of a vnode.

Reviewed by: sos


53452 20-Nov-1999 phk

struct mountlist and struct mount.mnt_list have no business being
a CIRCLEQ. Change them to TAILQ_HEAD and TAILQ_ENTRY respectively.

This removes ugly mp != (void*)&mountlist comparisons.

Requested by: phk
Submitted by: Jake Burkholder jake@checker.org
PR: 14967


53080 10-Nov-1999 phk

Finding root devices is a much more sane thing now.


52174 12-Oct-1999 dfr

* Add struct resource_list* argument to resource_list_alloc and
resource_list_release. This removes the dependancy on the
layout of ivars.

* Move set_resource, get_resource and delete_resource from
isa_if.m to bus_if.m.

* Simplify driver code by providing wrappers to those methods:

bus_set_resource(dev, type, rid, start, count);
bus_get_resource(dev, type, rid, startp, countp);
bus_get_resource_start(dev, type, rid);
bus_get_resource_count(dev, type, rid);
bus_delete_resource(dev, type, rid);

* Delete isa_get_rsrc and use bus_get_resource_start instead.

* Fix a stupid typo in isa_alloc_resource reported by Takahashi
Yoshihiro <nyan@FreeBSD.org>.

* Print a diagnostic message if we can't assign resources to a PnP
device.

* Change device_print_prettyname() so that it doesn't print
"(no driver assigned)-1" for anonymous devices.


52134 11-Oct-1999 phk

remove unused #includes.


52089 10-Oct-1999 peter

Nuke the old antique copy of ipfilter from the tree. This is old enough
to be dangerous. It will better serve us as a port building a KLD,
ala SKIP.

The hooks are staying although it would be better to port and use
the NetBSD pfil interface rather than have custom hooks.


51658 25-Sep-1999 phk

Remove five now unused fields from struct cdevsw. They should never
have been there in the first place. A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags


51646 25-Sep-1999 phk

Remove NBPF conditionality of bpf calls in most of our network drivers.

This means that we will not have to have a bpf and a non-bpf version
of our driver modules.

This does not open any security hole, because the bpf core isn't loadable

The drivers left unchanged are the "cross platform" drivers where the respective
maintainers are urged to DTRT, whatever that may be.

Add a couple of missing FreeBSD tags.


51376 18-Sep-1999 phk

Use devstat_end_transaction_buf() rather than Use devstat_end_transaction()


51215 12-Sep-1999 phk

Bite the bullet and allocate the devsw entry at compile time.


51198 12-Sep-1999 phk

Use a different tactic when creating the devsw so that disk_create()
doesn't need to malloc.


51087 08-Sep-1999 phk

Update docs for 3.3-R

OK'ed by: jkh


50994 06-Sep-1999 peter

Clean $Log$ debris.


50728 01-Sep-1999 phk

Improve the micro "disk" layer after gaining more experience with it.


50570 29-Aug-1999 phk

Remove unneeded slice element.


50566 29-Aug-1999 phk

Convert to use the new "disk" layer.
A few cleanups while here.


50511 28-Aug-1999 phk

We don't need to pass the diskname argument all over the diskslice/label
code, we can find the name from any convenient dev_t


50480 28-Aug-1999 peter

$Id$ -> $FreeBSD$


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


49847 15-Aug-1999 phk

SMP: Release the giant lock while we work the flash array
Use splbio() rather than fiddling the hardware interrupts.
Remove the compatibility stuff for older FreeBSD versions.
Add devstat support.


49771 14-Aug-1999 phk

Spring cleaning around strategy and disklabels/slices:

Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout.
please see comment in sys/conf.h about the flag argument.

Remove strategy argument from all the diskslice/label/bad144
implementations, it should be found from the dev_t.

Remove bogus and unused strategy1 routines.

Remove open/close arguments from dssize(). Pick them up from dev_t.

Remove unused and unfinished setgeom support from diskslice/label/bad144 code.


49535 08-Aug-1999 phk

Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,
a few lines into <sys/vnode.h>.

Add a few fields to struct specinfo, paving the way for the fun part.


49500 07-Aug-1999 bde

Fixed a bogus include pathname which broke compiling in an obj directory.


49499 07-Aug-1999 bde

Fixed syntax errors. Code should be tested before committing it, or at
least before enabling it in LINT and merging it into RELENG_3.


49470 06-Aug-1999 phk

Better way to circumvent the boot problem on older versions.

Submitted by: Larry Baird <lab@gta.com>


49467 06-Aug-1999 phk

Add driver support for M-systems DiskOnChip Products.

Sponsored by: M-systems Inc. http://www.m-sys.com


48645 06-Jul-1999 des

Rename bpfilter to bpf.


48591 05-Jul-1999 lile

Update to latest version of PowerMACH Works from Olicom.


48334 29-Jun-1999 mckusick

No longer need to set B_ASYNC flag since BUF_KERNPROC now
unconditionally sets the identity of the buffer.


48276 27-Jun-1999 peter

Keep the inlines for <sys/buf.h> happy..


48225 26-Jun-1999 mckusick

Convert buffer locking from using the B_BUSY and B_WANTED flags to using
lockmgr locks. This commit should be functionally equivalent to the old
semantics. That is, all buffer locking is done with LK_EXCLUSIVE
requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will
be done in future commits.


48015 19-Jun-1999 green

Add RCS strings to kernel ipfilter files.


47964 16-Jun-1999 mckusick

Add a vnode argument to VOP_BWRITE to get rid of the last vnode
operator special case. Delete special case code from vnode_if.sh,
vnode_if.src, umap_vnops.c, and null_vnops.c.


47940 15-Jun-1999 mckusick

Get rid of the global variable rushjob and replace it with a function in
kern/vfs_subr.c named speedup_syncer() which handles the speedup request.
Change the various clients of rushjob to use the new function.


47381 22-May-1999 julian

Cosmetic changes to make it compile without errors in gcc -Wall


47131 14-May-1999 mckusick

Add a hook to ffs_fsync to allow soft updates to get first chance at doing
a sync on the block device for the filesystem. That allows it to push the
bitmap blocks before the inode blocks which greatly reduces the number of
inode rollbacks that need to be done.


46827 09-May-1999 mckusick

Put back changes that might be causing trouble on Alpha.


46813 09-May-1999 peter

Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:
#define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data)
.. to 2.2.x and 3.x if people think it's worth it. Driver writers can do
this if it's not defined. (The reason for this is that I'm trying to
progressively eliminate use of linker_sets where it hurts modularity and
runtime load capability, and these DATA_SET's keep getting in the way.)


46618 07-May-1999 mckusick

Whitespace cleanup.


46616 07-May-1999 mckusick

Get rid of random debugging cruft; sync up with latest version.


46609 07-May-1999 mckusick

Severe slowdowns have been reported when creating or removing many
files at once on a filesystem running soft updates. The root of
the problem is that soft updates limits the amount of memory that
may be allocated to dependency structures so as to avoid hogging
kernel memory. The original algorithm just waited for the disk I/O
to catch up and reduce the number of dependencies. This new code
takes a much more aggressive approach. Basically there are two
resources that routinely hit the limit. Inode dependencies during
periods with a high file creation rate and file and block removal
dependencies during periods with a high file removal rate. I have
attacked these problems from two fronts. When the inode dependency
limits are reached, I pick a random inode dependency, UFS_UPDATE
it together with all the other dirty inodes contained within its
disk block and then write that disk block. This trick usually
clears 5-50 inode dependencies in a single disk I/O. For block and
file removal dependencies, I pick a random directory page that has
at least one remove pending and VOP_FSYNC its directory. That
releases all its removal dependencies to the work queue. To further
hasten things along, I also immediately start the work queue process
rather than waiting for its next one second scheduled run.


46026 24-Apr-1999 peter

Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't
hurt the driver portability to 3.x too much for where drivers are shared.


45895 21-Apr-1999 peter

As I understand it, these register_intr()'s shouldn't be here. The isa
driver attaches the interupt itself.


44643 10-Mar-1999 julian

Need to include /contrib/dev/oltr/... not dev/oltr/...


44627 10-Mar-1999 julian

Submitted by: Larry Lile
Move the Olicom token ring driver to the officially sanctionned location of
/sys/contrib. Also fix some brokenness in the generic token ring support.

Be warned that if_dl.h has been changed and SOME programs might
like recompilation.


44398 02-Mar-1999 mckusick

Reorganize locking to avoid holding the lock during calls to bdwrite
and brelse (which may sleep in some systems).

Obtained from: Matthew Dillon <dillon@apollo.backplane.com>


44383 02-Mar-1999 mckusick

Ensure that softdep_sync_metadata can handle bmsafemap and mkdir entries
if they ever arise (which should not happen as softdep_sync_metadata is
currently used).


44102 17-Feb-1999 mckusick

fix double LIST_REMOVE; other cosmetic changes to match version 9.32.
Obtained from: Jeffrey Hsu <hsu@FreeBSD.ORG>


43305 27-Jan-1999 dillon

Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile


43044 22-Jan-1999 dg

Gutted softdep_deallocate_dependencies and replaced it with a panic. It
turns out to not be useful to unwind the dependencies and continue in
the face of a fatal error.
Also changed the log() to a printf() in softdep_error() so that it will
be output in the case of a impending panic.
Submitted by: Kirk McKusick <mckusick@mckusick.com>


42374 07-Jan-1999 bde

Don't pass unused unused timestamp args to UFS_UPDATE() or waste
time initializing them. This almost finishes centralizing (in-core)
timestamp updates in ufs_itimes().


42354 06-Jan-1999 bde

UFS_UPDATE() takes a boolean `waitfor' arg, so don't pass it the value
MNT_WAIT when we mean boolean `true' or check for that value not being
passed. There was no problem in practice because MNT_WAIT had the
magic value of 1.


41659 10-Dec-1998 julian

Remove some compiler warnings.


41591 07-Dec-1998 archie

The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.


41514 04-Dec-1998 archie

Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by: Bruce Evans <bde@zeta.org.au>
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by: Mike Spengler <mks@networkcs.com>


41363 26-Nov-1998 eivind

Staticize some more.


40791 31-Oct-1998 peter

Change dirty block list handling to use TAILQ macros.


40692 28-Oct-1998 jkh

Clarify a rather ambiguous debugging message.


39933 03-Oct-1998 nate

Fix 'noatime' bug that was unrelated to use of noatime.

The problem is caused when a directory block is compacted. When this
occurs, softdep_change_directoryentry_offset() is called to relocate each
directory entry and adjust its matching diradd structure, if any, to match
the new location of the entry. The bug is that while
softdep_change_directoryentry_offset() correctly adjusts the offsets of
the diradd structures on the pd_diraddhd[] lists (which are not yet ready
to be committed to disk), it fails to adjust the offsets of the diradd
structures on the pd_pendinghd list (which are ready to be committed to
disk). This causes the dependency structures to be inconsistent with
the buf contents. Now, if the compaction has moved a directory entry to
the same offset as one of the diradd structures on the pd_pendinghd list
*and* a syscall is done that tries to remove this directory entry before
this directory block has been written to disk (which would empty
pd_pendinghd), a sanity check in newdirrem() will call panic() when it
notices that the inode number in the entry that it is to be removed doesn't
match the inode number in the diradd structure with that offset of that
entry.

Reviewed by: Kirk McKusick <mckusick@McKusick.COM>
Submitted by: Don Lewis <Don.Lewis@tsc.tdk.com>


39623 24-Sep-1998 luoqi

Eliminate a race in VOP_FSYNC() when softupdates is enabled.
Submitted by: Kirk McKusick <mckusick@McKusick.COM>
Two minor changes are also included,
1. Remove gratuitious checks for error return from vn_lock with LK_RETRY set,
vn_lock should always succeed in these cases.
2. Back out change rev. 1.36->1.37, which unnecessarily makes async mount
a little more unstable. It also keeps us in sync with other BSDs.
Suggested by: Bruce Evans <bde@zeta.org.au>


38342 15-Aug-1998 bde

Made some disgusting ifdefs even more disgusting to enable the support
for `u_long cmd' ioctl args if __FreeBSD_version >= 300003. Some ioctls
were broken on machines with 32-bit ints and 64-bit longs.


38291 12-Aug-1998 julian

Handle the case of moving a directory onto the top of a sibling's
child of the same name.

Submitted by: Kirk Mckusick with fixes from luoqi Chen
Obtained from: Whistle test tree.


37077 20-Jun-1998 peter

Merge ipfilter 3.2.3 -> 3.2.7 changes onto mainline.


37072 20-Jun-1998 peter

This commit was generated by cvs2svn to compensate for changes in r37071,
which included commits to RCS files with non-trunk default branches.


36936 12-Jun-1998 julian

Note which version of Kirk's sources this corresponds to.


36935 12-Jun-1998 julian

Fix the case when renaming to a file that you've just created and deleted,
that had an inode that has not yet been written to disk, when the inode of the
new file is also not yet written to disk, and your old directory entry is not
yet on disk but you need to remove it and the new name exists in memory
but has been deleted but the transaction to write the deleted name to disk
exists and has not yet been cancelled by the request to delete the non
existant name. I don't know how kirk could have missed such a glaring
problem for so long. :-) Especially since the inconsitency survived on
the disk for a whole 4 second on average before being fixed by other code.
This was not a crashing bug but just led to filesystem inconsitencies
if you crashed.

Submitted by: Kirk McKusick (mckusick@mckusick.com)


36900 11-Jun-1998 julian

Add B_NOCACHE to several cases where BSD4.4 only required a B_INVAL.
Change worked out by john and kirk in consort.


36871 10-Jun-1998 julian

Fix for "live inode" panic.
Submitted by: Kirk McKusick <mckusick@McKusick.COM>
Reviewed by: yeah right...


36866 10-Jun-1998 julian

Remove buggy debugging code.


36767 08-Jun-1998 bde

Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (this doesn't change the struct layout, size or
alignment in any of the files changed in this commit, at least for
gcc on i386's. Using bitfields of type u_char may affect size and
alignment but not packing)).


36752 08-Jun-1998 bde

ip_fil.h has 9 separate declarations of iplioctl() in a disgusting
ifdef tangle. The previous commit to ip_fil.h didn't change the
one that actually applies to the current FreeBSD kernel, of course.
Fixed.

Fixed style bugs in previous commit to ip_fil.h.


36735 07-Jun-1998 dfr

This commit fixes various 64bit portability problems required for
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.


36580 02-Jun-1998 julian

Add a reference to the Ganger/Patt paper


36404 27-May-1998 julian

A fix to a debug test from Kirk.


36234 19-May-1998 julian

Bring up-to-date with Whistle's current version
Includes some debugging code.


36232 19-May-1998 julian

Merge with Kirk's version as of Feb 20

His version 9.23 == our version 1.5 of ffs_softdep.c
His version 9.5 == our version 1.4 of softdep.c


36225 19-May-1998 julian

Merge in Kirk's changes to stop softupdates from hogging all of memory.


36212 19-May-1998 julian

Change to stop a silly panic. This should be understood better.
Change a buffer swizzle trick to a bcopy. It would be nice if the efficient
trick could be used in the future.


36210 19-May-1998 julian

First published FreeBSD version of soft updates Feb 5.


36207 19-May-1998 julian

This commit was generated by cvs2svn to compensate for changes in r36206,
which included commits to RCS files with non-trunk default branches.


36202 19-May-1998 julian

This commit was generated by cvs2svn to compensate for changes in r36201,
which included commits to RCS files with non-trunk default branches.


35065 06-Apr-1998 phk

Use read_random()


34915 27-Mar-1998 peter

allow open on all minors


34756 21-Mar-1998 peter

Make it compile.. missing "opt_ipfilter.h" and missing <sys/malloc.h>


34751 21-Mar-1998 peter

Some patchups for when this code is compiled in userland (!).


34746 21-Mar-1998 peter

Make this compile.. There are some unpleasing hacks in here.
A major unifdef session is sorely tempting but would destroy any remaining
chance of tracking the original sources.


34743 21-Mar-1998 peter

This commit was generated by cvs2svn to compensate for changes in r34742,
which included commits to RCS files with non-trunk default branches.


31188 16-Nov-1997 peter

This commit was generated by cvs2svn to compensate for changes in r31187,
which included commits to RCS files with non-trunk default branches.


26125 25-May-1997 darrenr

This commit was generated by cvs2svn to compensate for changes in r26124,
which included commits to RCS files with non-trunk default branches.


24587 03-Apr-1997 darrenr

This commit was generated by cvs2svn to compensate for changes in r24586,
which included commits to RCS files with non-trunk default branches.


23286 02-Mar-1997 peter

This commit was generated by cvs2svn to compensate for changes in r23285,
which included commits to RCS files with non-trunk default branches.


23283 02-Mar-1997 peter

This commit was generated by cvs2svn to compensate for changes in r23282,
which included commits to RCS files with non-trunk default branches.