]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoRestore jumbo frame configuration which was broken in r218423.
yongari [Mon, 7 May 2012 04:56:26 +0000 (04:56 +0000)]
Restore jumbo frame configuration which was broken in r218423.

Submitted by: Andrey Zonov <andrey <> zonov dot org > (initial version)
Tested by: Andrey Zonov <andrey <> zonov dot org >
MFC after: 1 week

12 years agoAdd basic SMP support for GXemul. Ideally we would have some way to override
jmallett [Mon, 7 May 2012 04:36:48 +0000 (04:36 +0000)]
Add basic SMP support for GXemul.  Ideally we would have some way to override
some of the IPI mechanisms used by the common MIPS SMP code so we could use
the multicast IPI facilities, on GXemul as well as on several real hardware
platforms, and the ability to have multiple hard IPI types.

12 years agoAdd a trivial driver for the GXemul Ethernet device. Probably quite buggy and
jmallett [Mon, 7 May 2012 04:15:46 +0000 (04:15 +0000)]
Add a trivial driver for the GXemul Ethernet device.  Probably quite buggy and
certainly non-optimal, but enough for basic networking use.

Requested by: rwatson

12 years ago- Bump the manpage date after kfd addition.
stas [Mon, 7 May 2012 02:50:52 +0000 (02:50 +0000)]
- Bump the manpage date after kfd addition.

Reported by: gjb

12 years ago- Document kfd(8) rc.conf variables in the manpage.
stas [Sun, 6 May 2012 21:05:58 +0000 (21:05 +0000)]
- Document kfd(8) rc.conf variables in the manpage.

12 years ago- Change kfd rc script to be more conformant with rcNG conventions:
stas [Sun, 6 May 2012 20:46:04 +0000 (20:46 +0000)]
- Change kfd rc script to be more conformant with rcNG conventions:
  o change rcname to kfd;
  o move mandatory options to command_args;
  o add missing "shutdown" keyword;
  o fix require line.  Kfd doesn't really need to be started before
    daemons.

Suggested by: dougb

12 years agoOpenBSD 5.1 added.
pluknet [Sun, 6 May 2012 19:03:36 +0000 (19:03 +0000)]
OpenBSD 5.1 added.

12 years agoAdd definition for the -z nodefaultlib flag.
kib [Sun, 6 May 2012 18:34:31 +0000 (18:34 +0000)]
Add definition for the -z nodefaultlib flag.

MFC after: 3 days

12 years agoRemove some hardcoded constants from code.
mav [Sun, 6 May 2012 16:41:27 +0000 (16:41 +0000)]
Remove some hardcoded constants from code.

12 years agoOoops. Back out changes to main.c from r235094.
kientzle [Sun, 6 May 2012 16:32:28 +0000 (16:32 +0000)]
Ooops.  Back out changes to main.c from r235094.

This change is specific to BeagleBone; I need to figure out how to
generalize this before committing.

12 years agoDon't call strcmp with a NULL pointer.
kientzle [Sun, 6 May 2012 16:01:58 +0000 (16:01 +0000)]
Don't call strcmp with a NULL pointer.

In particular, on the AM335x, which comes up with no memory
mapped to low addresses, dereferencing the NULL causes a crash.

12 years agoAddress clang warnings.
tuexen [Sun, 6 May 2012 14:50:54 +0000 (14:50 +0000)]
Address clang warnings.

MFC after: 3 days

12 years agoAdd support for the sac_info field in struct sctp_assoc_change
tuexen [Sun, 6 May 2012 13:09:13 +0000 (13:09 +0000)]
Add support for the sac_info field in struct sctp_assoc_change
as required by RFC 6458.

MFC after: 3 days

12 years agoPlug small memory leaks.
mav [Sun, 6 May 2012 12:55:20 +0000 (12:55 +0000)]
Plug small memory leaks.

12 years agoFix offset calculation to actually rewrite the _last_ block.
trasz [Sun, 6 May 2012 11:48:37 +0000 (11:48 +0000)]
Fix offset calculation to actually rewrite the _last_ block.

12 years agoFix make depend
uqs [Sun, 6 May 2012 11:41:00 +0000 (11:41 +0000)]
Fix make depend

12 years agoRemove debug code.
tuexen [Sun, 6 May 2012 11:37:41 +0000 (11:37 +0000)]
Remove debug code.

MFC after: 3 days

12 years agoAdd support for RAID5R. Slightly improve support for RAIDMDF.
mav [Sun, 6 May 2012 11:32:36 +0000 (11:32 +0000)]
Add support for RAID5R. Slightly improve support for RAIDMDF.

12 years agoAdd support for SCTP_SEND_FAILED_EVENT as required by RFC 6458.
tuexen [Sun, 6 May 2012 11:02:53 +0000 (11:02 +0000)]
Add support for SCTP_SEND_FAILED_EVENT as required by RFC 6458.

MFC after: 3 days

12 years agoAdd a driver for the GXemul test machine's disk controller and disk devices.
jmallett [Sun, 6 May 2012 08:28:08 +0000 (08:28 +0000)]
Add a driver for the GXemul test machine's disk controller and disk devices.
Prefer it to using an md device in the GXEMUL kernel configuration.

Requested by: rwatson, theraven

12 years agoFix the MACHINE_ARCH for big endian arm to be armeb.
imp [Sun, 6 May 2012 07:20:48 +0000 (07:20 +0000)]
Fix the MACHINE_ARCH for big endian arm to be armeb.

12 years agoAdd description for GEOM RAID tunables/sysctls.
mav [Sun, 6 May 2012 06:25:17 +0000 (06:25 +0000)]
Add description for GEOM RAID tunables/sysctls.

MFC after: 1 week

12 years agoGet the memory size from the gxemul mp device. Don't dump the environment if
jmallett [Sun, 6 May 2012 05:58:56 +0000 (05:58 +0000)]
Get the memory size from the gxemul mp device.  Don't dump the environment if
it is not present.

12 years agoFix `gmultipath configure` for big-endian machines.
mav [Sun, 6 May 2012 05:49:23 +0000 (05:49 +0000)]
Fix `gmultipath configure` for big-endian machines.

MFC after: 1 week

12 years agoFix mis-merged line, move SC_LOOKUP() call to
davidxu [Sat, 5 May 2012 23:51:24 +0000 (23:51 +0000)]
Fix mis-merged line, move SC_LOOKUP() call to
upper level.

12 years agoProvide the flags in the SCTP stream reconfig related notification
tuexen [Sat, 5 May 2012 21:41:16 +0000 (21:41 +0000)]
Provide the flags in the SCTP stream reconfig related notification
as specified in RFC 6525.

MFC after: 3 days

12 years agoHonor SCTP_ENABLE_STREAM_RESET socket option when processing incoming
tuexen [Sat, 5 May 2012 20:07:33 +0000 (20:07 +0000)]
Honor SCTP_ENABLE_STREAM_RESET socket option when processing incoming
requests. Fix also the provided result in the response and use names
as specified in RFC 6525.

MFC after: 3 days

12 years ago- >500 static DTrace probes for the linuxulator
netchild [Sat, 5 May 2012 19:42:38 +0000 (19:42 +0000)]
- >500 static DTrace probes for the linuxulator
- DTrace scripts to check for errors, performance, ...
  they serve mostly as examples of what you can do with the static probe;s
  with moderate load the scripts may be overwhelmed, excessive lock-tracing
  may influence program behavior (see the last design decission)

Design decissions:
 - use "linuxulator" as the provider for the native bitsize; add the
   bitsize for the non-native emulation (e.g. "linuxuator32" on amd64)
 - Add probes only for locks which are acquired in one function and released
   in another function. Locks which are aquired and released in the same
   function should be easy to pair in the code, inter-function
   locking is more easy to verify in DTrace.
 - Probes for locks should be fired after locking and before releasing to
   prevent races (to provide data/function stability in DTrace, see the
   man-page of "dtrace -v ..." and the corresponding DTrace docs).

12 years agoI need to change uname -p, not uname -m, so back this out.
imp [Sat, 5 May 2012 17:20:12 +0000 (17:20 +0000)]
I need to change uname -p, not uname -m, so back this out.
Also, fix a couple of style(9) issues while I'm here.

Submitted by: nathanw, bde

12 years ago- Add my mentor/mentee relationship to committers-doc.dot.
issyl0 [Sat, 5 May 2012 16:50:12 +0000 (16:50 +0000)]
- Add my mentor/mentee relationship to committers-doc.dot.
(where me = issyl0)

Approved by: gabor (mentor)

12 years agoopen the resolved path
bapt [Sat, 5 May 2012 16:37:14 +0000 (16:37 +0000)]
open the resolved path
fix debug message

Submitted by: John Marino <draco@marino.st>
Approved by: des (mentor)

12 years agoMake sure a few new internal clang headers get installed, I missed these
dim [Sat, 5 May 2012 15:35:22 +0000 (15:35 +0000)]
Make sure a few new internal clang headers get installed, I missed these
in the last import.  They are sometimes needed when you want to use
advanced instructions.

Also, add clang's internal stdalign.h header to ObsoleteFiles.inc, since
it is redundant: we already have a stdalign.h header in /usr/include.

Pointy hat to: dim
PR: kern/167574
Submitted by: jkim
Reported by: Oliver Hartmann <ohartman@zedat.fu-berlin.de>
MFC after: 2 weeks

12 years agoDo error checking for the SCTP_RESET_STREAMS, SCTP_RESET_ASSOC,
tuexen [Sat, 5 May 2012 14:06:15 +0000 (14:06 +0000)]
Do error checking for the SCTP_RESET_STREAMS, SCTP_RESET_ASSOC,
and SCTP_ADD_STREAMS socket options as specified by RFC 6525.

MFC after: 3 days

12 years agoWork around a situation where symlook_obj() could be called for the
kib [Sat, 5 May 2012 11:26:08 +0000 (11:26 +0000)]
Work around a situation where symlook_obj() could be called for the
object for which digest_dynamic1() was not done yet. Just return
EINVAL and do not try to dereference NULL buckets hash array.

This seems to happen on ia64 for rtld object itself, where the
R_IA_64_FPTR64LSB relocations require symbol lookup. The dynamic
linker itself does not rely on identity of the C-level function
pointers (i.e. function descriptors).

Reported and reviewed by: marcel
MFC after:   8 days

12 years agoFix mount mutex handling missed in r234386.
pluknet [Sat, 5 May 2012 09:34:35 +0000 (09:34 +0000)]
Fix mount mutex handling missed in r234386.

12 years agoBig endian arm boxes need to have a uname -m of armeb, not arm, so
imp [Sat, 5 May 2012 07:15:34 +0000 (07:15 +0000)]
Big endian arm boxes need to have a uname -m of armeb, not arm, so
that the bootstrap from source works correctly.

MFC after: 4 days

12 years agoFix off-by-one error in sati_inquiry_block_device_translate_data(). Bug would
jimharris [Fri, 4 May 2012 23:45:34 +0000 (23:45 +0000)]
Fix off-by-one error in sati_inquiry_block_device_translate_data().  Bug would
result in INQUIRY VPD 0x81 to SATA devices to return only 63 bytes of data
instead of 64 during SCSI/ATA translation.

Sponsored by: Intel
Approved by: scottl
MFC after: 1 week

12 years agoDon't assume we have legacy PICs (i.e. 8259A in cascade) at the legacy
marcel [Fri, 4 May 2012 23:16:29 +0000 (23:16 +0000)]
Don't assume we have legacy PICs (i.e. 8259A in cascade) at the legacy
I/O port addresses. Even if we do, this is hardly the place to mask
interrupts. It's not clear that this was at all needed. The code came
with CVS revision 1.2 of nexus.c when interrupt support was first added.
What is known is that ia64 has always been designed around the IOSAPIC,
and that doing I/O like this prevents Altix from booting.

12 years agoFix the returns in mfi_tbolt_sync_map_info. I forgot to change
ambrisko [Fri, 4 May 2012 22:54:54 +0000 (22:54 +0000)]
Fix the returns in mfi_tbolt_sync_map_info.  I forgot to change
them to cleanup and goto out when acknowledging the LD's.  Check
for failure on malloc.  Remove a couple of extra lines and remove
the spurious return.

Prompted by: Petr Lampa
MFC after: 3 days

12 years agoUpdate FREEBSD-vendor to reflect the current version.
delphij [Fri, 4 May 2012 21:06:53 +0000 (21:06 +0000)]
Update FREEBSD-vendor to reflect the current version.

12 years agoMerge from OpenBSD 5.1.
delphij [Fri, 4 May 2012 21:03:39 +0000 (21:03 +0000)]
Merge from OpenBSD 5.1.

MFC after: 3 weeks

12 years agoAdd ToS definitions for DiffServ Codepoints as per RFC2474.
delphij [Fri, 4 May 2012 21:00:32 +0000 (21:00 +0000)]
Add ToS definitions for DiffServ Codepoints as per RFC2474.

Obtained from: OpenBSD
MFC after: 2 weeks

12 years agoFix a couple of sc_ac2q[] mappings that were using the TID, not the AC.
adrian [Fri, 4 May 2012 20:31:27 +0000 (20:31 +0000)]
Fix a couple of sc_ac2q[] mappings that were using the TID, not the AC.

PR: kern/167588

12 years agoDon't ignore start offset value when user specifies it together
ae [Fri, 4 May 2012 19:49:24 +0000 (19:49 +0000)]
Don't ignore start offset value when user specifies it together
with alignment.

PR: bin/167567
Tested by: Warren Block
MFC after: 1 week

12 years agoComplete commit message for r235024:
jkim [Fri, 4 May 2012 18:54:51 +0000 (18:54 +0000)]
Complete commit message for r235024:

Use MADT to match ACPI Processor objects to CPUs.  MADT and DSDT/SSDTs may
list CPUs in different orders, especially for disabled logical cores.  Now
we match ACPI IDs from the MADT with Processor objects, strictly order CPUs
accordingly, and ignore disabled cores.  This prevents us from executing
methods for other CPUs, e. g., _PSS for disabled logical core, which may not
exist.  Unfortunately, it is known that there are a few systems with buggy
BIOSes that do not have unique ACPI IDs for MADT and Processor objects.  To
work around these problems, 'debug.acpi.cpu_unordered' tunable is added.
Set this to a non-zero value to restore the old behavior.
Many thanks to jhb for pointing me to the right direction and the manual
page change.

Reported by: Harris, James R (james dot r dot harris at intel dot com)
Tested by: Harris, James R (james dot r dot harris at intel dot com)
Reviewed by: jhb
MFC after: 1 month

12 years agoUse MADT to match ACPI Processor objects to CPUs. MADT and DSDT/SSDTs may
jkim [Fri, 4 May 2012 18:24:38 +0000 (18:24 +0000)]
Use MADT to match ACPI Processor objects to CPUs.  MADT and DSDT/SSDTs may
list CPUs in different orders, especially for disabled logical cores.  Now
we match ACPI IDs from the MADT with Processor objects, strictly order CPUs
accordingly, and ignore disabled cores.  This prevents us from executing
methods for other CPUs, e. g., _PSS for disabled logical core, which may not
exist.  Unfortunately, it is known that there are a few systems with buggy
BIOSes that do not have unique ACPI IDs for MADT and Processor objects.  To
work around these problems

12 years agoAdd support for the SCTP_ENABLE_STREAM_RESET socket option to
tuexen [Fri, 4 May 2012 17:18:02 +0000 (17:18 +0000)]
Add support for the SCTP_ENABLE_STREAM_RESET socket option to
getsockopt(). This improves the support of RFC 6525.

MFC after: 3 days

12 years agoSome style improvements.
ambrisko [Fri, 4 May 2012 16:22:13 +0000 (16:22 +0000)]
Some style improvements.

12 years agoFirst fix pr 167226:
ambrisko [Fri, 4 May 2012 16:00:39 +0000 (16:00 +0000)]
First fix pr 167226:
ThunderBolt cannot read sector >= 2^32 or 2^21
with supplied patch.

Second the bigger change, fix RAID operation on ThunderBolt base
card such as physically removing a disk from a RAID and replacing
it.  The current situation is the RAID firmware effectively hangs
waiting for an acknowledgement from the driver.  This is due to
the firmware support of the driver actually accessing the RAID
from under the firmware.  This is an interesting feature that
the FreeBSD driver does not use.  However, when the firmare
detects the driver has attached it then expects the driver will
synchronize LD's with the firmware.  If the driver does not sync.
then the management part of the firmware will hang waiting for
it so a pulled driver will listed as still there.

The fix for this problem isn't extremely difficult.  However,
figuring out why some of the code was the way it was and then
redoing it was involved.  Not have a spec. made it harder to
try to figure out.  The existing driver would send a
MFI_DCMD_LD_MAP_GET_INFO command in write mode to acknowledge
a LD state change.  In read mode it gets the RAID map from the
firmware.  The FreeBSD driver doesn't do that currently.  It
could be added in the future with the appropriate structures.
To simplify things, get the current LD state and then build
the MFI_DCMD_LD_MAP_GET_INFO/write command so that it sends
an acknowledgement for each LD.  The map would probably state
which LD's changed so then the driver could probably just
acknowledge the LD's that changed versus all.  This doesn't seem
to be a problem.  When a MFI_DCMD_LD_MAP_GET_INFO/write command
is sent to the firmware, it will complete later when a change
to the LD's happen.  So it is very much like an AEN command
returning when something happened.  When the
MFI_DCMD_LD_MAP_GET_INFO/write command completes, we refire the
sync'ing of the LD state.  This needs to be done in as an event
so that MFI_DCMD_LD_GET_LIST can wait for that command to
complete before issuing the MFI_DCMD_LD_MAP_GET_INFO/write.
The prior code didn't use the call-back function and tried
to intercept the MFI_DCMD_LD_MAP_GET_INFO/write command when
processing an interrupt.  This added a bunch of code complexity
to the interrupt handler.  Using the call-back that is done
for other commands got rid of this need.  So the interrupt
handler is greatly simplified.  It seems that even commands
that shouldn't be acknowledged end up in the interrupt handler.
To deal with this, code was added to check to see if a command
is in the busy queue or not.  This might have contributed to the
interrupt storm happening without MSI enabled on these cards.

Note that MFI_DCMD_LD_MAP_GET_INFO/read returns right away.

It would be interesting to see what other complexity could
be removed from the ThunderBolt driver that really isn't
needed in our mode of operation.  Letting the RAID firmware
do all of the I/O to disks is a lot faster since it can
use its caches.  It greatly simplifies what the driver has
to do and potential bugs if the driver and firmware are
not in sync.

Simplify the aen_abort/cm_map_abort and put it in the softc
versus in the command structure.

This should get merged to 9 before the driver is merged to
8.

PR: 167226
Submitted by: Petr Lampa
MFC after: 3 days

12 years agoFix final bugs in memory barriers on PowerPC:
nwhitehorn [Fri, 4 May 2012 16:00:22 +0000 (16:00 +0000)]
Fix final bugs in memory barriers on PowerPC:
- Use isync/lwsync unconditionally for acquire/release. Use of isync
  guarantees a complete memory barrier, which is important for serialization
  of bus space accesses with mutexes on multi-processor systems.
- Go back to using sync as the I/O memory barrier, which solves the same
  problem as above with respect to mutex release using lwsync, while not
  penalizing non-I/O operations like a return to sync on the atomic release
  operations would.
- Place an acquisition barrier around thread lock acquisition in
  cpu_switchin().

12 years agoAdd support for SCTP_STREAM_CHANGE_EVENT, SCTP_ASSOC_RESET_EVENT as
tuexen [Fri, 4 May 2012 15:49:08 +0000 (15:49 +0000)]
Add support for SCTP_STREAM_CHANGE_EVENT, SCTP_ASSOC_RESET_EVENT as
required by RFC 6525. This also fixes SCTP_STREAM_RESET_EVENT.

MFC after: 3 days

12 years agoAdd bootcamp bootloader stamp
jpaetzel [Fri, 4 May 2012 15:39:41 +0000 (15:39 +0000)]
Add bootcamp bootloader stamp

Submitted by: kmoore
Obtained from: PC-BSD
MFC after: 3 days
Sponsored by: iXsystems

12 years agoAdd powerpc / powerpc64 support to pc-sysinstall. This patch will
jpaetzel [Fri, 4 May 2012 15:36:51 +0000 (15:36 +0000)]
Add powerpc / powerpc64 support to pc-sysinstall. This patch will
autodetect if on powerpc and use the APM gpart GEOM class
automaticaly.  At this time support for full disk installation is
the only supported scheme.

Submitted by: kmoore
Obtained from: PC-BSD
MFC after: 3 days
Sponsored by: iXsystems

12 years agoUse a unique zpool name during install, in the case of having another
jpaetzel [Fri, 4 May 2012 15:31:35 +0000 (15:31 +0000)]
Use a unique zpool name during install, in the case of having another
PC-BSD / FreeBSD zpool on the system for another install.

Submitted by: kmoore
Obtained from: PC-BSD
MFC after: 3 days
Sponsored by: iXsystems

12 years agoRemove debug output.
tuexen [Fri, 4 May 2012 10:26:50 +0000 (10:26 +0000)]
Remove debug output.

MFC after: 3 days

12 years agoCall panic() only under INVARIANTS.
tuexen [Fri, 4 May 2012 10:06:08 +0000 (10:06 +0000)]
Call panic() only under INVARIANTS.

MFC after: 3 days

12 years agoUse SCTP_PRINTF() instead of printf() in all SCTP sources.
tuexen [Fri, 4 May 2012 09:27:00 +0000 (09:27 +0000)]
Use SCTP_PRINTF() instead of printf() in all SCTP sources.

MFC after: 3 days

12 years agoFix bug causing memory corruption and panics with big-endian metadata.
mav [Fri, 4 May 2012 08:59:19 +0000 (08:59 +0000)]
Fix bug causing memory corruption and panics with big-endian metadata.

12 years agoImplement read-only support for volumes in optimal state (without using
mav [Fri, 4 May 2012 07:32:57 +0000 (07:32 +0000)]
Implement read-only support for volumes in optimal state (without using
redundancy) for the following RAID levels: RAID4/5E/5EE/6/MDF.

12 years agoDisable setting the MII port speed.
adrian [Fri, 4 May 2012 02:26:15 +0000 (02:26 +0000)]
Disable setting the MII port speed.

This seems to break at least my test board here (AR71xx + AR8316 switch
PHY).  Since I do have a whole sleuth of "normal" PHY boards (with
an AR71xx on a normal PHY port), I'll do some further testing with those
to determine whether this is a general issue, or whether it's limited
to the behaviour of the "fake" dedicated PHY port mode on these atheros
switches.

12 years agoFix some issues creating zpool mirror / raidz1(2)(3) devices.
jpaetzel [Thu, 3 May 2012 21:53:25 +0000 (21:53 +0000)]
Fix some issues creating zpool mirror / raidz1(2)(3) devices.
Fix issues stamping boot on other ZFS drives, now you can boot after removing
mirror drive.

Submitted by: kmoore
Obtained from: PC-BSD
MFC after: 3 days
Sponsored by: iXsystems

12 years agoRevert part of r234723 by re-enabling the SMP protection for
attilio [Thu, 3 May 2012 21:44:01 +0000 (21:44 +0000)]
Revert part of r234723 by re-enabling the SMP protection for
intr_bind() on x86.
This has been requested by jhb and I strongly disagree with this,
but as long as he is the x86 and interrupt subsystem maintainer I will
follow his directives.

The disagreement cames from what we should really consider as a
public KPI. IMHO, if we really need a selection between the kernel
functions, we may need an explicit protection like _KERNEL_KPI, which
defines which subset of the kernel function might really be considered
as part of the KPI (for thirdy part modules) and which not.
As long as we don't have this mechanism I just consider any possible
function as usable by thirdy part code, thus intr_bind() included.

MFC after: 1 week

12 years agoAdd a meta-parameter IP__NULL to enum intparam, instead of mixing
jamie [Thu, 3 May 2012 21:39:23 +0000 (21:39 +0000)]
Add a meta-parameter IP__NULL to enum intparam, instead of mixing
enum values and zeroes.  This keeps clang happy (and is just good form).

Submitted by: dim

12 years agoAdd the ability to configure multiple interfaces.
jpaetzel [Thu, 3 May 2012 21:21:45 +0000 (21:21 +0000)]
Add the ability to configure multiple interfaces.

Submitted by: glarkin
Obtained from: PC-BSD
MFC after: 3 days

12 years agoprint 'netmap stack ring full' only in verbose mode.
luigi [Thu, 3 May 2012 21:16:53 +0000 (21:16 +0000)]
print 'netmap stack ring full' only in verbose mode.

12 years agoFix parsing values which contain multiple "=" signs.
jpaetzel [Thu, 3 May 2012 21:15:47 +0000 (21:15 +0000)]
Fix parsing values which contain multiple "=" signs.

Submitted by: glarkin
MFC after: 3 days
Sponsored by: iXsystems

12 years agoindicate the time per packet in nanoseconds.
luigi [Thu, 3 May 2012 21:03:21 +0000 (21:03 +0000)]
indicate the time per packet in nanoseconds.

12 years agoOmit clang when building picobsd, it takes way too long.
luigi [Thu, 3 May 2012 20:50:55 +0000 (20:50 +0000)]
Omit clang when building picobsd, it takes way too long.
Also note that loader.conf support is incomplete.

12 years agoUpgrade our copy of llvm/clang to r155985, from upstream's release_31
dim [Thu, 3 May 2012 20:41:21 +0000 (20:41 +0000)]
Upgrade our copy of llvm/clang to r155985, from upstream's release_31
branch.  This brings us very close to the 3.1 release, which is planned
for May 14th.

MFC after: 2 weeks

12 years agoMove the code to call the callout callback into the helper function
kib [Thu, 3 May 2012 20:00:30 +0000 (20:00 +0000)]
Move the code to call the callout callback into the helper function
softclock_call_cc(). While there, move some common code to callout_cc_del().

Requested by: avg, jhb
Reviewed by: jhb
MFC after:    1 week

12 years agoImport new version of libc++. Among other improvements, this comes with an
theraven [Thu, 3 May 2012 17:44:07 +0000 (17:44 +0000)]
Import new version of libc++.  Among other improvements, this comes with an
<atomic> header that works with clang 3.1 (and, importantly, the pre-3.1
snapshot currently in head)

12 years agoadd support for pcap receive statistics (used by net-mgmt/darkstat)
luigi [Thu, 3 May 2012 17:08:40 +0000 (17:08 +0000)]
add support for pcap receive statistics (used by net-mgmt/darkstat)

12 years agoVendor import of clang release_31 branch r155985:
dim [Thu, 3 May 2012 16:53:59 +0000 (16:53 +0000)]
Vendor import of clang release_31 branch r155985:
http://llvm.org/svn/llvm-project/cfe/branches/release_31@155985

12 years agoVendor import of llvm release_31 branch r155985:
dim [Thu, 3 May 2012 16:50:55 +0000 (16:50 +0000)]
Vendor import of llvm release_31 branch r155985:
http://llvm.org/svn/llvm-project/llvm/branches/release_31@155985

12 years agoadd some performance data
luigi [Thu, 3 May 2012 16:09:44 +0000 (16:09 +0000)]
add some performance data

12 years agoMake sure the EHCI bandwidth allocation algorithm
hselasky [Thu, 3 May 2012 16:06:22 +0000 (16:06 +0000)]
Make sure the EHCI bandwidth allocation algorithm
for FULL speed SPLIT transactions works fully.

MFC after: 1 week

12 years agoFix <stdatomic.h> after clang decided to rename all of its builtins to include
theraven [Thu, 3 May 2012 15:54:06 +0000 (15:54 +0000)]
Fix <stdatomic.h> after clang decided to rename all of its builtins to include
a c11 prefix to disambiguate them from the one provided by GCC.

Note: Clang 3.1 also supports the GCC builtins for libstdc++ 4.7 compatibility,
but I don't recommend using them because they are very poorly designed.

MFC after: 2 weeks

12 years agoCheck vplabel for NULL before dereferencing it. Fixes a panic
brueffer [Thu, 3 May 2012 15:51:34 +0000 (15:51 +0000)]
Check vplabel for NULL before dereferencing it.  Fixes a panic
when running atop with MAC_MLS enabled.

Submitted by: Richard Kojedzinszky <krichy@tvnetwork.hu>
Reviewed by: rwatson
MFC after: 1 week

12 years ago- add code to run pkt-gen on top of libpcap so we can see the
luigi [Thu, 3 May 2012 15:37:05 +0000 (15:37 +0000)]
- add code to run pkt-gen on top of libpcap so we can see the
  difference from a native API

- add some testing options, such as conditional prefetching and
  packet copy.

12 years ago- correct a bug in pcap_dispatch(): a count of 0 means infinity.
luigi [Thu, 3 May 2012 15:34:44 +0000 (15:34 +0000)]
- correct a bug in pcap_dispatch(): a count of 0 means infinity.

- in pcap_dispatch(), issue a prefetch on the buffer before the
  callback, this may save a little bit of time if the client
  is very fast.

- in pcap_inject(), use a fast copy routine, which also helps
  saving a few nanoseconds with fast clients.

12 years agoFix multiple OpenSSL vulnerabilities.
bz [Thu, 3 May 2012 15:25:11 +0000 (15:25 +0000)]
Fix multiple OpenSSL vulnerabilities.

Security: CVE-2011-4576, CVE-2011-4619, CVE-2011-4109
Security: CVE-2012-0884, CVE-2012-2110
Security: FreeBSD-SA-12:01.openssl
Approved by: so (bz,simon)

12 years agoGrammar and markup fixes.
bjk [Thu, 3 May 2012 13:08:11 +0000 (13:08 +0000)]
Grammar and markup fixes.

PR: docs/159854
Approved by: hrs (mentor)

12 years agoWhen callout_reset_on() cannot immediately migrate a callout since it
kib [Thu, 3 May 2012 10:38:02 +0000 (10:38 +0000)]
When callout_reset_on() cannot immediately migrate a callout since it
is running on other cpu, the CALLOUT_PENDING flag is temporarily
cleared. Then, callout_stop() on this, in fact active, callout fails
because CALLOUT_PENDING is not set, and callout_stop() returns 0.

Now, in sleepq_check_timeout(), the failed callout_stop() causes the
sleepq code to execute mi_switch() without even setting the wmesg,
since the switch-out is supposed to be transient. In fact, the thread
is put off the CPU for full timeout interval, instead of being put on
runq immediately.  Until timeout fires, the process is unkillable for
obvious reasons.

Fix this by marking the migrating callouts with CALLOUT_DFRMIGRATION
flag. The flag is cleared by callout_stop_safe() when the function
detects a migration, besides returning the success. The softclock()
rechecks the flag for migrating callout and cancels its execution if
the flag was cleared meantime.

PR:  misc/166340
Reported, debugging traces provided and tested by:
Christian Esken <christian.esken trivago com>
Reviewed by:  avg, jhb
MFC after:  1 week

12 years agoFix another RFC 6458 issue. Spotted by Irene Ruengeler.
tuexen [Thu, 3 May 2012 10:26:33 +0000 (10:26 +0000)]
Fix another RFC 6458 issue. Spotted by Irene Ruengeler.

MFC after: 3 days

12 years agoMFp4:
davidxu [Thu, 3 May 2012 09:17:31 +0000 (09:17 +0000)]
MFp4:
Enqueue thread in LIFO, this can cause starvation, but it gives better
performance. Use _thr_queuefifo to control the frequency of FIFO vs LIFO,
you can use environment string LIBPTHREAD_QUEUE_FIFO to configure the
variable.

12 years agoRevert r234834 per luigi@ request.
melifaro [Thu, 3 May 2012 08:56:43 +0000 (08:56 +0000)]
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)

12 years agoIn the new world order, multiphy is now when the phymask is 0x0.
adrian [Thu, 3 May 2012 07:48:19 +0000 (07:48 +0000)]
In the new world order, multiphy is now when the phymask is 0x0.

This makes the TP-WN1043ND (ar913x based) work again.

12 years agofixed a unionfs_readdir math issue
daichi [Thu, 3 May 2012 07:22:29 +0000 (07:22 +0000)]
fixed a unionfs_readdir math issue

PR: 132987
Submitted by: Matthew Fleming <mfleming@isilon.com>

12 years agoFix a totally bone-headed, last minute bounds check snafu that somehow
adrian [Thu, 3 May 2012 05:52:39 +0000 (05:52 +0000)]
Fix a totally bone-headed, last minute bounds check snafu that somehow
I must've missed when booting a test kernel.

This has been validated on the AR7161.

12 years agoAdd optional -o argument to the `graid label ` to specify some metadata
mav [Thu, 3 May 2012 05:32:56 +0000 (05:32 +0000)]
Add optional -o argument to the `graid label ` to specify some metadata
format options. Use it for specifying byte order for the DDF metadata:
big-endian defined by specification and little-endian used by Adaptec.

12 years agoRelax restriction on direct tx to child ports
emaste [Thu, 3 May 2012 01:41:12 +0000 (01:41 +0000)]
Relax restriction on direct tx to child ports

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

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

PR: kern/138620
Approved by: thompsa@

12 years agoPrefer the use of csup to cvsup when talking about the binary.
eadler [Wed, 2 May 2012 21:50:13 +0000 (21:50 +0000)]
Prefer the use of csup to cvsup when talking about the binary.

PR: docs/167459
Submitted by: "Bryan Drewery" <bryan@shatow.net>
Approved by: bcr
MFC after: 1 week

12 years agoAdd YY_NO_INPUT so clang doesn't complain about "input" not being used.
jamie [Wed, 2 May 2012 21:24:08 +0000 (21:24 +0000)]
Add YY_NO_INPUT so clang doesn't complain about "input" not being used.

12 years agoUpdate man page date to the date of the last commit.
monthadar [Wed, 2 May 2012 20:01:28 +0000 (20:01 +0000)]
Update man page date to the date of the last commit.

Approved by: adrian

12 years agoAdded D_TRACKCLOSE to sndstat_cdevsw to fix the situation when
pho [Wed, 2 May 2012 19:32:11 +0000 (19:32 +0000)]
Added D_TRACKCLOSE to sndstat_cdevsw to fix the situation when
another process is in open() or stat() for the device node, then
close() from the owning process does not result in cdevsw close
method call. This fixes the pemanent "Device busy" seen.

Changed the sndstat_lock from mutex to sx.  This allows to extend
the region covered by the lock, to include the uiomove() call in
sndstat_read() and bufptr increment. This fixes the "panic:
sbuf_put_byte called with finished or corrupt sbuf" seen.

In collaboration with: kib
MFC after: 1 week

12 years agoFix comment about what board this is really for left over from early
imp [Wed, 2 May 2012 18:41:58 +0000 (18:41 +0000)]
Fix comment about what board this is really for left over from early
cut and paste.

12 years agoFix so that ,usr and ,os work correctly with fixed function (IAF)
gnn [Wed, 2 May 2012 16:23:36 +0000 (16:23 +0000)]
Fix so that ,usr and ,os work correctly with fixed function (IAF)
counters.

MFC after: 1 week

12 years agoCatch-up with r232853 and remove platform APIs which are not used by any
bz [Wed, 2 May 2012 14:38:43 +0000 (14:38 +0000)]
Catch-up with r232853 and remove platform APIs which are not used by any
code and which had only stub implementations or no implementation on all
platforms.  Makes gxemul compile.

Hinted by: rwatson
MFC after: 3 weeks
X-MFC by: rwatson:

12 years ago- Don't log messages saying that accounting is being disabled and enabled
jhb [Wed, 2 May 2012 14:25:39 +0000 (14:25 +0000)]
- Don't log messages saying that accounting is being disabled and enabled
  if the accounting log file is atomically replaced with a new file
  (such as during log rotation).
- Simplify accounting log rotation a bit.  There is no need to re-run
  accton(8) after renaming the new log file to it's real name.

PR: kern/167321
Tested by: Jeremy Chadwick

12 years agomips/mips64eb became mips/mips64 while I wasn't looking (whoops), so update
rwatson [Wed, 2 May 2012 12:15:34 +0000 (12:15 +0000)]
mips/mips64eb became mips/mips64 while I wasn't looking (whoops), so update
GXEMUL kernel config for the new world order.

Spotted by: bz
MFC after: 3 weeks