]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoSeparate out the Software RNG entropy harvesting queue and thread into its own files.
markm [Fri, 30 Aug 2013 11:42:57 +0000 (11:42 +0000)]
Separate out the Software RNG entropy harvesting queue and thread into its own files.

Submitted by:  Arthur Mesh <arthurmesh@gmail.com>

10 years agoMFC
markm [Fri, 30 Aug 2013 11:38:34 +0000 (11:38 +0000)]
MFC

10 years agoThe round of expand_number() cleanups.
pluknet [Fri, 30 Aug 2013 11:21:52 +0000 (11:21 +0000)]
The round of expand_number() cleanups.
o Fix range error checking to detect overflow when uint64_t < uintmax_t.
o Remove a non-functional check for no valid digits as pointed out by Bruce.
o Remove a rather pointless comment describing what the function does.
o Clean up a bunch of style bugs.

Brucified by: bde

10 years agosh: Cast -1 to pointer rather than pointer to variable of wrong type.
jilles [Fri, 30 Aug 2013 10:45:02 +0000 (10:45 +0000)]
sh: Cast -1 to pointer rather than pointer to variable of wrong type.

NEOF needs to be a non-null pointer distinct from valid union node pointers.
It is not dereferenced.

The new NEOF is much like SIG_ERR except that it is an object pointer
instead of a function pointer.

The variable tokpushback can now be static.

10 years agoSimplify pause_sbt() logic. Don't call DELAY() if remainder is less
hselasky [Fri, 30 Aug 2013 10:39:56 +0000 (10:39 +0000)]
Simplify pause_sbt() logic. Don't call DELAY() if remainder is less
than or equal to zero.

10 years agoTypo in strtol(3).
pluknet [Fri, 30 Aug 2013 10:01:19 +0000 (10:01 +0000)]
Typo in strtol(3).

Noticed by: bde

10 years agoImplement support for the process-context identifiers ('PCID') on
kib [Fri, 30 Aug 2013 07:59:49 +0000 (07:59 +0000)]
Implement support for the process-context identifiers ('PCID') on
Intel CPUs.  The feature tags TLB entries with the Id of the address
space and allows to avoid TLB invalidation on the context switch, it
is available only in the long mode.  In the microbenchmarks, using the
PCID decreased latency of the context switches by ~30% on SandyBridge
class desktop CPUs, measured with the lat_ctx program from lmbench.

If available, use INVPCID instruction when a TLB entry in non-current
address space needs to be invalidated.  The instruction is typically
available on the Haswell.

If needed, the use of PCID can be turned off with the
vm.pmap.pcid_enabled loader tunable set to 0.  The state of the
feature is reported by the vm.pmap.pcid_enabled sysctl.  The sysctl
vm.pmap.pcid_save_cnt reports the number of context switches which
avoided invalidating the TLB; compare with the total number of context
switches, available as sysctl vm.stats.sys.v_swtch.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
Tested by: pho, bf

10 years agoAdd BIT_AND_ATOMIC() and CPU_AND_ATOMIC().
kib [Fri, 30 Aug 2013 07:43:34 +0000 (07:43 +0000)]
Add BIT_AND_ATOMIC() and CPU_AND_ATOMIC().

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
Tested by: pho, bf

10 years agoProvide a wrapper for the INVPCID instruction, definition of the
kib [Fri, 30 Aug 2013 07:42:38 +0000 (07:42 +0000)]
Provide a wrapper for the INVPCID instruction, definition of the
descriptor and symbolic names for the operation types.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
Tested by: pho, bf

10 years agoMove the definition of the struct unrhdr into a separate header file,
kib [Fri, 30 Aug 2013 07:37:45 +0000 (07:37 +0000)]
Move the definition of the struct unrhdr into a separate header file,
to allow embedding the struct.  Add init_unrhdr(9) initializer, which
sets up preallocated unrhdr.

Reviewed by: alc
Tested by: pho, bf

10 years agoReduce WARNS to 0 for dig, host, and nslookup to make them
erwin [Fri, 30 Aug 2013 06:21:00 +0000 (06:21 +0000)]
Reduce WARNS to 0 for dig, host, and nslookup to make them
compile with the optional WITH_BIND_SIGCHASE.

Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
Approved by: delphij (mentor, implicit)
MFC after: 3 days
Sponsored by: DK Hostmaster A/S

10 years agoFew more minor if_vmx tweaks
bryanv [Fri, 30 Aug 2013 05:53:00 +0000 (05:53 +0000)]
Few more minor if_vmx tweaks

 - Allow the Rx/Tx queue sizes to be configured by tunables
 - Bail out earlier if the Tx queue unlikely has enough free
   descriptors to hold the frame
 - Cleanup some of the offloading capabilities handling

10 years agoFix the sysctl that displays whether buffer packing is enabled
np [Fri, 30 Aug 2013 02:13:36 +0000 (02:13 +0000)]
Fix the sysctl that displays whether buffer packing is enabled
or not.

10 years agoIf reading a virtual-device value fails, attempt to read a virtual-device-ext
cperciva [Fri, 30 Aug 2013 01:46:56 +0000 (01:46 +0000)]
If reading a virtual-device value fails, attempt to read a virtual-device-ext
value.  Some hosts do not publish "extended" disk IDs via virtual-device in
an attempt to avoid confusing old blkfront drivers, and without this change
we failed to attach such disks.

In particular, this commit allows all 24 ephemeral disks on EC2 hs1.8xlarge
instances to be used, instead of only the first 15.

MFC after: 3 days

10 years agoImplement support for rx buffer packing. Enable it by default for T5
np [Fri, 30 Aug 2013 01:45:36 +0000 (01:45 +0000)]
Implement support for rx buffer packing.  Enable it by default for T5
cards.

This is a T4 and T5 chip feature which lets the chip deliver multiple
Ethernet frames in a single buffer.  This is more efficient within the
chip, in the driver, and reduces wastage of space in rx buffers.

- Always allocate rx buffers from the jumbop zone, no matter what the
  MTU is.  Do not use the normal cluster refcounting mechanism.
- Reserve space for an mbuf and a refcount in the cluster itself and let
  the chip DMA multiple frames in the rest.
- Use the embedded mbuf for the first frame and allocate mbufs on the
  fly for any additional frames delivered in the cluster.  Each of these
  mbufs has a reference on the underlying cluster.

10 years ago- Fix LOCAL_MTREE so it properly handles multiple files and quotes
bdrewery [Fri, 30 Aug 2013 01:32:47 +0000 (01:32 +0000)]
- Fix LOCAL_MTREE so it properly handles multiple files and quotes
  its value into submakes

PR: conf/179466
Submitted by: Garrett Cooper <yaneurabeya@gmail.com>
Approved by: bapt
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

10 years agoAdd a routine for attaching an mbuf to a buffer with an external
np [Thu, 29 Aug 2013 23:46:38 +0000 (23:46 +0000)]
Add a routine for attaching an mbuf to a buffer with an external
refcount.  This one is willing to work with buffers that may already be
referenced.  MEXTADD/m_extadd are suitable only for the first attachment
to a cluster -- they initialize the refcount to 1.

10 years agoIntroduce a new, HVM compatible, paravirtualized timer driver for Xen.
gibbs [Thu, 29 Aug 2013 23:11:58 +0000 (23:11 +0000)]
Introduce a new, HVM compatible, paravirtualized timer driver for Xen.
Use this new driver for both PV and HVM instances.

This driver requires a Xen hypervisor that supports vector callbacks,
VCPUOP hypercalls, and reports that it has a "safe PV clock".

New timer driver:
Submitted by: will
Sponsored by: Spectra Logic Corporation

PV port to new driver, and bug fixes:
Submitted by: Roger Pau MonnĂ©
Sponsored by: Citrix Systems R&D

sys/dev/xen/timer/timer.c:
- Register a PV timer device driver which (currently)
  implements device_{identify,probe,attach} and stubs
  device_detach.  The detach routine requires functionality
  not provided by timecounters(4).  The suspend and resume
  routines need additional work (due to Xen requiring that
  the hypercalls be executed on the target VCPU), and aren't
  needed for our purposes.

- Make sure there can only be one device instance of this
  driver, and that it only registers one eventtimers(4) and
  one timecounters(4) device interface.  Make both interfaces
  use PCPU data as needed.

- Match, with a few style cleanups & API differences, the
  Xen versions of the "fetch time" functions.

- Document the magic scale_delta() better for the i386 version.

- When registering the event timer, bind a separate event
  channel for the timer VIRQ to the device's event timer
  interrupt handler for each active VCPU.  Describe each
  interrupt as "xen_et:c%d", so they can be identified per
  CPU in "vmstat -i" or "show intrcnt" in KDB.

- When scheduling a timer into the hypervisor, try up to
  60 times if the hypervisor rejects the time as being in
  the past.  In the common case, this retry shouldn't happen,
  and if it does, it should only happen once.  This is
  because the event timer advertises a minimum period of
  100usec, which is only less than the usual hypercall round
  trip time about 1 out of every 100 tries.  (Unlike other
  similar drivers, this one actually checks whether the
  hypervisor accepted the singleshot timer set hypercall.)

- Implement a RTC PV clock based on the hypervisor wallclock.

sys/conf/files:
- Add dev/xen/timer/timer.c if the kernel configuration
  includes either the XEN or XENHVM options.

sys/conf/files.i386:
sys/i386/include/xen/xen_clock_util.h:
sys/i386/xen/clock.c:
sys/i386/xen/xen_clock_util.c:
sys/i386/xen/mp_machdep.c:
sys/i386/xen/xen_rtc.c:
- Remove previous PV timer used in i386 XEN PV kernels, the
  new timer introduced in this change is used instead (so
  we share the same code between PVHVM and PV).

MFC after: 2 weeks

10 years ago'u_long' is consistently spelled 'unsigned long' in this file. Fix it.
jkim [Thu, 29 Aug 2013 23:09:34 +0000 (23:09 +0000)]
'u_long' is consistently spelled 'unsigned long' in this file.  Fix it.

10 years agoPartially revert r254880. The bitmap operations actually use long type now.
jkim [Thu, 29 Aug 2013 22:46:21 +0000 (22:46 +0000)]
Partially revert r254880.  The bitmap operations actually use long type now.

10 years agoBump up the default timeouts for move commands in the ch(4) driver
ken [Thu, 29 Aug 2013 21:25:27 +0000 (21:25 +0000)]
Bump up the default timeouts for move commands in the ch(4) driver
to 15 minutes, and 5 minutes for things like READ ELEMENT STATUS.

This is needed to account for the worst case scenarios on at least
some Spectra Logic tape libraries.

Sponsored by: Spectra Logic
MFC after: 3 days

10 years agoFix the incomplete conversion from atomic_t to long for test_bit().
jkim [Thu, 29 Aug 2013 20:51:12 +0000 (20:51 +0000)]
Fix the incomplete conversion from atomic_t to long for test_bit().

10 years agoClarify confusions between atomic_t and bitmap. Fix bitmap operations
jkim [Thu, 29 Aug 2013 20:40:45 +0000 (20:40 +0000)]
Clarify confusions between atomic_t and bitmap.  Fix bitmap operations
accordingly.

10 years agoImplement vector callback for PVHVM and unify event channel implementations
gibbs [Thu, 29 Aug 2013 19:52:18 +0000 (19:52 +0000)]
Implement vector callback for PVHVM and unify event channel implementations

Re-structure Xen HVM support so that:
- Xen is detected and hypercalls can be performed very
  early in system startup.
- Xen interrupt services are implemented using FreeBSD's native
  interrupt delivery infrastructure.
- the Xen interrupt service implementation is shared between PV
  and HVM guests.
- Xen interrupt handlers can optionally use a filter handler
  in order to avoid the overhead of dispatch to an interrupt
  thread.
- interrupt load can be distributed among all available CPUs.
- the overhead of accessing the emulated local and I/O apics
  on HVM is removed for event channel port events.
- a similar optimization can eventually, and fairly easily,
  be used to optimize MSI.

Early Xen detection, HVM refactoring, PVHVM interrupt infrastructure,
and misc Xen cleanups:

Sponsored by: Spectra Logic Corporation

Unification of PV & HVM interrupt infrastructure, bug fixes,
and misc Xen cleanups:

Submitted by: Roger Pau MonnĂ©
Sponsored by: Citrix Systems R&D

sys/x86/x86/local_apic.c:
sys/amd64/include/apicvar.h:
sys/i386/include/apicvar.h:
sys/amd64/amd64/apic_vector.S:
sys/i386/i386/apic_vector.s:
sys/amd64/amd64/machdep.c:
sys/i386/i386/machdep.c:
sys/i386/xen/exception.s:
sys/x86/include/segments.h:
Reserve IDT vector 0x93 for the Xen event channel upcall
interrupt handler.  On Hypervisors that support the direct
vector callback feature, we can request that this vector be
called directly by an injected HVM interrupt event, instead
of a simulated PCI interrupt on the Xen platform PCI device.
This avoids all of the overhead of dealing with the emulated
I/O APIC and local APIC.  It also means that the Hypervisor
can inject these events on any CPU, allowing upcalls for
different ports to be handled in parallel.

sys/amd64/amd64/mp_machdep.c:
sys/i386/i386/mp_machdep.c:
Map Xen per-vcpu area during AP startup.

sys/amd64/include/intr_machdep.h:
sys/i386/include/intr_machdep.h:
Increase the FreeBSD IRQ vector table to include space
for event channel interrupt sources.

sys/amd64/include/pcpu.h:
sys/i386/include/pcpu.h:
Remove Xen HVM per-cpu variable data.  These fields are now
allocated via the dynamic per-cpu scheme.  See xen_intr.c
for details.

sys/amd64/include/xen/hypercall.h:
sys/dev/xen/blkback/blkback.c:
sys/i386/include/xen/xenvar.h:
sys/i386/xen/clock.c:
sys/i386/xen/xen_machdep.c:
sys/xen/gnttab.c:
Prefer FreeBSD primatives to Linux ones in Xen support code.

sys/amd64/include/xen/xen-os.h:
sys/i386/include/xen/xen-os.h:
sys/xen/xen-os.h:
sys/dev/xen/balloon/balloon.c:
sys/dev/xen/blkback/blkback.c:
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/console/xencons_ring.c:
sys/dev/xen/control/control.c:
sys/dev/xen/netback/netback.c:
sys/dev/xen/netfront/netfront.c:
sys/dev/xen/xenpci/xenpci.c:
sys/i386/i386/machdep.c:
sys/i386/include/pmap.h:
sys/i386/include/xen/xenfunc.h:
sys/i386/isa/npx.c:
sys/i386/xen/clock.c:
sys/i386/xen/mp_machdep.c:
sys/i386/xen/mptable.c:
sys/i386/xen/xen_clock_util.c:
sys/i386/xen/xen_machdep.c:
sys/i386/xen/xen_rtc.c:
sys/xen/evtchn/evtchn_dev.c:
sys/xen/features.c:
sys/xen/gnttab.c:
sys/xen/gnttab.h:
sys/xen/hvm.h:
sys/xen/xenbus/xenbus.c:
sys/xen/xenbus/xenbus_if.m:
sys/xen/xenbus/xenbusb_front.c:
sys/xen/xenbus/xenbusvar.h:
sys/xen/xenstore/xenstore.c:
sys/xen/xenstore/xenstore_dev.c:
sys/xen/xenstore/xenstorevar.h:
Pull common Xen OS support functions/settings into xen/xen-os.h.

sys/amd64/include/xen/xen-os.h:
sys/i386/include/xen/xen-os.h:
sys/xen/xen-os.h:
Remove constants, macros, and functions unused in FreeBSD's Xen
support.

sys/xen/xen-os.h:
sys/i386/xen/xen_machdep.c:
sys/x86/xen/hvm.c:
Introduce new functions xen_domain(), xen_pv_domain(), and
xen_hvm_domain().  These are used in favor of #ifdefs so that
FreeBSD can dynamically detect and adapt to the presence of
a hypervisor.  The goal is to have an HVM optimized GENERIC,
but more is necessary before this is possible.

sys/amd64/amd64/machdep.c:
sys/dev/xen/xenpci/xenpcivar.h:
sys/dev/xen/xenpci/xenpci.c:
sys/x86/xen/hvm.c:
sys/sys/kernel.h:
Refactor magic ioport, Hypercall table and Hypervisor shared
information page setup, and move it to a dedicated HVM support
module.

HVM mode initialization is now triggered during the
SI_SUB_HYPERVISOR phase of system startup.  This currently
occurs just after the kernel VM is fully setup which is
just enough infrastructure to allow the hypercall table
and shared info page to be properly mapped.

sys/xen/hvm.h:
sys/x86/xen/hvm.c:
Add definitions and a method for configuring Hypervisor event
delievery via a direct vector callback.

sys/amd64/include/xen/xen-os.h:
sys/x86/xen/hvm.c:

sys/conf/files:
sys/conf/files.amd64:
sys/conf/files.i386:
Adjust kernel build to reflect the refactoring of early
Xen startup code and Xen interrupt services.

sys/dev/xen/blkback/blkback.c:
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkfront/block.h:
sys/dev/xen/control/control.c:
sys/dev/xen/evtchn/evtchn_dev.c:
sys/dev/xen/netback/netback.c:
sys/dev/xen/netfront/netfront.c:
sys/xen/xenstore/xenstore.c:
sys/xen/evtchn/evtchn_dev.c:
sys/dev/xen/console/console.c:
sys/dev/xen/console/xencons_ring.c
Adjust drivers to use new xen_intr_*() API.

sys/dev/xen/blkback/blkback.c:
Since blkback defers all event handling to a taskqueue,
convert this task queue to a "fast" taskqueue, and schedule
it via an interrupt filter.  This avoids an unnecessary
ithread context switch.

sys/xen/xenstore/xenstore.c:
The xenstore driver is MPSAFE.  Indicate as much when
registering its interrupt handler.

sys/xen/xenbus/xenbus.c:
sys/xen/xenbus/xenbusvar.h:
Remove unused event channel APIs.

sys/xen/evtchn.h:
Remove all kernel Xen interrupt service API definitions
from this file.  It is now only used for structure and
ioctl definitions related to the event channel userland
device driver.

Update the definitions in this file to match those from
NetBSD.  Implementing this interface will be necessary for
Dom0 support.

sys/xen/evtchn/evtchnvar.h:
Add a header file for implemenation internal APIs related
to managing event channels event delivery.  This is used
to allow, for example, the event channel userland device
driver to access low-level routines that typical kernel
consumers of event channel services should never access.

sys/xen/interface/event_channel.h:
sys/xen/xen_intr.h:
Standardize on the evtchn_port_t type for referring to
an event channel port id.  In order to prevent low-level
event channel APIs from leaking to kernel consumers who
should not have access to this data, the type is defined
twice: Once in the Xen provided event_channel.h, and again
in xen/xen_intr.h.  The double declaration is protected by
__XEN_EVTCHN_PORT_DEFINED__ to ensure it is never declared
twice within a given compilation unit.

sys/xen/xen_intr.h:
sys/xen/evtchn/evtchn.c:
sys/x86/xen/xen_intr.c:
sys/dev/xen/xenpci/evtchn.c:
sys/dev/xen/xenpci/xenpcivar.h:
New implementation of Xen interrupt services.  This is
similar in many respects to the i386 PV implementation with
the exception that events for bound to event channel ports
(i.e. not IPI, virtual IRQ, or physical IRQ) are further
optimized to avoid mask/unmask operations that aren't
necessary for these edge triggered events.

Stubs exist for supporting physical IRQ binding, but will
need additional work before this implementation can be
fully shared between PV and HVM.

sys/amd64/amd64/mp_machdep.c:
sys/i386/i386/mp_machdep.c:
sys/i386/xen/mp_machdep.c
sys/x86/xen/hvm.c:
Add support for placing vcpu_info into an arbritary memory
page instead of using HYPERVISOR_shared_info->vcpu_info.
This allows the creation of domains with more than 32 vcpus.

sys/i386/i386/machdep.c:
sys/i386/xen/clock.c:
sys/i386/xen/xen_machdep.c:
sys/i386/xen/exception.s:
Add support for new event channle implementation.

10 years ago- Remove test_and_set_bit() macro. It is unused since r255037.
jkim [Thu, 29 Aug 2013 19:47:52 +0000 (19:47 +0000)]
- Remove test_and_set_bit() macro.  It is unused since r255037.
- Relax atomic_read() and atomic_set() macros.  Linux does not require any
memory barrier.  Also, these macros may be even reordered or optimized away
according to the API documentation:

https://www.kernel.org/doc/Documentation/atomic_ops.txt

10 years agoConvert the if_lagg rwlock to an rmlock.
adrian [Thu, 29 Aug 2013 19:35:14 +0000 (19:35 +0000)]
Convert the if_lagg rwlock to an rmlock.

We've been seeing lots of cache line contention (but not lock contention!)
in our workloads between the various TX and RX threads going on.

The write lock is only grabbed when configuration changes are made - which
are infrequent.

With this patch, the contention and cycles spent waiting for updates
disappear.

Sponsored by: Netflix, Inc.

10 years agoFix atomic operations on context_flag without altering semantics.
jkim [Thu, 29 Aug 2013 18:36:47 +0000 (18:36 +0000)]
Fix atomic operations on context_flag without altering semantics.

10 years agoAdd directories that is installed as part of bsdconfig.
delphij [Thu, 29 Aug 2013 17:45:13 +0000 (17:45 +0000)]
Add directories that is installed as part of bsdconfig.

These are included unconditionally for now because bsdconfig
is currently installed unconditionally.

This fixes 'make -j 17 installworld' caused by a race
condition.

MFC candidate.

10 years agoAdd a few missing language directories for /usr.
delphij [Thu, 29 Aug 2013 17:40:03 +0000 (17:40 +0000)]
Add a few missing language directories for /usr.

10 years agoUpdate to 2013-08-29 NetBSD libexecinfo snapshot
emaste [Thu, 29 Aug 2013 16:57:55 +0000 (16:57 +0000)]
Update to 2013-08-29 NetBSD libexecinfo snapshot

This adds my patch to use the kern.proc.pathname sysctl instead of
relying on procfs(5).

10 years agoFix some issues in change 254760 pointed out by Bruce Evans:
ken [Thu, 29 Aug 2013 16:41:40 +0000 (16:41 +0000)]
Fix some issues in change 254760 pointed out by Bruce Evans:

 - Remove excessive parenthesis
 - Use KNF continuation indentation
 - Cut down on excessive continuation lines
 - More consistent style in messages
 - Use uprintf() instead of printf()

Submitted by: bde

10 years agoWork-around a timing problem with the ITE IT8513E now that the core
marcel [Thu, 29 Aug 2013 16:26:04 +0000 (16:26 +0000)]
Work-around a timing problem with the ITE IT8513E now that the core
calls ns8250_bus_ipend() almost immediately after ns8250_bus_attach().
As it appears, a line break condition is being signalled for almost
all received characters due to this. A delay of 150ms seems enough
to allow the H/W to settle and to avoid the problem.
More analysis is needed, but for now a regression has been addressed.

Reported by: kevlo@
Tested by: kevlo@

10 years agoDon't return an error for socket timeouts that are too large. Just
jhb [Thu, 29 Aug 2013 15:59:05 +0000 (15:59 +0000)]
Don't return an error for socket timeouts that are too large.  Just
cap them to INT_MAX ticks instead.

PR: kern/181416 (r254699 really)
Requested by: bde
MFC after: 2 weeks

10 years agoFix after r255014
antoine [Thu, 29 Aug 2013 15:58:20 +0000 (15:58 +0000)]
Fix after r255014

10 years agoSignificantly reduce the cost, i.e., run time, of calls to madvise(...,
alc [Thu, 29 Aug 2013 15:49:05 +0000 (15:49 +0000)]
Significantly reduce the cost, i.e., run time, of calls to madvise(...,
MADV_DONTNEED) and madvise(..., MADV_FREE).  Specifically, introduce a new
pmap function, pmap_advise(), that operates on a range of virtual addresses
within the specified pmap, allowing for a more efficient implementation of
MADV_DONTNEED and MADV_FREE.  Previously, the implementation of
MADV_DONTNEED and MADV_FREE relied on per-page pmap operations, such as
pmap_clear_reference().  Intuitively, the problem with this implementation
is that the pmap-level locks are acquired and released and the page table
traversed repeatedly, once for each resident page in the range
that was specified to madvise(2).  A more subtle flaw with the previous
implementation is that pmap_clear_reference() would clear the reference bit
on all mappings to the specified page, not just the mapping in the range
specified to madvise(2).

Since our malloc(3) makes heavy use of madvise(2), this change can have a
measureable impact.  For example, the system time for completing a parallel
"buildworld" on a 6-core amd64 machine was reduced by about 1.5% to 2.0%.

Note: This change only contains pmap_advise() implementations for a subset
of our supported architectures.  I will commit implementations for the
remaining architectures after further testing.  For now, a stub function is
sufficient because of the advisory nature of pmap_advise().

Discussed with: jeff, jhb, kib
Tested by:      pho (i386), marcel (ia64)
Sponsored by:   EMC / Isilon Storage Division

10 years agoMigrate iwn(4) to use the new ieee80211_tx_complete() API.
adrian [Thu, 29 Aug 2013 13:56:44 +0000 (13:56 +0000)]
Migrate iwn(4) to use the new ieee80211_tx_complete() API.

Tested:

* Intel 5100, STA mode

10 years agoRemove the duplicate LLC_MISS event and put it in the right order.
adrian [Thu, 29 Aug 2013 13:52:51 +0000 (13:52 +0000)]
Remove the duplicate LLC_MISS event and put it in the right order.

10 years agoPrevent the full restart cycle every time arge_start() is called. Only
loos [Thu, 29 Aug 2013 12:48:12 +0000 (12:48 +0000)]
Prevent the full restart cycle every time arge_start() is called.  Only
(re)start the interface when it is down.  This change fix a race with
BOOTP where the response packet is lost because the interface is being
reset by a netmask change right after send the packet.

PR: 178318
Approved by: adrian (mentor)

10 years agoRemove GNU_PATCH leftover.
andreast [Thu, 29 Aug 2013 11:40:45 +0000 (11:40 +0000)]
Remove GNU_PATCH leftover.

10 years agoMerge r254736 from user/np/cxl_tuning.
np [Thu, 29 Aug 2013 08:07:35 +0000 (08:07 +0000)]
Merge r254736 from user/np/cxl_tuning.

Don't leak tags when M_NOFREE | M_PKTHDR mbufs are freed.

Reviewed by: andre

10 years agoMerge r254386 from user/np/cxl_tuning. Add an INET|INET6 check missing
np [Thu, 29 Aug 2013 06:26:22 +0000 (06:26 +0000)]
Merge r254386 from user/np/cxl_tuning.  Add an INET|INET6 check missing
in said revision.

r254386:
Flush inactive LRO entries periodically.

10 years agoDrop build option switch for the older GNU patch.
pfg [Thu, 29 Aug 2013 00:38:24 +0000 (00:38 +0000)]
Drop build option switch for the older GNU patch.

As promised, drop the option to make the older GNU patch
the default.

GNU patch is still being built but something drastic may
happen to it to it before Release.

10 years agoCorrect atomic operations in i915.
jkim [Wed, 28 Aug 2013 23:59:38 +0000 (23:59 +0000)]
Correct atomic operations in i915.

10 years agoFix a compiler warning and add couple of VM map types.
jkim [Wed, 28 Aug 2013 23:43:28 +0000 (23:43 +0000)]
Fix a compiler warning and add couple of VM map types.

10 years agoWhitespace nit.
np [Wed, 28 Aug 2013 23:15:05 +0000 (23:15 +0000)]
Whitespace nit.

10 years agoMerge r254336 from user/np/cxl_tuning.
np [Wed, 28 Aug 2013 23:00:34 +0000 (23:00 +0000)]
Merge r254336 from user/np/cxl_tuning.

Add a last-modified timestamp to each LRO entry and provide an interface
to flush all inactive entries.  Drivers decide when to flush and what
the inactivity threshold should be.

Network drivers that process an rx queue to completion can enter a
livelock type situation when the rate at which packets are received
reaches equilibrium with the rate at which the rx thread is processing
them.  When this happens the final LRO flush (normally when the rx
routine is done) does not occur.  Pure ACKs and segments with total
payload < 64K can get stuck in an LRO entry.  Symptoms are that TCP
tx-mostly connections' performance falls off a cliff during heavy,
unrelated rx on the interface.

Flushing only inactive LRO entries works better than any of these
alternates that I tried:
- don't LRO pure ACKs
- flush _all_ LRO entries periodically (every 'x' microseconds or every
  'y' descriptors)
- stop rx processing in the driver periodically and schedule remaining
  work for later.

Reviewed by: andre

10 years agoFix a compiler warning. With this fix, a negative time can be converted to
jkim [Wed, 28 Aug 2013 22:57:49 +0000 (22:57 +0000)]
Fix a compiler warning.  With this fix, a negative time can be converted to
a struct timeval and back to the original nanoseconds correctly.

10 years agoSupport storing 7 additional file flags in tmpfs:
ken [Wed, 28 Aug 2013 22:12:56 +0000 (22:12 +0000)]
Support storing 7 additional file flags in tmpfs:

UF_SYSTEM, UF_SPARSE, UF_OFFLINE, UF_REPARSE, UF_ARCHIVE, UF_READONLY,
and UF_HIDDEN.

Sort the file flags tmpfs supports alphabetically.  tmpfs now
supports the same flags as UFS, with the exception of SF_SNAPSHOT.

Reported by: bdrewery, antoine
Sponsored by: Spectra Logic

10 years agolibutil: Use O_CLOEXEC for internal file descriptors from open().
jilles [Wed, 28 Aug 2013 21:10:37 +0000 (21:10 +0000)]
libutil: Use O_CLOEXEC for internal file descriptors from open().

10 years agoChange t4_list_lock and t4_uld_list_lock from mutexes to sx'es.
np [Wed, 28 Aug 2013 20:59:22 +0000 (20:59 +0000)]
Change t4_list_lock and t4_uld_list_lock from mutexes to sx'es.

- tom_uninit had to be reworked not to hold the adapter lock (a mutex)
  around t4_deactivate_uld, which acquires the uld_list_lock.
- the ifc_match for the interface cloner that creates the tracer ifnet
  had to be reworked as the kernel calls ifc_match with the global
  if_cloners_mtx held.

10 years agoAdd hooks in base cxgbe(4) for the iWARP upper-layer driver. Update a
np [Wed, 28 Aug 2013 20:45:45 +0000 (20:45 +0000)]
Add hooks in base cxgbe(4) for the iWARP upper-layer driver.  Update a
couple of assertions in the TOE driver as well.

10 years agoReduce diff against stable/9 slightly.
jkim [Wed, 28 Aug 2013 20:10:56 +0000 (20:10 +0000)]
Reduce diff against stable/9 slightly.

10 years agoql_minidump() should be performed only by port 0.
davidcs [Wed, 28 Aug 2013 20:07:00 +0000 (20:07 +0000)]
ql_minidump() should be performed only by port 0.

Submitted by: David C Somayajulu

10 years agoXref capsicum(4) and procdesc(4) from pdfork(2).
rwatson [Wed, 28 Aug 2013 20:00:25 +0000 (20:00 +0000)]
Xref capsicum(4) and procdesc(4) from pdfork(2).

Suggested by: sbruno
MFC after: 3 days

10 years agoAdd a simple procdesc(4) man page describing "options PROCDESC" and the
rwatson [Wed, 28 Aug 2013 19:49:32 +0000 (19:49 +0000)]
Add a simple procdesc(4) man page describing "options PROCDESC" and the
high-level facility, supplementing pdfork(2) and friends.  Update capsicum.4
to xref.

Suggested by: sbruno
MFC after: 3 days

10 years agoDo not save/restore video memory if we are not using linear frame buffer.
jkim [Wed, 28 Aug 2013 19:06:22 +0000 (19:06 +0000)]
Do not save/restore video memory if we are not using linear frame buffer.
Note this partially revert r233896.

10 years agoMake sure to free stale buffer before allocating new one for safety.
jkim [Wed, 28 Aug 2013 18:13:37 +0000 (18:13 +0000)]
Make sure to free stale buffer before allocating new one for safety.

10 years agoAvoid unnecessary signedness conversion.
jkim [Wed, 28 Aug 2013 17:58:30 +0000 (17:58 +0000)]
Avoid unnecessary signedness conversion.

10 years agoIn looking at block layouts as part of fixing filesystem block
mckusick [Wed, 28 Aug 2013 17:46:32 +0000 (17:46 +0000)]
In looking at block layouts as part of fixing filesystem block
allocations under low free-space conditions (-r254995), determine
that old block-preference search order used before -r249782 worked
a bit better. This change reverts to that block-preference search order.

MFC after: 2 weeks

10 years agoA performance problem was reported in PR kern/181226:
mckusick [Wed, 28 Aug 2013 17:38:05 +0000 (17:38 +0000)]
A performance problem was reported in PR kern/181226:

    I have 25TB Dell PERC 6 RAID5 array. When it becomes almost
    full (10-20GB free), processes which write data to it start
    eating 100% CPU and write speed drops below 1MB/sec (normally
    to gives 400MB/sec). The revision at which it first became
    apparent was http://svnweb.freebsd.org/changeset/base/249782.

The offending change reserved an area in each cylinder group to
store metadata. The new algorithm attempts to save this area for
metadata and allows its use for non-metadata only after all the
data areas have been exhausted. The size of the reserved area
defaults to half of minfree, so the filesystem reports full before
the data area can completely fill. However, in this report, the
filesystem has had minfree reduced to 1% thus forcing the metadata
area to be used for data. As the filesystem approached full, it
had only metadata areas left to allocate. The result was that
every block allocation had to scan summary data for 30,000 cylinder
groups before falling back to searching up to 30,000 metadata areas.

The fix is to give up on saving the metadata areas once the free
space reserve drops below 2%. The effect of this change is to use
the old algorithm of just accepting the first available block that
we find. Since most filesystems use the default 5% minfree, this
will have no effect on their operation. For those that want to push
to the limit, they will get their crappy block placements quickly.

Submitted by:  Dmitry Sivachenko
Fix Tested by: Dmitry Sivachenko
PR:            kern/181226
MFC after:     2 weeks

10 years ago* Whitespace.
kargl [Wed, 28 Aug 2013 16:59:55 +0000 (16:59 +0000)]
* Whitespace.

10 years agoAdd firmware for Centrino 2200-N wireless devices.
gnn [Wed, 28 Aug 2013 15:12:51 +0000 (15:12 +0000)]
Add firmware for Centrino 2200-N wireless devices.

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

10 years agoAfter writing a kernel core dump into /var/crash, call sync(8).
gavin [Wed, 28 Aug 2013 15:12:15 +0000 (15:12 +0000)]
After writing a kernel core dump into /var/crash, call sync(8).

If we panic again shortly after boot (say, within 30 seconds), any core
dump we wrote out may be lost on reboot.  In this situation, we really
want to keep that core file, as it may be the only way to have the issue
resolved.  Call sync(8) after writing out the core file and running
crashinfo(8), in the hope that these will not be lost if we panic
again.  sync(8) is only called in the case where there is a core dump
to be written out, so won't be called during normal boots.

Discovered by: Trying to debug an IPSEC panic
MFC after: 1 week

10 years agoFix a few typos for s25fl types.
loos [Wed, 28 Aug 2013 14:49:36 +0000 (14:49 +0000)]
Fix a few typos for s25fl types.

Approved by: adrian (mentor)

10 years agoMake ar71xx_spi attach the next free unit of spibus and not only spibus0.
loos [Wed, 28 Aug 2013 14:46:15 +0000 (14:46 +0000)]
Make ar71xx_spi attach the next free unit of spibus and not only spibus0.

Approved by: adrian (mentor)

10 years agoAdd the default hints to make the GPIO pins, rf led and reset switch work
loos [Wed, 28 Aug 2013 14:43:04 +0000 (14:43 +0000)]
Add the default hints to make the GPIO pins, rf led and reset switch work
out of the box on RouterStation.

PR: 177832
Submitted by: Petko Bordjukov (bordjukov@gmail.com)
Approved by: adrian (mentor)

10 years agoProperly free gpiobus ivars when gpiobus_parse_pins() fails and also on
loos [Wed, 28 Aug 2013 14:39:24 +0000 (14:39 +0000)]
Properly free gpiobus ivars when gpiobus_parse_pins() fails and also on
gpiobus detachment.

Suggested by: imp
Approved by: adrian (mentor)

10 years agoSupport the PCI-Express SSD in the new MacBook Air (model A1465)
gavin [Wed, 28 Aug 2013 14:29:33 +0000 (14:29 +0000)]
Support the PCI-Express SSD in the new MacBook Air (model A1465)

Submitted by: Johannes Lundberg <johannes brilliantservice.co.jp>
MFC after: 3 days

10 years agoTake a very small step toward the Century of the Anchovy by increasing the
ivoras [Wed, 28 Aug 2013 10:06:20 +0000 (10:06 +0000)]
Take a very small step toward the Century of the Anchovy by increasing the
time dirhash entries stay in memory before being considered for eviction to
1 minute.

10 years agoFix 'make depend'
uqs [Wed, 28 Aug 2013 07:48:44 +0000 (07:48 +0000)]
Fix 'make depend'

10 years agomdoc fix
joel [Wed, 28 Aug 2013 05:12:29 +0000 (05:12 +0000)]
mdoc fix

10 years agoFix GT PCI controller driver on big-endian hardware
gonzo [Wed, 28 Aug 2013 01:10:51 +0000 (01:10 +0000)]
Fix GT PCI controller driver on big-endian hardware

10 years agoPreviously, both zfs_rename and zfs_link does a check on whether
delphij [Wed, 28 Aug 2013 00:39:47 +0000 (00:39 +0000)]
Previously, both zfs_rename and zfs_link does a check on whether
the passed vnode belongs to the same mount point (v_vfsp or also
known as v_mount in FreeBSD).  This check prevents the code from
proceeding further on vnodes that do not belong to ZFS, for
instance, on UFS or NULLFS.

The recent change (merged as r254585) on upstream changes the
check of v_vfsp to instead check the znode's z_zfsvfs.  On Illumos
this would work because when the vnode comes from lofs, the
VOP_REALVP() would give the right vnode, this is not true on
FreeBSD where our VOP_REALVP is a no-op, and as such tdvp is
not guaranteed to be a ZFS vnode, and will later trigger a
failed assertion when verifying the vnode.

This changeset modifies our local shims (zfs_freebsd_rename and
zfs_freebsd_link) to check if v_mount matches before proceeding
further.

Reported by: many
Diagnostic work by: avg

10 years agoReally regen after r254962.
zeising [Tue, 27 Aug 2013 23:30:02 +0000 (23:30 +0000)]
Really regen after r254962.

This removes the WITH_BSDCONFIG description alltogether, since this option
is removed.
At the same time, fix the WITHOUT_LIBCPLUSPLUS option that had gotten
inverted.

10 years agoUse .SHELL to tell bmake to use 'set -e' when running scripts
sjg [Tue, 27 Aug 2013 23:09:34 +0000 (23:09 +0000)]
Use .SHELL to tell bmake to use 'set -e' when running scripts
since most FreeBSD makefiles it is in effect.

Move the other bmake compatability knobs out of the POSIX block.

Reviewed by: obrien

10 years agoFix a typo introduced in r254975.
jkim [Tue, 27 Aug 2013 22:37:29 +0000 (22:37 +0000)]
Fix a typo introduced in r254975.

10 years agowordexp(): Avoid leaking the pipe file descriptors to a parallel fork/exec.
jilles [Tue, 27 Aug 2013 21:47:01 +0000 (21:47 +0000)]
wordexp(): Avoid leaking the pipe file descriptors to a parallel fork/exec.

This uses the new pipe2() system call added on May 1 (r250159).

10 years agoFix bug in Flash access code
davidcs [Tue, 27 Aug 2013 21:29:21 +0000 (21:29 +0000)]
Fix bug in Flash access code

Submitted by: David C Somayajulu

10 years agoInstall 450.status-security.
jlh [Tue, 27 Aug 2013 21:28:12 +0000 (21:28 +0000)]
Install 450.status-security.

10 years agoMake the period of each periodic security script configurable.
jlh [Tue, 27 Aug 2013 21:20:28 +0000 (21:20 +0000)]
Make the period of each periodic security script configurable.

There are now six additional variables
  weekly_status_security_enable
  weekly_status_security_inline
  weekly_status_security_output
  monthly_status_security_enable
  monthly_status_security_inline
  monthly_status_security_output
alongside their existing daily counterparts.  They all have the same
default values.

All other "daily_status_security_${scriptname}_${whatever}"
variables have been renamed to "security_status_${name}_${whatever}".
A compatibility shim has been introduced for the old variable names,
which we will be able to remove in 11.0-RELEASE.

"security_status_${name}_enable" is still a boolean but a new
"security_status_${name}_period" allows to define the period of
each script.  The value is one of "daily" (the default for backward
compatibility), "weekly", "monthly" and "NO".

Note that when the security periodic scripts are run directly from
crontab(5) (as opposed to being called by daily or weekly periodic
scripts), they will run unless the test is explicitely disabled with a
"NO", either for in the "_enable" or the "_period" variable.

When the security output is not inlined, the mail subject has been
changed from "$host $arg run output" to "$host $arg $period run output".
For instance:
  myfbsd security run output ->  myfbsd security daily run output
I don't think this is considered as a stable API, but feel free to
correct me if I'm wrong.

Finally, I will rearrange periodic.conf(5) and default/periodic.conf
to put the security options in their own section.  I left them in
place for this commit to make reviewing easier.

Reviewed by: hackers@

10 years agoPad m_hdr on 32bit architectures to to prevent alignment and padding
andre [Tue, 27 Aug 2013 20:52:02 +0000 (20:52 +0000)]
Pad m_hdr on 32bit architectures to to prevent alignment and padding
problems with the way MLEN, MHLEN, and struct mbuf are set up.

CTASSERT's are provided to detect such issues at compile time in the
future.

The #define MLEN and MHLEN calculation do not take actual compiler-
induced alignment and padding inside the complete struct mbuf into
account.  Accordingly appropriate attention is required when changing
members of struct mbuf.

Ideally one would calculate MLEN as (MSIZE - sizeof(((struct mbuf *)0)->m_hdr)
but that doesn't work as the compiler refuses to operate on an as of
yet incomplete structure.

In particular ARM 32bit has more strict alignment requirements which
caused 4 bytes of padding between m_hdr and pkthdr in struct mbuf
because of the 64bit members in pkthdr.  This wasn't picked up by MLEN
and MHLEN causing an overflow of the mbuf provided data storage by
overestimating its size.

I386 didn't show this problem because it handles unaligned access just
fine, albeit at a small performance penalty.

On 64bit architectures the struct mbuf layout is 64bit aligned in all
places.

Reported by: Thomas Skibo <ThomasSkibo-at-sbcglobal-dot-net>
Tested by: tuexen, ian, Thomas Skibo (extended patch)
Sponsored by: The FreeBSD Foundation

10 years agoIf a drive returns ASC/ASCQ 0x04,0x11 "Logical unit not ready,
ken [Tue, 27 Aug 2013 19:47:03 +0000 (19:47 +0000)]
If a drive returns ASC/ASCQ 0x04,0x11 "Logical unit not ready,
notify (enable spinup) required", instead of doing the normal
retries, poll for a change in status.

We will poll every half second for a minute for the status to
change.

Hitachi drives (and likely other SAS drives) return that ASC/ASCQ
when they are waiting to spin up.  What it means is that they are
waiting for the SAS expander to send them the SAS
NOTIFY (ENABLE SPINUP) primitive.

That primitive is the mechanism expanders/enclosures use to
sequence drive spinup to avoid overloading power supplies.

Sponsored by: Spectra Logic
MFC after: 3 days

10 years ago* s_erf.c:
kargl [Tue, 27 Aug 2013 19:46:56 +0000 (19:46 +0000)]
* s_erf.c:
  . Use integer literal constants instead of double literal constants.

* s_erff.c:
  . Use integer literal constants instead of casting double literal
    constants to float.
  . Update the threshold values from those carried over from erf() to
    values appropriate for float.
  . New sets of polynomial coefficients for the rational approximations.
    These coefficients have little, but positive, effect on the maximum
    error in ULP in the four intervals, but do improve the overall
    speed of execution.
  . Remove redundant GET_FLOAT_WORD(ix,x) as hx already contained the
    contents that is packed into ix.
  . Update the mask that is used to zero-out lower-order bits in x in
    the intervals [1.25, 2.857143] and [2.857143, 12].  In tests on
    amd64, this change improves the maximum error in ULP from 6.27739
    and 63.8095 to 3.16774 and 2.92095 on these intervals for erffc().

Reviewed by: bde

10 years agoRemove duplicate dev.xbd.*.max_requests sysctl added in r252260.
cperciva [Tue, 27 Aug 2013 19:10:36 +0000 (19:10 +0000)]
Remove duplicate dev.xbd.*.max_requests sysctl added in r252260.

Approved by: gibbs

10 years agoAssemble linux32_locore.s and ia32_sigtramp.S with clang integrated assembler.
rdivacky [Tue, 27 Aug 2013 18:35:04 +0000 (18:35 +0000)]
Assemble linux32_locore.s and ia32_sigtramp.S with clang integrated assembler.
Support for .code32 and .code64 in llvm was implemented more than 2 years ago.

Tested by:      Dan McGregor <dan.mcgregor at usask dot ca>

10 years agoAllow single byte reads of the emulated MSI-X tables. This is not required
neel [Tue, 27 Aug 2013 16:50:48 +0000 (16:50 +0000)]
Allow single byte reads of the emulated MSI-X tables. This is not required
by the PCI specification but needed to dump MMIO space from "ddb" in the
guest.

10 years agoAdd support for emulating the byte move instruction "mov r/m8, r8".
neel [Tue, 27 Aug 2013 16:49:20 +0000 (16:49 +0000)]
Add support for emulating the byte move instruction "mov r/m8, r8".

This emulation is required when dumping MMIO space via the ddb "examine"
command.

10 years agoRemove include opt_ofed.h since OFED is unifdef'd.
alfred [Tue, 27 Aug 2013 16:45:00 +0000 (16:45 +0000)]
Remove include opt_ofed.h since OFED is unifdef'd.

Pointed out by: glebius

10 years agoFormally remove WITH_BSDCONFIG build option and re-generate src.conf.5
dteske [Tue, 27 Aug 2013 16:30:50 +0000 (16:30 +0000)]
Formally remove WITH_BSDCONFIG build option and re-generate src.conf.5
NOTE: Should have been inline with revisions 252862 and 254958.

10 years agoAdd note/reminder about dialog(1) regression in HEAD/10.0-C so that we don't
dteske [Tue, 27 Aug 2013 16:10:44 +0000 (16:10 +0000)]
Add note/reminder about dialog(1) regression in HEAD/10.0-C so that we don't
forget about it in the multi-month run of things to fix prior to 10.0-R.

10 years agoMake the PAM password strength checking module WARNS=2 safe.
will [Tue, 27 Aug 2013 15:50:26 +0000 (15:50 +0000)]
Make the PAM password strength checking module WARNS=2 safe.

lib/libpam/modules/pam_passwdqc/Makefile:
Bump WARNS to 2.

contrib/pam_modules/pam_passwdqc/pam_passwdqc.c:
Bump  _XOPEN_SOURCE and _XOPEN_VERSION from 500 to 600
so that vsnprint() is declared.

Use the two new union types (pam_conv_item_t and
pam_text_item_t) to resolve strict aliasing violations
caused by casts to comply with the pam_get_item() API taking
a "const void **" for all item types.  Warnings are
generated for casts that create "type puns" (pointers of
conflicting sized types that are set to access the same
memory location) since these pointers may be used in ways
that violate C's strict aliasing rules.  Casts to a new
type must be performed through a union in order to be
compliant, and access must be performed through only one
of the union's data types during the lifetime of the union
instance.  Handle strict-aliasing warnings through pointer
assignments, which drastically simplifies this change.

Correct a CLANG "printf-like function with more arguments
than format" error.

Submitted by: gibbs
Sponsored by: Spectra Logic

10 years agoAllow more space for interface names.
gavin [Tue, 27 Aug 2013 15:06:39 +0000 (15:06 +0000)]
Allow more space for interface names.

MFC after: 1 week

10 years agoIt was brought to my attention that SVN r252862 was incomplete. It needed
dteske [Tue, 27 Aug 2013 14:48:01 +0000 (14:48 +0000)]
It was brought to my attention that SVN r252862 was incomplete. It needed
to also make this change, to completely deprecate WITH_BSDCONFIG.

10 years agoUse the new ieee80211_tx_complete() function.
adrian [Tue, 27 Aug 2013 14:39:37 +0000 (14:39 +0000)]
Use the new ieee80211_tx_complete() function.

10 years agoCreate a new function to complete 802.11 mbuf transmission.
adrian [Tue, 27 Aug 2013 14:37:13 +0000 (14:37 +0000)]
Create a new function to complete 802.11 mbuf transmission.

The aim of this function is to eventually be the completion entry point
for all 802.11 encapsulated mbufs.  All the wifi drivers end up doing
what is in this function so it's an easy win to turn it into a net80211
method and abstract out this code.

Ideally the drivers will all eventually be modified to queue up completed
mbufs and call this function with all the driver locks not held.
This will allow for some much more interesting software queue handling
in the future (like net80211 based A-MSDU, fast-frames, A-MPDU aggregation
and retransmission.)

Tested:

* ath(4), iwn(4)

10 years agoFix a crash when reloading the configuration file.
hrs [Tue, 27 Aug 2013 11:50:33 +0000 (11:50 +0000)]
Fix a crash when reloading the configuration file.

Spotted by: des

10 years agoAdd missing newlines to Fibre Channel attributes output.
mav [Tue, 27 Aug 2013 06:50:46 +0000 (06:50 +0000)]
Add missing newlines to Fibre Channel attributes output.

10 years agoUpdate copyright.
dteske [Tue, 27 Aug 2013 06:09:28 +0000 (06:09 +0000)]
Update copyright.

10 years agoFix 'make release' on older hosts: use buildworld legacy utilities.
will [Tue, 27 Aug 2013 04:42:42 +0000 (04:42 +0000)]
Fix 'make release' on older hosts: use buildworld legacy utilities.

Newer FreeBSD installs require an install(1) that supports the new flags.

This adds ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp/legacy/{bin,usr/{bin,sbin}}
to the PATH while generating an mtree database for 'make release'.

Note that the problem only exists here because mm-mtree.sh generates
its own object tree to avoid mucking with the existing one, which
results in a PATH containing legacy utility dirs that are empty.

10 years agoCouple minor if_vmx tweaks
bryanv [Tue, 27 Aug 2013 04:05:18 +0000 (04:05 +0000)]
Couple minor if_vmx tweaks

  - Use queue size fields from the Tx/Rx queues in various places
    instead of (currently the same values) from the softc.
  - Fix potential crash in detach if the attached failed to alloc
    queue memory.
  - Move the VMXNET3_MAX_RX_SEGS define to a better spot.
  - Tweak frame size calculation w.r.t. ETHER_ALIGN. This could be
    tweaked some more, or removed since it probably doesn't matter
    much for x86 (and the x86 class of machines this driver will
    be used on).