]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoModify the comment to take out the names and URL.
Rick Macklem [Thu, 25 Oct 2012 19:30:58 +0000 (19:30 +0000)]
Modify the comment to take out the names and URL.

Requested by: kib
MFC after: 3 days

11 years agoIncrease the driver-side limit on the number of logical volumes that
Peter Wemm [Thu, 25 Oct 2012 18:46:02 +0000 (18:46 +0000)]
Increase the driver-side limit on the number of logical volumes that
the driver will recognize.  I've tested this as far as 25 volumes.

11 years agoDesupport pre-FreeBSD 7.1.
David E. O'Brien [Thu, 25 Oct 2012 18:39:09 +0000 (18:39 +0000)]
Desupport pre-FreeBSD 7.1.

11 years agoInitialize the response queue mutex a bit earlier to avoid a panic that
Navdeep Parhar [Thu, 25 Oct 2012 18:11:04 +0000 (18:11 +0000)]
Initialize the response queue mutex a bit earlier to avoid a panic that
occurs if t3_sge_alloc_qset fails and then t3_free_qset attempts to
destroy an uninitialized mutex.

Submitted by: Vijay Singh <vijju dot singh at gmail>
MFC after: 3 days

11 years agoUpdate hptiop(4) to version 1.8, which added support for HighPoint
Xin LI [Thu, 25 Oct 2012 17:29:11 +0000 (17:29 +0000)]
Update hptiop(4) to version 1.8, which added support for HighPoint
RocketRAID 4500 series.

Many thanks to HighPoint Technologies for their continued support
of FreeBSD!

Submitted by: HighPoint Technologies
MFC after: 3 days

11 years agoFor PCI Express capability, if max link width is greater than zero, print
Jim Harris [Thu, 25 Oct 2012 17:22:37 +0000 (17:22 +0000)]
For PCI Express capability, if max link width is greater than zero, print
the current and max link speed.

Sponsored by: Intel
Discussed with: jhb
MFC after: 1 week

11 years agoRemove new-line characters from the include() errors to make it consistent
Alexander Motin [Thu, 25 Oct 2012 15:45:32 +0000 (15:45 +0000)]
Remove new-line characters from the include() errors to make it consistent
with the rest of code.

11 years agoNote the removal of the IPFIREWALL_FORWARD kernel option.
Andrey V. Elsukov [Thu, 25 Oct 2012 10:35:08 +0000 (10:35 +0000)]
Note the removal of the IPFIREWALL_FORWARD kernel option.

11 years agoPull in r166498 from upstream clang trunk:
Ed Schouten [Thu, 25 Oct 2012 10:13:58 +0000 (10:13 +0000)]
Pull in r166498 from upstream clang trunk:

Add a new warning -Wmissing-variable-declarations, to warn about variables
defined without a previous declaration.  This is similar to
-Wmissing-prototypes, but for variables instead of functions.

11 years agoRemove the IPFIREWALL_FORWARD kernel option and make possible to turn
Andrey V. Elsukov [Thu, 25 Oct 2012 09:39:14 +0000 (09:39 +0000)]
Remove the IPFIREWALL_FORWARD kernel option and make possible to turn
on the related functionality in the runtime via the sysctl variable
net.pfil.forward. It is turned off by default.

Sponsored by: Yandex LLC
Discussed with: net@
MFC after: 2 weeks

11 years agoCorrect SIGTTIN handling.
Ed Schouten [Thu, 25 Oct 2012 09:05:21 +0000 (09:05 +0000)]
Correct SIGTTIN handling.

In the old TTY layer, SIGTTIN was correctly handled like this:

while (data should be read) {
send SIGTTIN if not foreground process group
read data
}

In the new TTY layer, however, this behaviour was changed, based on a
false interpretation of the standard:

send SIGTTIN if not foreground process group
while (data should be read) {
read data
}

Correct this by pushing tty_wait_background() into the ttydisc_read_*()
functions.

Reported by: koitsu
PR: kern/173010
MFC after: 2 weeks

11 years agoAfter r241923 the updated ip_len no longer needed.
Gleb Smirnoff [Thu, 25 Oct 2012 09:02:21 +0000 (09:02 +0000)]
After r241923 the updated ip_len no longer needed.

11 years agoFix error in r241913 that had broken fragment reassembly.
Gleb Smirnoff [Thu, 25 Oct 2012 09:00:57 +0000 (09:00 +0000)]
Fix error in r241913 that had broken fragment reassembly.

11 years agoFix MINCLSIZE. It should be MHLEN + 1.
Kevin Lo [Thu, 25 Oct 2012 08:38:43 +0000 (08:38 +0000)]
Fix MINCLSIZE. It should be MHLEN + 1.

Reviewed by: glebius

11 years agoEnable "accept_rtadvd" on interfaces running rtadvd.
Brian Somers [Thu, 25 Oct 2012 08:37:08 +0000 (08:37 +0000)]
Enable "accept_rtadvd" on interfaces running rtadvd.

Without this, rtadvd runs but never advertises a default (IPv6) route.

MFC after: 1 week

11 years agoSort and remove a few long-obsolete comments.
Warner Losh [Thu, 25 Oct 2012 05:22:25 +0000 (05:22 +0000)]
Sort and remove a few long-obsolete comments.

11 years agoRemove the links: target. It too is homelessly outdated since it
Warner Losh [Thu, 25 Oct 2012 04:55:04 +0000 (04:55 +0000)]
Remove the links: target.  It too is homelessly outdated since it
relies on the outdated defines list.  It likely hasn't been useful in
15 years, and certainly not in the last decade.

11 years agoThis file is somewhat obsolete (last updated in 1995) list of #if code
Warner Losh [Thu, 25 Oct 2012 04:46:58 +0000 (04:46 +0000)]
This file is somewhat obsolete (last updated in 1995) list of #if code
in the kernel.  Retire it rather than catch up with the last 17 years.

11 years agoRestore r184194 | marcel | 2008-10-22 20:16:38 -0600 (Wed, 22 Oct 2008) | 11 lines
Warner Losh [Thu, 25 Oct 2012 04:44:17 +0000 (04:44 +0000)]
Restore r184194 | marcel | 2008-10-22 20:16:38 -0600 (Wed, 22 Oct 2008) | 11 lines
which made geom_bsd and geom_mbr optional.  They are redundant with the DEFAULTS
BSD and MBR support for g_part, which is standard.

11 years agoRemove redunant geom_bsd and geom_mbr definitions. They are in files.
Warner Losh [Thu, 25 Oct 2012 04:39:19 +0000 (04:39 +0000)]
Remove redunant geom_bsd and geom_mbr definitions.  They are in files.

11 years agoDo proper padding of runt packets using code copied from bge(4).
Tim Kientzle [Thu, 25 Oct 2012 04:37:47 +0000 (04:37 +0000)]
Do proper padding of runt packets using code copied from bge(4).

Reviewed by: gnn

11 years agoRefer to headers locally. This makes it a lot easier
Tim Kientzle [Thu, 25 Oct 2012 04:33:47 +0000 (04:33 +0000)]
Refer to headers locally.  This makes it a lot easier
to build this driver out-of-tree.

11 years agoHoist the MI compat_freebsd32 files up into files from files.*.
Warner Losh [Thu, 25 Oct 2012 04:30:48 +0000 (04:30 +0000)]
Hoist the MI compat_freebsd32 files up into files from files.*.

11 years agoList all the mips MACHINE_ARCH values in the options file to allow
Warner Losh [Thu, 25 Oct 2012 04:21:05 +0000 (04:21 +0000)]
List all the mips MACHINE_ARCH values in the options file to allow
conditional inclusion based on the MACHINE_ARCH we're compiling for.
Make ucmpdi2 conditional on mips or mipsel.

11 years agoSupport FreeBSD Boot loaders.
Tim Kientzle [Thu, 25 Oct 2012 04:14:42 +0000 (04:14 +0000)]
Support FreeBSD Boot loaders.

11 years agoEverybody needs bpf.
Tim Kientzle [Thu, 25 Oct 2012 04:12:33 +0000 (04:12 +0000)]
Everybody needs bpf.

11 years agoSupport boot loaders in the standard kernel.
Tim Kientzle [Thu, 25 Oct 2012 04:10:32 +0000 (04:10 +0000)]
Support boot loaders in the standard kernel.

11 years agoWe need ucmpdi2 for XLR and XLP when compiled in 32-bit mode. Include
Warner Losh [Thu, 25 Oct 2012 02:38:05 +0000 (02:38 +0000)]
We need ucmpdi2 for XLR and XLP when compiled in 32-bit mode.  Include
it here unconditionally while I figure out why "optional mips |
mipsel" didn't work.

11 years agoShow the number of times we block waiting for mbufs.
Alfred Perlstein [Thu, 25 Oct 2012 02:12:05 +0000 (02:12 +0000)]
Show the number of times we block waiting for mbufs.

Machines can stall out because mbufs are low, however sometimes we won't
see "requests denied", instead we see user land processes or kernel threads
blocking waiting for mbufs because they set M_WAIT.  These consumers do not
see errors, only stalling.

Unfortunately until now, netstat did not export this information
so you could have experienced an mbuf shortage and have no way of
seeing it unless you happen to run netstat at the exact time of the
shortage and see "in use" = "max".

By exporting the number of times processes are blocked, we can
effectively see how often non-interrupt context threads are effectively
"denied".

MFC after: 2 weeks

11 years agoAllow autotune maxusers > 384 on 64 bit machines
Alfred Perlstein [Thu, 25 Oct 2012 01:46:20 +0000 (01:46 +0000)]
Allow autotune maxusers > 384 on 64 bit machines

A default install on large memory machines with multiple 10gigE interfaces
were not being given enough mbufs to do full bandwidth TCP or NFS traffic.

To keep the value somewhat reasonable, we scale back the number of
maxuers by 1/6 past the 384 point.  This gives us enough mbufs for most
of our pretty basic 10gigE line-speed tests to complete.

11 years agoPad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle.
Jim Harris [Wed, 24 Oct 2012 18:36:41 +0000 (18:36 +0000)]
Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle.

This enables CPU searches (which read tdq_load) to operate independently
of any contention on the spinlock.  Some scheduler-intensive workloads
running on an 8C single-socket SNB Xeon show considerable improvement with
this change (2-3% perf improvement, 5-6% decrease in CPU util).

Sponsored by: Intel
Reviewed by: jeff

11 years agoFix fallout from r240071. If destination interface lookup fails,
Gleb Smirnoff [Wed, 24 Oct 2012 18:33:44 +0000 (18:33 +0000)]
Fix fallout from r240071. If destination interface lookup fails,
we should broadcast a packet, not try to deliver it to NULL.

Reported by: rpaulo

11 years agoCommit the actual text provided by Alan, instead of the wrong update
Konstantin Belousov [Wed, 24 Oct 2012 18:32:37 +0000 (18:32 +0000)]
Commit the actual text provided by Alan, instead of the wrong update
in r242011.

MFC after: 1 week

11 years agoDirty the newly copied anonymous pages after the wired region is
Konstantin Belousov [Wed, 24 Oct 2012 18:21:59 +0000 (18:21 +0000)]
Dirty the newly copied anonymous pages after the wired region is
forked. Otherwise, pagedaemon might reclaim the page without saving
its content into the swap file, resulting in the valid content
replaced by zeroes.

Reported and tested by: pho
Reviewed and comment update by: alc
MFC after: 1 week

11 years agoAdd missed sched_pin().
Konstantin Belousov [Wed, 24 Oct 2012 18:21:22 +0000 (18:21 +0000)]
Add missed sched_pin().

Submitted by: Svatopluk Kraus <onwahe@gmail.com>
Reviewed by: alc
MFC after: 3 days

11 years agoMove common fdt into files. Duplicate in files.powerpc the files
Warner Losh [Wed, 24 Oct 2012 16:53:02 +0000 (16:53 +0000)]
Move common fdt into files. Duplicate in files.powerpc the files
shared with aim.  Config is smart enough to cope with multiple lines
of the same path with different options.  This reduces the needless
duplication.

11 years agoPull in r165367 from upstream llvm trunk:
Dimitry Andric [Wed, 24 Oct 2012 16:39:49 +0000 (16:39 +0000)]
Pull in r165367 from upstream llvm trunk:

  Make sure always-inline functions get inlined. <rdar://problem/12423986>

  Without this change, when the estimated cost for inlining a function with
  an "alwaysinline" attribute was lower than the inlining threshold, the
  getInlineCost function was returning that estimated cost rather than the
  special InlineCost::AlwaysInlineCost value. That is fine in the normal
  inlining case, but it can fail when the inliner considers the opportunity
  cost of inlining into an internal or linkonce-odr function. It may decide
  not to inline the always-inline function in that case. The fix here is just
  to make getInlineCost always return the special value for always-inline
  functions. I ran into this building clang with libc++. Tablegen failed to
  link because of an always-inline function that was not inlined. I have been
  unable to reduce the testcase down to a reasonable size.

This should fix the link errors that were reported when atf-run was
compiled with clang -stdlib=libc++.  In this case, at -O3 optimization,
some calls to basic_ios::clear() were not inlined, even when the
function was marked __always_inline__.

Reported by: Jan Beich <jbeich@tormail.org>
MFC after: 1 week

11 years agoSort a few mis-sorted items.
Warner Losh [Wed, 24 Oct 2012 16:37:53 +0000 (16:37 +0000)]
Sort a few mis-sorted items.

11 years agoPRIV_START and PRIV_END were reversed.
Eitan Adler [Wed, 24 Oct 2012 16:03:05 +0000 (16:03 +0000)]
PRIV_START and PRIV_END were reversed.

Submitted by: KAHO Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
Approved by: secteam (simon)
MFC after: 3 days

11 years agoConform to the style of the rest of the file for hwpmc.
Warner Losh [Wed, 24 Oct 2012 15:45:26 +0000 (15:45 +0000)]
Conform to the style of the rest of the file for hwpmc.

11 years agoAdd entry for sjg
Simon J. Gerraty [Wed, 24 Oct 2012 14:06:47 +0000 (14:06 +0000)]
Add entry for sjg

Approved by:    marcel (mentor)

11 years agoAvoid changing IFS in a global context as this can sometimes cause
Eitan Adler [Wed, 24 Oct 2012 12:49:03 +0000 (12:49 +0000)]
Avoid changing IFS in a global context as this can sometimes cause
errors later on.

PR: bin/172715
Submitted by: Matthew D.Fuller <fullermd@over-yonder.net> (older
version)
Submitted by: dteske
Approved by: cperciva
MFC after: 1 week

11 years agoFix USB audio specification compliance by filtering which descriptors can
Hans Petter Selasky [Wed, 24 Oct 2012 08:00:01 +0000 (08:00 +0000)]
Fix USB audio specification compliance by filtering which descriptors can
appear on which interface. This fixes detection of some USB audio adapters.
Also increase the channel limit for FULL speed devices to 4 channels.

Tested by: gavin
MFC after: 1 week

11 years agoMake several timing parameters of the USB enumeration sequence tuneable.
Hans Petter Selasky [Wed, 24 Oct 2012 07:23:29 +0000 (07:23 +0000)]
Make several timing parameters of the USB enumeration sequence tuneable.
Also update the port reset time from 250ms to 50ms. Some USB devices
have a hard limit in hardware at 222ms for the port reset time and will
not enumerate unless this delay is closer to the usb.org defined value.
This patch can fix enumeration with some USB devices.

Tested by: Guido van Rooij
Submitted by: Nick Hibma
MFC after: 1 week

11 years agoAdd back hwpmc support.
Warner Losh [Wed, 24 Oct 2012 06:10:09 +0000 (06:10 +0000)]
Add back hwpmc support.

11 years agoFor fast ethernet controllers, Ethernet@WireSpeed is not defined so
Pyun YongHyeon [Wed, 24 Oct 2012 05:54:17 +0000 (05:54 +0000)]
For fast ethernet controllers, Ethernet@WireSpeed is not defined so
explicitly set BGE_PHY_NO_WIRESPEED flag.

11 years agoEthernet@WireSpeed is defined for 1000baseT adapter to establish a
Pyun YongHyeon [Wed, 24 Oct 2012 05:22:41 +0000 (05:22 +0000)]
Ethernet@WireSpeed is defined for 1000baseT adapter to establish a
link at a lower speed so enabling it for fiber adapters is wrong.
Fix the issue by setting BGE_PHY_NO_WIRESPEED such that brgphy(4)
wouldn't enable the feature.
While I'm here move PHY specific feature/bug configuration to new
location(just before mii attach) for readability.

11 years agoDo not hardcode phy address. Multi-port controllers use different phy
Pyun YongHyeon [Wed, 24 Oct 2012 05:00:56 +0000 (05:00 +0000)]
Do not hardcode phy address. Multi-port controllers use different phy
address.

11 years agoAdd the release package directory for 9.1-RELEASE.
Ken Smith [Wed, 24 Oct 2012 01:42:46 +0000 (01:42 +0000)]
Add the release package directory for 9.1-RELEASE.

11 years agoCleanup and rename some variables in libpmc and hwpmc.
Sean Bruno [Wed, 24 Oct 2012 01:26:29 +0000 (01:26 +0000)]
Cleanup and rename some variables in libpmc and hwpmc.

Submitted by: hiren panchasara <hiren.panchasara@gmail.com>
Reviewed by: jimharris@ sbruno@
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoMerge ACPICA 20121018.
Jung-uk Kim [Tue, 23 Oct 2012 23:49:17 +0000 (23:49 +0000)]
Merge ACPICA 20121018.

11 years agoDon't include both <sys/param.h> & <sys/types.h>.
David E. O'Brien [Tue, 23 Oct 2012 23:36:29 +0000 (23:36 +0000)]
Don't include both <sys/param.h> & <sys/types.h>.

11 years agoChange the dependency of kern/uipc_cow.c from zero_copy_sockets
Andre Oppermann [Tue, 23 Oct 2012 23:13:44 +0000 (23:13 +0000)]
Change the dependency of kern/uipc_cow.c from zero_copy_sockets
to socket_send_cow.  Missed in r241931.

Submitted by: pluknet

11 years agoFix spelling of NFSCL option.
Andrew Thompson [Tue, 23 Oct 2012 22:58:25 +0000 (22:58 +0000)]
Fix spelling of NFSCL option.

11 years agoTurns out the nvram env was common, so move it back up to get PB92 working.
Warner Losh [Tue, 23 Oct 2012 19:17:43 +0000 (19:17 +0000)]
Turns out the nvram env was common, so move it back up to get PB92 working.

11 years agoFor building GNU libstdc++ and libsupc++, filter out libc++-specific and
Dimitry Andric [Tue, 23 Oct 2012 18:57:20 +0000 (18:57 +0000)]
For building GNU libstdc++ and libsupc++, filter out libc++-specific and
-std= flags above c++98 or gnu++98 from CXXFLAGS *after* including
bsd.lib.mk, otherwise some additions to CXXFLAGS done in bsd.*.mk might
not be preserved.

MFC after: 1 week

11 years agoFix a number of other clang warnings in libstdc++, which could appear
Dimitry Andric [Tue, 23 Oct 2012 18:45:32 +0000 (18:45 +0000)]
Fix a number of other clang warnings in libstdc++, which could appear
when building other C++ software with it.  Also fix one actual bug in
libsupc++, which was exposed by such a warning.  This latter fix is the
only functional change.

MFC after: 1 week

11 years agoFix two clang warnings in the recent atf import. These have also been
Dimitry Andric [Tue, 23 Oct 2012 18:38:04 +0000 (18:38 +0000)]
Fix two clang warnings in the recent atf import.  These have also been
sent upstream.

Tested by: Garrett Cooper <yanegomi@gmail.com>

11 years agoFix several clang warnings in libstdc++, which were exposed by the
Dimitry Andric [Tue, 23 Oct 2012 18:36:07 +0000 (18:36 +0000)]
Fix several clang warnings in libstdc++, which were exposed by the
recent atf import.  These changes are purely cosmetic, no functional
change.

MFC after: 1 week

11 years agoNote the removal of the ZERO_COPY_SOCKETS kernel option in r241931
Andre Oppermann [Tue, 23 Oct 2012 16:33:43 +0000 (16:33 +0000)]
Note the removal of the ZERO_COPY_SOCKETS kernel option in r241931
and provide a proper explanation.

11 years agoAdd in the crypto support from the generic versions.
Warner Losh [Tue, 23 Oct 2012 16:12:17 +0000 (16:12 +0000)]
Add in the crypto support from the generic versions.

11 years agoAdd in MD specific support for FDT. Need to refactor this a bit.
Warner Losh [Tue, 23 Oct 2012 16:07:41 +0000 (16:07 +0000)]
Add in MD specific support for FDT.  Need to refactor this a bit.

11 years agoRemove two more 'periph == NULL' checks missed in r241404.
Alexander Motin [Tue, 23 Oct 2012 16:03:00 +0000 (16:03 +0000)]
Remove two more 'periph == NULL' checks missed in r241404.
This condition can never be true as functions are called from single place
and the checks just pollute the code and confuse Clang Static Analyzer.

11 years agointr_machdep.c and trap.c can be replaced with ports' own versions,
Warner Losh [Tue, 23 Oct 2012 15:33:40 +0000 (15:33 +0000)]
intr_machdep.c and trap.c can be replaced with ports' own versions,
so remove the standard ones from here.

11 years agoAdd RT305x specific devices here.
Warner Losh [Tue, 23 Oct 2012 15:25:48 +0000 (15:25 +0000)]
Add RT305x specific devices here.

11 years agoAdd support for syscons (we should consider moving most of this into
Warner Losh [Tue, 23 Oct 2012 15:16:40 +0000 (15:16 +0000)]
Add support for syscons (we should consider moving most of this into
files, another day).

11 years agoRemove extra word:
Eitan Adler [Tue, 23 Oct 2012 15:03:25 +0000 (15:03 +0000)]
Remove extra word:

Submitted by: many
Approved by: cperciva (implicit)
MFC after: 3 days

11 years agoStart a clean-room implementation of files.mips. This is sufficient
Warner Losh [Tue, 23 Oct 2012 14:58:24 +0000 (14:58 +0000)]
Start a clean-room implementation of files.mips.  This is sufficient
for SWARM64 and SWARM64_SMP to compile.  Other kernels will be layered
in.

11 years agoUpdate zero_copy(9) man page to note the renamed kernel options
Andre Oppermann [Tue, 23 Oct 2012 14:25:37 +0000 (14:25 +0000)]
Update zero_copy(9) man page to note the renamed kernel options
and to warn about unsafeness of COW based sends.

11 years agoReplace the ill-named ZERO_COPY_SOCKET kernel option with two
Andre Oppermann [Tue, 23 Oct 2012 14:19:44 +0000 (14:19 +0000)]
Replace the ill-named ZERO_COPY_SOCKET kernel option with two
more appropriate named kernel options for the very distinct
send and receive path.

"options SOCKET_SEND_COW" enables VM page copy-on-write based
sending of data on an outbound socket.

NB: The COW based send mechanism is not safe and may result
in kernel crashes.

"options SOCKET_RECV_PFLIP" enables VM kernel/userspace page
flipping for special disposable pages attached as external
storage to mbufs.

Only the naming of the kernel options is changed and their
corresponding #ifdef sections are adjusted.  No functionality
is added or removed.

Discussed with: alc (mechanism and limitations of send side COW)

11 years agoAdd the VFS_UNLOCK_GIANT.9.gz hardlink to ObsoleteFiles list too.
Konstantin Belousov [Tue, 23 Oct 2012 12:03:32 +0000 (12:03 +0000)]
Add the VFS_UNLOCK_GIANT.9.gz hardlink to ObsoleteFiles list too.

Noted by: pluknet

11 years ago Use ip_stripoptions() instead of handrolled version.
Gleb Smirnoff [Tue, 23 Oct 2012 10:30:09 +0000 (10:30 +0000)]
  Use ip_stripoptions() instead of handrolled version.

11 years ago Simplify ip_stripoptions() reducing number of intermediate
Gleb Smirnoff [Tue, 23 Oct 2012 10:29:31 +0000 (10:29 +0000)]
  Simplify ip_stripoptions() reducing number of intermediate
variables.

11 years ago Do not reduce ip_len by size of IP header in the ip_input()
Gleb Smirnoff [Tue, 23 Oct 2012 08:33:13 +0000 (08:33 +0000)]
  Do not reduce ip_len by size of IP header in the ip_input()
before passing a packet to protocol input routines.
  For several protocols this mean that now protocol needs to
do subtraction itself, and for another half this means that
we do not need to add header length back to the packet.

  Make ip_stripoptions() to adjust ip_len, since now we enter
this function with a packet header whose ip_len does represent
length of entire packet, not payload only.

11 years ago- Fix one more miss from r241913.
Gleb Smirnoff [Tue, 23 Oct 2012 08:22:01 +0000 (08:22 +0000)]
- Fix one more miss from r241913.
- Add XXX comment about necessity of the entire block,
  that "fixes up" the IP header.

11 years agoRemove compat options.
Rui Paulo [Tue, 23 Oct 2012 02:20:11 +0000 (02:20 +0000)]
Remove compat options.

Submitted by: netchild

11 years agoCouple of changes missed from r241913, which converted
Gleb Smirnoff [Mon, 22 Oct 2012 22:42:28 +0000 (22:42 +0000)]
Couple of changes missed from r241913, which converted
IPv4 stack to network byte order.

11 years agoDon't try to cache the page setting - always set the page before
Adrian Chadd [Mon, 22 Oct 2012 22:32:52 +0000 (22:32 +0000)]
Don't try to cache the page setting - always set the page before
doing a switch register read/write.

PR: kern/172968

11 years agoNow that device disabling is generic, remove extraneous code from the
Eitan Adler [Mon, 22 Oct 2012 22:29:48 +0000 (22:29 +0000)]
Now that device disabling is generic, remove extraneous code from the
device drivers that used to provide this feature.

This is a subset of 241856 (which was reverted)

Reviewed by: des
Approved by: cperciva (implicit)
MFC after: 1 week

11 years agoRemove __P.
Xin LI [Mon, 22 Oct 2012 21:49:56 +0000 (21:49 +0000)]
Remove __P.

Submitted by: kevlo
Reviewed by: md5(1)
MFC after: 2 months

11 years agoRemove unused `vfslocked' variable.
Ed Schouten [Mon, 22 Oct 2012 21:14:26 +0000 (21:14 +0000)]
Remove unused `vfslocked' variable.

I have no idea what this `vfslocked' thing means. I wonder how it ended
up here.

11 years ago Switch the entire IPv4 stack to keep the IP packet header
Gleb Smirnoff [Mon, 22 Oct 2012 21:09:03 +0000 (21:09 +0000)]
  Switch the entire IPv4 stack to keep the IP packet header
in network byte order. Any host byte order processing is
done in local variables and host byte order values are
never[1] written to a packet.

  After this change a packet processed by the stack isn't
modified at all[2] except for TTL.

  After this change a network stack hacker doesn't need to
scratch his head trying to figure out what is the byte order
at the given place in the stack.

[1] One exception still remains. The raw sockets convert host
byte order before pass a packet to an application. Probably
this would remain for ages for compatibility.

[2] The ip_input() still subtructs header len from ip->ip_len,
but this is planned to be fixed soon.

Reviewed by: luigi, Maxim Dounin <mdounin mdounin.ru>
Tested by: ray, Olivier Cochard-Labbe <olivier cochard.me>

11 years agoAllow building libc++ with any custom -std=xxx flag. Note that using
Dimitry Andric [Mon, 22 Oct 2012 19:44:17 +0000 (19:44 +0000)]
Allow building libc++ with any custom -std=xxx flag.  Note that using
-std=gnu++98 will give a lot of warnings with clang, so please use
-std=c++0x or higher, or use NO_WERROR.

MFC after: 1 week

11 years agoRemove unnecessary chain read lock in ipfw nat 'global' code.
Alexander V. Chernikov [Mon, 22 Oct 2012 19:22:31 +0000 (19:22 +0000)]
Remove unnecessary chain read lock in ipfw nat 'global' code.
Document case when ipfw chain lock must be held while calling ipfw_nat().

MFC after: 2 weeks

11 years agoFix two -Wsystem-header warnings in libc++ that were exposed by the new
Dimitry Andric [Mon, 22 Oct 2012 19:06:00 +0000 (19:06 +0000)]
Fix two -Wsystem-header warnings in libc++ that were exposed by the new
ATF import.  These have also been sent upstream.

MFC after: 1 month

11 years agoMFV: netcat from OpenBSD 5.2.
Xin LI [Mon, 22 Oct 2012 18:56:31 +0000 (18:56 +0000)]
MFV: netcat from OpenBSD 5.2.

MFC after: 1 month

11 years agoVendor import from OpenBSD 5.1.
Xin LI [Mon, 22 Oct 2012 18:47:59 +0000 (18:47 +0000)]
Vendor import from OpenBSD 5.1.

11 years agoImport libc++ trunk r165949. Among other improvements and bug fixes,
Dimitry Andric [Mon, 22 Oct 2012 18:25:04 +0000 (18:25 +0000)]
Import libc++ trunk r165949.  Among other improvements and bug fixes,
this has many visibility problems fixed, which should help with
compiling certain ports that exercise C++11 mode (i.e. Firefox).

Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files,
which are referred to in all the source files.

MFC after: 1 month

11 years agoOptimize syntax to use builtins and reduce unnecessary forking where possible.
Devin Teske [Mon, 22 Oct 2012 18:14:27 +0000 (18:14 +0000)]
Optimize syntax to use builtins and reduce unnecessary forking where possible.

Reviewed by: nwhitehorn
Approved by: adrian (co-mentor)

11 years agoVendor import of libc++ trunk r165949:
Dimitry Andric [Mon, 22 Oct 2012 18:04:00 +0000 (18:04 +0000)]
Vendor import of libc++ trunk r165949:
http://llvm.org/svn/llvm-project/libcxx/trunk@165949

11 years agoResurrect usage.hlp and securelevel.hlp from sysinstall(8) and integrate them
Devin Teske [Mon, 22 Oct 2012 18:01:38 +0000 (18:01 +0000)]
Resurrect usage.hlp and securelevel.hlp from sysinstall(8) and integrate them
into bsdconfig(8).

Approved by: adrian (co-mentor) (implicit)

11 years agoBump __FreeBSD_version and make a note in UPDATING about removal of
Konstantin Belousov [Mon, 22 Oct 2012 17:54:32 +0000 (17:54 +0000)]
Bump __FreeBSD_version and make a note in UPDATING about removal of
the support for non-MPSAFE filesystems.

11 years agoRemove the support for using non-mpsafe filesystem modules.
Konstantin Belousov [Mon, 22 Oct 2012 17:50:54 +0000 (17:50 +0000)]
Remove the support for using non-mpsafe filesystem modules.

In particular, do not lock Giant conditionally when calling into the
filesystem module, remove the VFS_LOCK_GIANT() and related
macros. Stop handling buffers belonging to non-mpsafe filesystems.

The VFS_VERSION is bumped to indicate the interface change which does
not result in the interface signatures changes.

Conducted and reviewed by: attilio
Tested by: pho

11 years agoPull in r165878 from upstream llvm trunk:
Dimitry Andric [Mon, 22 Oct 2012 17:47:37 +0000 (17:47 +0000)]
Pull in r165878 from upstream llvm trunk:

  X86: Disable long nops for all cpus prior to pentiumpro/i686.

This is the safest approach for now.  If you think long nops matter a
lot for performance, compile with -march=i686 or higher. :)

MFC after: 3 days

11 years agoUpdate re members to reality
Eitan Adler [Mon, 22 Oct 2012 17:13:15 +0000 (17:13 +0000)]
Update re members to reality

MFC after: 3 days

11 years agoRemove ZERO_COPY_SOCKETS from kernel configuration as the current
Andre Oppermann [Mon, 22 Oct 2012 15:04:23 +0000 (15:04 +0000)]
Remove ZERO_COPY_SOCKETS from kernel configuration as the current
COW based approach is not safe and should not be used in production.

11 years agoFix typo ('a' and 'o' are not the same letter apparently)
Eitan Adler [Mon, 22 Oct 2012 14:48:14 +0000 (14:48 +0000)]
Fix typo ('a' and 'o' are not the same letter apparently)

Approved by: cperciva (implicit)

11 years agoMake PFIL use per-VNET lock instead of per-AF lock. Since most used packet
Alexander V. Chernikov [Mon, 22 Oct 2012 14:10:17 +0000 (14:10 +0000)]
Make PFIL use per-VNET lock instead of per-AF lock. Since most used packet
filters (ipfw and PF) use the same ruleset with the same lock for both
AF_INET and AF_INET6 there is no need in more fine-grade locking.
However, it is possible to request personal lock by specifying
PFIL_FLAG_PRIVATE_LOCK flag in pfil_head structure (see pfil.9 for
more details).

Export PFIL lock via rw_lock(9)/rm_lock(9)-like API permitting pfil consumers
to use this lock instead of own lock. This help reducing locks on main
traffic path.

pfil_assert() is currently not implemented due to absense of rm_assert().
Waiting for some kind of r234648 to be merged in HEAD.

This change is part of bigger patch reducing routing locking.

Sponsored by: Yandex LLC
Reviewed by: glebius, ae
OK'd by: silence on net@
MFC after: 3 weeks

11 years agoRevert r241756
Warner Losh [Mon, 22 Oct 2012 13:21:11 +0000 (13:21 +0000)]
Revert r241756

11 years agoRevert r241755
Warner Losh [Mon, 22 Oct 2012 13:20:31 +0000 (13:20 +0000)]
Revert r241755