]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoMake vlan_config() the signle point of validity checks.
glebius [Fri, 20 Mar 2015 21:09:03 +0000 (21:09 +0000)]
Make vlan_config() the signle point of validity checks.

Sponsored by: Nginx, Inc.

9 years agoIn vlan_clone_match_ethervid():
glebius [Fri, 20 Mar 2015 20:42:58 +0000 (20:42 +0000)]
In vlan_clone_match_ethervid():
- Use ifunit() instead of going through the interface list ourselves.
- Remove unused parameter.
- Move the most important comment above the function.

Sponsored by: Nginx, Inc.

9 years agoFix grammar in epair(4) man page
allanjude [Fri, 20 Mar 2015 20:08:36 +0000 (20:08 +0000)]
Fix grammar in epair(4) man page

PR: 196839
Differential Revision: https://reviews.freebsd.org/D2090
Submitted by: Jason Unovitch (original)
Approved by: wblock (mentor)
Sponsored by: ScaleEngine Inc.

9 years agoAdd a driver for the Dallas/Maxim DS1307, another common i2c RTC.
loos [Fri, 20 Mar 2015 19:51:24 +0000 (19:51 +0000)]
Add a driver for the Dallas/Maxim DS1307, another common i2c RTC.

Many thanks to ian who gently provided me the DS1307 breakout board.

Tested on: Raspberry pi
Differential Revision: https://reviews.freebsd.org/D2022
Reviewed by: rpaulo

9 years agoWhen creating VM images, copy the contents of the created filesystem into
cperciva [Fri, 20 Mar 2015 19:40:19 +0000 (19:40 +0000)]
When creating VM images, copy the contents of the created filesystem into
a new filesystem before packaging it into a disk image.  This prevents
"remnants" of deleted files from showing up in the VM images, and reduces
their compressed size (by about 10% for the cloudware images) as a result.

Looks good to: gjb

9 years agoAdd the missing manual page link to the recently added function.
loos [Fri, 20 Mar 2015 19:29:59 +0000 (19:29 +0000)]
Add the missing manual page link to the recently added function.

9 years agoMerge OpenSSL 1.0.1m.
jkim [Fri, 20 Mar 2015 19:16:18 +0000 (19:16 +0000)]
Merge OpenSSL 1.0.1m.

9 years agoAdd a helper function to read clock frequencies from videocore and use this
andrew [Fri, 20 Mar 2015 16:54:21 +0000 (16:54 +0000)]
Add a helper function to read clock frequencies from videocore and use this
to get the default frequency of the sdhci device.

While here use a u_int to hold the frequency as it may be too large to fit
in a 32-bit signed integer. This is the case when we have a 250MHz clock.

9 years agoAdd missing variable initialization.
mav [Fri, 20 Mar 2015 16:05:13 +0000 (16:05 +0000)]
Add missing variable initialization.

Reported by: Coverity
CID: 1288938
MFC after: 3 days

9 years agoImport OpenSSL 1.0.1m.
jkim [Fri, 20 Mar 2015 15:28:40 +0000 (15:28 +0000)]
Import OpenSSL 1.0.1m.

9 years agoAdd comment explaining existing powerd behavior on SMP systems.
mav [Fri, 20 Mar 2015 15:07:05 +0000 (15:07 +0000)]
Add comment explaining existing powerd behavior on SMP systems.

MFC after: 1 week

9 years agoSplit out the common bcm283x fixes from the bcm2835 specific files.
andrew [Fri, 20 Mar 2015 14:25:51 +0000 (14:25 +0000)]
Split out the common bcm283x fixes from the bcm2835 specific files.

9 years agoRemove now unneeded headers from the Broadcom DWC driver
andrew [Fri, 20 Mar 2015 14:23:40 +0000 (14:23 +0000)]
Remove now unneeded headers from the Broadcom DWC driver

9 years agoMove the code to set the device power to the bcm2835 mailbox driver so it
andrew [Fri, 20 Mar 2015 14:16:39 +0000 (14:16 +0000)]
Move the code to set the device power to the bcm2835 mailbox driver so it
can be reused by other drivers.

9 years agoTiny comment fix.
glebius [Fri, 20 Mar 2015 14:16:26 +0000 (14:16 +0000)]
Tiny comment fix.

9 years agoNow, when r272244 introduced counter(9) based counters for all interfaces,
glebius [Fri, 20 Mar 2015 14:05:17 +0000 (14:05 +0000)]
Now, when r272244 introduced counter(9) based counters for all interfaces,
revert the r271538, which did that for vlan(4) only.

No objections: melifaro
Sponsored by: Nginx, Inc.

9 years agoExpand the bitcount* API to support 64-bit integers, plain ints and longs
jhb [Fri, 20 Mar 2015 10:27:06 +0000 (10:27 +0000)]
Expand the bitcount* API to support 64-bit integers, plain ints and longs
and create a "hidden" API that can be used in other system headers without
adding namespace pollution.
- If the POPCNT instruction is enabled at compile time, use
  __builtin_popcount*() to implement __bitcount*(), otherwise fall back
  to software implementations.
- Use the existing bitcount16() and bitcount32() from <sys/systm.h> to
  implement the non-POPCNT __bitcount16() and __bitcount32() in
  <sys/types.h>.
- For the non-POPCNT __bitcount64(), use a similar SWAR method on 64-bit
  systems.  For 32-bit systems, use two __bitcount32() operations on the
  two halves.
- Use __bitcount32() to provide a __bitcount() that operates on plain ints.
- Use either __bitcount32() or __bitcount64() to provide a
  __bitcountl() that operates on longs.
- Add public bitcount*() wrappers for __bitcount*() for use in the kernel
  in <sys/libkern.h>.
- Use __builtinl() instead of __builtin_popcountl() in BIT_COUNT().

Discussed with: bde

9 years agoAllow to override default kernel virtual address assignment on ARM
zbb [Fri, 20 Mar 2015 10:15:34 +0000 (10:15 +0000)]
Allow to override default kernel virtual address assignment on ARM

Each plaform performs virtual memory split between kernel and user space
and assigns kernel certain amount of memory space. However, is is sometimes
reasonable to change the default values. Such situation may happen on
systems where the demand for kernel buffers is high, many devices occupying
memory etc. This of course comes with the cost of decreasing user space
memory range so shall be used with care. Most embedded systems will not
suffer from this limtation but rather take advantage of this potential
since default behavior is left unchanged.

Submitted by:  Wojciech Macek <wma@semihalf.com>
Reviewed by:   imp
Obtained from: Semihalf

9 years agoPermit multiple arguments for the nonnull attribute.
pfg [Fri, 20 Mar 2015 01:07:48 +0000 (01:07 +0000)]
Permit multiple arguments for the nonnull attribute.

This is very useful for non-trivial functions and doesn't
affect existing uses.

MFC after: 5 days

9 years agoDefine BINDIR for some test utilities.
hselasky [Thu, 19 Mar 2015 15:55:02 +0000 (15:55 +0000)]
Define BINDIR for some test utilities.

MFC after: 3 days
Sponsored by: Mellanox Technologies

9 years agoFix some style issues.
hselasky [Thu, 19 Mar 2015 15:36:36 +0000 (15:36 +0000)]
Fix some style issues.

MFC after: 1 week

9 years agoAdd more known bugs to the USB audio manual page.
hselasky [Thu, 19 Mar 2015 15:32:55 +0000 (15:32 +0000)]
Add more known bugs to the USB audio manual page.

MFC after: 1 week

9 years agoUse VT-d interrupt remapping block (IR) to perform FSB messages
kib [Thu, 19 Mar 2015 13:57:47 +0000 (13:57 +0000)]
Use VT-d interrupt remapping block (IR) to perform FSB messages
translation.  In particular, despite IO-APICs only take 8bit apic id,
IR translation structures accept 32bit APIC Id, which allows x2APIC
mode to function properly.  Extend msi_cpu of struct msi_intrsrc and
io_cpu of ioapic_intsrc to full int from one byte.

KPI of IR is isolated into the x86/iommu/iommu_intrmap.h, to avoid
bringing all dmar headers into interrupt code. The non-PCI(e) devices
which generate message interrupts on FSB require special handling. The
HPET FSB interrupts are remapped, while DMAR interrupts are not.

For each msi and ioapic interrupt source, the iommu cookie is added,
which is in fact index of the IRE (interrupt remap entry) in the IR
table. Cookie is made at the source allocation time, and then used at
the map time to fill both IRE and device registers. The MSI
address/data registers and IO-APIC redirection registers are
programmed with the special values which are recognized by IR and used
to restore the IRE index, to find proper delivery mode and target.
Map all MSI interrupts in the block when msi_map() is called.

Since an interrupt source setup and dismantle code are done in the
non-sleepable context, flushing interrupt entries cache in the IR
hardware, which is done async and ideally waits for the interrupt,
requires busy-wait for queue to drain.  The dmar_qi_wait_for_seq() is
modified to take a boolean argument requesting busy-wait for the
written sequence number instead of waiting for interrupt.

Some interrupts are configured before IR is initialized, e.g. ACPI
SCI.  Add intr_reprogram() function to reprogram all already
configured interrupts, and call it immediately before an IR unit is
enabled.  There is still a small window after the IO-APIC redirection
entry is reprogrammed with cookie but before the unit is enabled, but
to fix this properly, IR must be started much earlier.

Add workarounds for 5500 and X58 northbridges, some revisions of which
have severe flaws in handling IR.  Use the same identification methods
as employed by Linux.

Review: https://reviews.freebsd.org/D1892
Reviewed by: neel
Discussed with: jhb
Tested by: glebius, pho (previous versions)
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

9 years agoStart to import support for the AArch64 architecture from ARM. This change
andrew [Thu, 19 Mar 2015 13:53:47 +0000 (13:53 +0000)]
Start to import support for the AArch64 architecture from ARM. This change
only adds support for kernel-toolchain, however it is expected further
changes to add kernel and userland support will be committed as they are
reviewed.

As our copy of binutils is too old the devel/aarch64-binutils port needs
to be installed to pull in a linker.

To build either TARGET needs to be set to arm64, or TARGET_ARCH set to
aarch64. The latter is set so uname -p will return aarch64 as existing
third party software expects this.

Differential Revision: https://reviews.freebsd.org/D2005
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

9 years agoProvide definitions for all descriptors types in the DMAR invalidation
kib [Thu, 19 Mar 2015 13:05:55 +0000 (13:05 +0000)]
Provide definitions for all descriptors types in the DMAR invalidation
queue.  They are for first-level translations and device TLB.

Review: https://reviews.freebsd.org/D1892
Reviewed by: neel
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFix syntax error.
kib [Thu, 19 Mar 2015 13:03:58 +0000 (13:03 +0000)]
Fix syntax error.

Review: https://reviews.freebsd.org/D1892
Found by: neel
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoFix building ixgbe with gcc, it doesn't like nested extern declarations.
andrew [Thu, 19 Mar 2015 13:00:02 +0000 (13:00 +0000)]
Fix building ixgbe with gcc, it doesn't like nested extern declarations.
The fix is to move the extern declaration ix_crcstrip out of
ixgbe_setup_hw_rsc.

9 years agoAdd camcontrol subcommands to control APM and AAM levels.
mav [Thu, 19 Mar 2015 12:22:57 +0000 (12:22 +0000)]
Add camcontrol subcommands to control APM and AAM levels.

MFC after: 1 week
Sponsored by: iXsystems, Inc.

9 years agoUse the dsb macro to use the correct instruction when building for ARMv7.
andrew [Thu, 19 Mar 2015 11:34:51 +0000 (11:34 +0000)]
Use the dsb macro to use the correct instruction when building for ARMv7.

9 years agoFix the label search routine in geom_map to not trip up on '\0' bytes.
adrian [Thu, 19 Mar 2015 03:58:25 +0000 (03:58 +0000)]
Fix the label search routine in geom_map to not trip up on '\0' bytes.

* Just do the buf check early and fail out
* If the offset being searched is:

00110000  00 b5 7e 45 61 e2 76 d3  c1 78 dd 15 95 cd 1f f1  |..~Ea.v..x......|

.. and the match string is '.!/bin/sh'

.. then it'll set the match string[0] to '\0', do a strncmp() against
the read buffer, find it's matching two zero-length strings, and think
that's where to start.

MFC after: 2 weeks

9 years agoFix the root cause of the "vm_reserv_populate: reserv <address> is already
alc [Thu, 19 Mar 2015 01:40:43 +0000 (01:40 +0000)]
Fix the root cause of the "vm_reserv_populate: reserv <address> is already
promoted" panics.  The sequence of events that leads to a panic is rather
long and circuitous.  First, suppose that process P has a promoted
superpage S within vm object O that it can write to.  Then, suppose that P
forks, which leads to S being write protected.  Now, before P's child
exits, suppose that P writes to another virtual page within O.  Since the
pages within O are copy on write, a shadow object for O is created to
house the new physical copy of the faulted on virtual page.  Then, before
P can fault on S, P's child exists.  Now, when P faults on S, it will
follow the "optimized" path for copy-on-write faults in vm_fault(),
wherein the underlying physical page is moved from O to its shadow object
rather than allocating a new page and copying the new page's contents from
the old page.  Moreover, suppose that every 4 KB physical page making up S
is moved to the shadow object in this way.  However, the optimized path
does not move the underlying superpage reservation, which is the root
cause of the panics!  Ultimately, P performs vm_object_collapse() on O's
shadow object, which destroys O and in doing so breaks any reservations
still belonging to O.  This leaves the reservation underlying S in an
inconsistent state: It's simultaneously not in use and promoted.  Breaking
a reservation does not demote it because I never intended for a promoted
reservation to be broken.  It makes little sense.  Finally, this
inconsistency leads to an assertion failure the next time that the
reservation is used.

The failing assertion does not (currently) exist in FreeBSD 10.x or
earlier.  There, we will quietly break the promoted reservation.  While
illogical and unintended, breaking the reservation is essentially
harmless.

PR: 198163
Reviewed by: kib
Tested by: pho
X-MFC after: r267213
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd connection flow type to siftr(4).
hiren [Thu, 19 Mar 2015 00:23:16 +0000 (00:23 +0000)]
Add connection flow type to siftr(4).

Suggested by: adrian
Sponsored by: Limelight Networks

9 years agoTo avoid a possible race, release the reference to ifa after return
ae [Thu, 19 Mar 2015 00:04:25 +0000 (00:04 +0000)]
To avoid a possible race, release the reference to ifa after return
from nd6_dad_na_input().

Submitted by: Alexandre Martins
MFC after: 1 week

9 years agoRemove a non-required unsafe condition added in the previous commit
allanjude [Wed, 18 Mar 2015 23:47:30 +0000 (23:47 +0000)]
Remove a non-required unsafe condition added in the previous commit

Reviewed by: bapt
Approved by: dteske
Sponsored by: ScaleEngine Inc.

9 years agoFix the handbook install option in bsdinstall
allanjude [Wed, 18 Mar 2015 23:24:38 +0000 (23:24 +0000)]
Fix the handbook install option in bsdinstall

bsdconfig's f_package_add doesn't seem to support using the pkg repo from /etc/pkg/FreeBSD.conf, it also tries to run the commands on the installer image, not in the destination chroot

Instead, manually bootstrap pkg in the chroot, and then install the requested packages (in the chroot)

Doesn't use pkg -c, because pkg is not installed on the installer image

PR: 196250
Differential Revision: https://reviews.freebsd.org/D2026
Approved by: bapt
Sponsored by: ScaleEngine Inc.

9 years agoAdd connection flowid to siftr(4).
hiren [Wed, 18 Mar 2015 23:24:25 +0000 (23:24 +0000)]
Add connection flowid to siftr(4).

Reviewed by: lstewart
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D2089

9 years agoCosmetics:
kib [Wed, 18 Mar 2015 22:05:15 +0000 (22:05 +0000)]
Cosmetics:
- Move to ANSI definitions syntax, removing warnings about type promotions.
- Remove __P().
- Staticise everything.
- Remove warnings about unused args for signal handlers.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoImprove the mt(1) rblim display.
ken [Wed, 18 Mar 2015 20:54:54 +0000 (20:54 +0000)]
Improve the mt(1) rblim display.

The granularity reported by READ BLOCK LIMITS is an exponent, not a
byte value.  So a granularity of 0 means 2^0, or 1 byte.  A
granularity of 1 means 2^1, or 2 bytes.

Print out the individual block limits on separate lines to improve
readability and avoid exceeding 80 columns.

usr.bin/mt/mt.c:
Fix and improve the 'mt rblim' output.  Add a MT_PLURAL()
macro so we can print "byte" or "bytes" as appropriate.

Sponsored by: Spectra Logic
MFC after: 4 days

9 years agoFix a couple of problems in the sa(4) media type reports.
ken [Wed, 18 Mar 2015 20:52:34 +0000 (20:52 +0000)]
Fix a couple of problems in the sa(4) media type reports.

The only drives I have discovered so far that support medium type
reports are newer HP LTO (LTO-5 and LTO-6) drives.  IBM drives
only support the density reports.

sys/cam/scsi/scsi_sa.h:
The number of possible density codes in the medium type
report is 9, not 8.  This caused problems parsing all of
the medium type report after this point in the structure.

usr.bin/mt/mt.c:
Run the density codes returned in the medium type report
through denstostring(), just like the primary and secondary
density codes in the density report.  This will print the
density code in hex, and give a text description if it
is available.

Thanks to Rudolf Cejka for doing extensive testing with HP LTO drives
and Bacula and discovering these problems.

Tested by: Rudolf Cejka <cejkar at fit.vutbr.cz>
Sponsored by: Spectra Logic
MFC after: 4 days

9 years agoFix i386 LINT build issues, and remove unused variable.
jfv [Wed, 18 Mar 2015 20:11:59 +0000 (20:11 +0000)]
Fix i386 LINT build issues, and remove unused variable.

9 years agoCorrect the ixgbe entries in mips and powerpc, and add the module
jfv [Wed, 18 Mar 2015 16:54:03 +0000 (16:54 +0000)]
Correct the ixgbe entries in mips and powerpc, and add the module
entries in i386/amd64 in the Makefile

9 years agoClear an mbuf's external storage flags in m_extaddref(). They are cleared
jhb [Wed, 18 Mar 2015 14:51:03 +0000 (14:51 +0000)]
Clear an mbuf's external storage flags in m_extaddref(). They are cleared
in other places that set the external storage type (ext_type) such as
m_cljset(), m_extadd(), mb_ctor_clust(), and vn_sendfile().

Differential Revision: https://reviews.freebsd.org/D2080
Reviewed by: np, glebius
MFC after: 2 weeks

9 years agoUpdate ucom(4) with information about the new PPS capture abilities.
ian [Wed, 18 Mar 2015 14:49:16 +0000 (14:49 +0000)]
Update ucom(4) with information about the new PPS capture abilities.

Differential Revision: https://reviews.freebsd.org/D2049

9 years agoAllowus to exclude a.out support from ldd and use it with arm64 as it won't
andrew [Wed, 18 Mar 2015 13:59:04 +0000 (13:59 +0000)]
Allowus to exclude a.out support from ldd and use it with arm64 as it won't
support the a.out format.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation

9 years agoWe won't support a.out on arm64/aarch64. As such there will be no need to
andrew [Wed, 18 Mar 2015 13:54:53 +0000 (13:54 +0000)]
We won't support a.out on arm64/aarch64. As such there will be no need to
support it in nlist(3).

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation

9 years agoxlint: add arm64 #define
emaste [Wed, 18 Mar 2015 13:07:19 +0000 (13:07 +0000)]
xlint: add arm64 #define

Submitted by: andrew@
Sponsored by: The FreeBSD Foundation

9 years agoAdd missing void pointer argument to SYSINIT() functions.
hselasky [Wed, 18 Mar 2015 10:50:10 +0000 (10:50 +0000)]
Add missing void pointer argument to SYSINIT() functions.

MFC after: 3 days
Sponsored by: Mellanox Technologies

9 years agoFix problems about 32-bit ticks wraparound and unsigned long
hselasky [Wed, 18 Mar 2015 10:49:17 +0000 (10:49 +0000)]
Fix problems about 32-bit ticks wraparound and unsigned long
conversion:
- The linux compat API layer casts the ticks to unsigned long which
might cause problems when the ticks value is negative.
- Guard against already expired ticks values, by checking if the
passed expiry tick is already elapsed.
- While at it avoid referring the address of an inlined function.

MFC after: 3 days
Sponsored by: Mellanox Technologies

9 years agoDeclare missing symbol and inline macro which is only used once.
hselasky [Wed, 18 Mar 2015 08:46:08 +0000 (08:46 +0000)]
Declare missing symbol and inline macro which is only used once.

MFC after: 2 weeks
Sponsored by: Mellanox Technologies
Submitted by: glebius@

9 years agoImplement pax -O option to permit limiting a PAX archive to a single volume.
eadler [Wed, 18 Mar 2015 05:48:05 +0000 (05:48 +0000)]
Implement pax -O option to permit limiting a PAX archive to a single volume.

-O Force the archive to be one volume.  If a volume ends prematurely, pax will
not prompt for a new volume.

PR: 198481
Submitted by: Sevan Janiyan
Reviewed by: allanjude (doc)

9 years agoFix ixgbe(4) to compile - with RSS; with ix+ixv in the kernel.
adrian [Wed, 18 Mar 2015 05:05:30 +0000 (05:05 +0000)]
Fix ixgbe(4) to compile - with RSS; with ix+ixv in the kernel.

* Fix the multiple same-named devclasses; the duplicate name
  trips up the linker.

* Re-do the taskqueue stuff to use the new cpuset API, not the old
  pinned API.

* Add includes for the new location of the RSS configuration routines.

This allows ixgbe to compile as a module /and/ linked into the kernel,
along with RSS working.

Sponsored by: Norse Corp, Inc.

9 years agoFix ixgbe(4) - add ix_txrx to compile in the kernel.
adrian [Wed, 18 Mar 2015 05:03:07 +0000 (05:03 +0000)]
Fix ixgbe(4) - add ix_txrx to compile in the kernel.

Sponsored by: Norse Corp, Inc.

9 years agoCorrectly const-ify things.
adrian [Wed, 18 Mar 2015 04:40:36 +0000 (04:40 +0000)]
Correctly const-ify things.

Found by: clang 3.6

9 years agoResolve a few build issues, add module directories back into Makefile,
jfv [Tue, 17 Mar 2015 22:40:50 +0000 (22:40 +0000)]
Resolve a few build issues, add module directories back into Makefile,
then correct a NETMAP problem resulting from the split, and finally
temporarily disable the X550 functionality.

9 years agoWhen initial placement of the new entry crosses the boundary,
kib [Tue, 17 Mar 2015 22:00:11 +0000 (22:00 +0000)]
When initial placement of the new entry crosses the boundary,
allocator tries to move the entry up, after the boundary.  The new
location may still fail to satisfy boundary requirement, for instance,
if the boundary is set to page size, and allocation is of multiple
pages.

Recheck that boundary is not crossed after the move.  If it is
crossed, give up on allocating the whole entry and split it.

Reported by: Michael Fuckner <michael@fuckner.net>, running nvme(4)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoWhen inserting new entry into the address map, ensure that not only
kib [Tue, 17 Mar 2015 21:55:33 +0000 (21:55 +0000)]
When inserting new entry into the address map, ensure that not only
next entry does not intersect with the tail of the new entry, but also
that previous entry is also before new entry start.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFix fdt_platform_fixups() mem region handling. It turns out u-boot puts
ian [Tue, 17 Mar 2015 21:15:24 +0000 (21:15 +0000)]
Fix fdt_platform_fixups() mem region handling.  It turns out u-boot puts
several types of data into the mem-info array (DRAM, SRAM, flash).  We
need to extract just the DRAM entries for translation into fdt memory
properties.

Also, increase the number of regions we can handle from 5 to 16.

Submitted by: Michal Meloun

9 years agoThe minimum sbuf buffer size is 2 bytes (a byte plus a nulterm), assert that.
ian [Tue, 17 Mar 2015 21:00:31 +0000 (21:00 +0000)]
The minimum sbuf buffer size is 2 bytes (a byte plus a nulterm), assert that.

Values smaller than two lead to strange asserts that have nothing to do
with the actual problem (in the case of size=0), or to writing beyond the
end of the allocated buffer in sbuf_finish() (in the case of size=1).

9 years agoIn sbuf_new_for_sysctl(), default the buffer size to 64 bytes if the
ian [Tue, 17 Mar 2015 20:56:24 +0000 (20:56 +0000)]
In sbuf_new_for_sysctl(), default the buffer size to 64 bytes if the
passed-in pointer is NULL and the length is zero.

9 years agoDocument that nextboot(8) doesn't work as expected with ZFS
allanjude [Tue, 17 Mar 2015 20:15:49 +0000 (20:15 +0000)]
Document that nextboot(8) doesn't work as expected with ZFS

Differential Revision: https://reviews.freebsd.org/D2087
Submitted by: feld (request)
Reviewed by: feld
Approved by: bcr (mentor)
Sponsored by: ScaleEngine Inc.

9 years agoWhen cross-building with an external toolchain we still need a target strip
emaste [Tue, 17 Mar 2015 19:35:50 +0000 (19:35 +0000)]
When cross-building with an external toolchain we still need a target strip

It is used by at least crunchide(1).

9 years agoo Enhance vm_pager_free_nonreq() function:
glebius [Tue, 17 Mar 2015 19:19:19 +0000 (19:19 +0000)]
o Enhance vm_pager_free_nonreq() function:
  - Allow to call the function with vm object lock held.
  - Allow to specify reqpage that doesn't match any page in the region,
    meaning freeing all pages.
o Utilize the new function in couple more places in vnode pager.

Reviewed by: alc, kib
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoAdd arm64 xlint support.
emaste [Tue, 17 Mar 2015 19:16:51 +0000 (19:16 +0000)]
Add arm64 xlint support.

Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation

9 years agoFix build.
glebius [Tue, 17 Mar 2015 19:13:11 +0000 (19:13 +0000)]
Fix build.

Reviewed by: dumbbell

9 years agoFix build after r280182.
glebius [Tue, 17 Mar 2015 19:07:43 +0000 (19:07 +0000)]
Fix build after r280182.

9 years agoIntroduce Annapurna Labs AHCI support
zbb [Tue, 17 Mar 2015 18:59:47 +0000 (18:59 +0000)]
Introduce Annapurna Labs AHCI support

Overview:
* implemented quirk for forcing SATA interface enable
* restore value to status register - this enables link autonegotiation

Modifications:
* devid:vendorid field
* quirk for forcing PI setting (BIOS is doing that on PC-like systems)
* write to capabilites field to enable phy link initialization

Submitted by:  Wojciech Macek <wma@semihalf.com>
Reviewed by:   imp, mav
Obtained from: Semihalf

9 years agodrm: Update the device-independent code to match Linux 3.8.13
dumbbell [Tue, 17 Mar 2015 18:50:33 +0000 (18:50 +0000)]
drm: Update the device-independent code to match Linux 3.8.13

This update brings few features:
    o  Support for the setmaster/dropmaster ioctls. For instance, they
       are used to run multiple X servers simultaneously.
    o  Support for minor devices. The only user-visible change is a new
       entry in /dev/dri but it is useless at the moment. This is a
       first step to support render nodes [1].

The main benefit is to greatly reduce the diff with Linux (at the
expense of an unreadable commit diff). Hopefully, next upgrades will be
easier.

No updates were made to the drivers, beside adapting them to API
changes.

[1] https://en.wikipedia.org/wiki/Direct_Rendering_Manager#Render_nodes

Tested by: Many people
MFC after: 1 month
Relnotes: yes

9 years agoUpdate to the Intel ixgbe driver:
jfv [Tue, 17 Mar 2015 18:32:28 +0000 (18:32 +0000)]
Update to the Intel ixgbe driver:
- Split the driver into independent pf and vf loadables. This is
  in preparation for SRIOV support which will be following shortly.
  This also allows us to keep a seperate revision control over the
  two parts, making for easier sustaining.
- Make the TX/RX code a shared/seperated file, in the old code base
  the ixv code would miss fixes that went into ixgbe, this model
  will eliminate that problem.
- The driver loadables will now match the device names, something that
  has been requested for some time.
- Rather than a modules/ixgbe there is now modules/ix and modules/ixv
- It will also be possible to make your static kernel with only one
  or the other for streamlined installs, or both.

Enjoy!

Submitted by: jfv and erj

9 years agoImport compiler-rt r232125 by Joerg Sonnenberger
emaste [Tue, 17 Mar 2015 15:48:19 +0000 (15:48 +0000)]
Import compiler-rt r232125 by Joerg Sonnenberger

  We want single precision here.

9 years agoDocument LIB and LIB_CXX.
bdrewery [Tue, 17 Mar 2015 15:21:01 +0000 (15:21 +0000)]
Document LIB and LIB_CXX.

MFC after: 2 weeks
X-MFC-With: r280179

9 years agoAdd LIB_CXX so that C++ libraries will use CXX to link.
bdrewery [Tue, 17 Mar 2015 15:16:36 +0000 (15:16 +0000)]
Add LIB_CXX so that C++ libraries will use CXX to link.

This fixes C++ libraries not implicitly linking in libc++.  This is
generally not an issue because the final linking with the compiled binary
will involve CXX via PROG_CXX or other means.  It is however
inconsistent with libraries implicitly linking in libc and problematic
for trying to build libraries with '-z defs' to ensure all direct
dependencies are linked in.

libatf-c++ is currently the only consumer of this new feature.

Differential Revision: https://reviews.freebsd.org/D2039
Reviewed by: imp
Discussed with: bapt
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoUnhide linker line for libraries.
bdrewery [Tue, 17 Mar 2015 15:12:52 +0000 (15:12 +0000)]
Unhide linker line for libraries.

The compilation lines are not hidden and there is not much reason to
hide the linker line. It is useful to see.

Discussed at: https://reviews.freebsd.org/D2039
MFC after: 2 weeks

9 years agoRemove unneeded handling of undefined NM.
bdrewery [Tue, 17 Mar 2015 15:11:45 +0000 (15:11 +0000)]
Remove unneeded handling of undefined NM.

Pointed out by: imp
Discussed at: https://reviews.freebsd.org/D2039
MFC after: 2 weeks

9 years agoReduce header pollution.
glebius [Tue, 17 Mar 2015 14:16:50 +0000 (14:16 +0000)]
Reduce header pollution.

9 years agoImprove ATA and SCSI versions printing.
mav [Tue, 17 Mar 2015 13:21:49 +0000 (13:21 +0000)]
Improve ATA and SCSI versions printing.

There is no "SCSI-6" and "ATA-9", but there is "SPC-4" and "ACS-2".

MFC after: 2 weeks

9 years agoUse 24h timestamps in the ps(1) STARTED column
feld [Tue, 17 Mar 2015 12:40:33 +0000 (12:40 +0000)]
Use 24h timestamps in the ps(1) STARTED column

The previous 12h AM/PM format was perplexing as it didn't follow the
locale of the user and was a minor annoyance to FreeBSD users coming
from Linux. Additionally, the man page was incorrect about the strftime
format.

There are three time formats that may be displayed in the STARTED
column depending on the age of the process. Below is an example.

For a process started at 14:30 on Monday 16 March 2015, the following
formats may be used:

14:30 for process < 24h old (24h Timestamp)
Mon14 for process > 24h, < 1 week old (Weekday Hour)
16Mar15 for process > 1 week old (Day Month Year)

Differential Revision: https://reviews.freebsd.org/D1620
Reviewed by: brd
Approved by: trasz

9 years agoAlways lock the hash row of a source node when updating its 'states' counter.
glebius [Tue, 17 Mar 2015 12:19:28 +0000 (12:19 +0000)]
Always lock the hash row of a source node when updating its 'states' counter.

PR: 182401
Sponsored by: Nginx, Inc.

9 years agoRemove no longer used allocation type.
hselasky [Tue, 17 Mar 2015 11:07:59 +0000 (11:07 +0000)]
Remove no longer used allocation type.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

9 years agoMake ATA power management commands to work on SCSI HBAs via PASS THROUGH.
mav [Tue, 17 Mar 2015 09:21:31 +0000 (09:21 +0000)]
Make ATA power management commands to work on SCSI HBAs via PASS THROUGH.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

9 years agoUse define instead of constant.
hselasky [Tue, 17 Mar 2015 08:42:09 +0000 (08:42 +0000)]
Use define instead of constant.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

9 years agosfxge: increase default put-list limit to 1024
arybchik [Tue, 17 Mar 2015 08:23:46 +0000 (08:23 +0000)]
sfxge: increase default put-list limit to 1024

Drops are observed under multi-stream TCP traffic due to put-list
overflow with limit equal to 64.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: prefetch txq->common if TxQ is started only
arybchik [Tue, 17 Mar 2015 08:23:15 +0000 (08:23 +0000)]
sfxge: prefetch txq->common if TxQ is started only

Transmit may be called when TxQ is not started yet (i.e. txq->common is
invalid). TxQ state is checked below when mbuf is processed and dropped
if TxQ is not started.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: adding version info to device description
arybchik [Tue, 17 Mar 2015 08:21:31 +0000 (08:21 +0000)]
sfxge: adding version info to device description

The information is required for NIC update and config tools.

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: move deferred packet list statistics to dedicated node
arybchik [Tue, 17 Mar 2015 08:16:37 +0000 (08:16 +0000)]
sfxge: move deferred packet list statistics to dedicated node

It is done to structure sysctl and do not mix with Tx queue statistics
to be added.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: add tunables to control LRO parameters on driver load time
arybchik [Tue, 17 Mar 2015 08:14:46 +0000 (08:14 +0000)]
sfxge: add tunables to control LRO parameters on driver load time

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoCatch up with Clang 3.6.0.
jkim [Tue, 17 Mar 2015 05:48:45 +0000 (05:48 +0000)]
Catch up with Clang 3.6.0.

9 years agoBump the date after the `show devmap` addition.
stas [Tue, 17 Mar 2015 00:15:55 +0000 (00:15 +0000)]
Bump the date after the `show devmap` addition.

9 years agoDocument the `show devmap` DDB command.
stas [Tue, 17 Mar 2015 00:12:29 +0000 (00:12 +0000)]
Document the `show devmap` DDB command.

9 years agoFix minor fallout from sysctl strings being nulterminated now. The dmesg
ian [Mon, 16 Mar 2015 21:09:11 +0000 (21:09 +0000)]
Fix minor fallout from sysctl strings being nulterminated now.  The dmesg
code can read the buffer via sysctl or from a core file.  In the core file
case there will be no nulterm, and the code copes with that, but now in the
sysctl case there is a nulterm (there didn't used to be).  The least
disruptive way to restore the old behavior (and eliminate a spurious '\000'
at the end of the output) is to remove the nulterm (by decrementing the
buffer length) in the sysctl case.

9 years agoDefault to turning off OpenSSL SSL_OP_TLSEXT_PADDING as it breaks
gshapiro [Mon, 16 Mar 2015 20:24:37 +0000 (20:24 +0000)]
Default to turning off OpenSSL SSL_OP_TLSEXT_PADDING as it breaks
compatibility with some sites

This change comes from 8.15 but is being backported to FreeBSD releases
not yet using 8.15.

MFC after: 3 days
Noted by: julian@

9 years agoReport that we may have write cache, and that we do support FLUSH.
mav [Mon, 16 Mar 2015 20:13:25 +0000 (20:13 +0000)]
Report that we may have write cache, and that we do support FLUSH.

FreeBSD guest driver does not use that legacy flag, but Linux seems does.

MFC after: 2 weeks

9 years agoReset bp->bio_done to unmapped_buf when removing a transient map in biodone.
benno [Mon, 16 Mar 2015 20:00:09 +0000 (20:00 +0000)]
Reset bp->bio_done to unmapped_buf when removing a transient map in biodone.

Submitted by: Scott Ferris <scott.ferris@isilon.com>
Sponsored by: EMC / Isilon Storage Division
Reviewed by: kib

9 years agoTrivial change / forced-commit to document prior change that slipped in
ian [Mon, 16 Mar 2015 19:29:19 +0000 (19:29 +0000)]
Trivial change / forced-commit to document prior change that slipped in
without a commit message...

Use sbuf_new() + SYSCTL_OUT() instead of wiring the userland buffer and
using sbuf_new_for_sysctl().  The preallocated 256 byte buffer is always
going to be big enough to hold these results, and this should be more
efficient than wiring the old buffer.

9 years ago(no commit message)
ian [Mon, 16 Mar 2015 19:25:03 +0000 (19:25 +0000)]

9 years agoUse a regular sbuf + SYSCTL_OUT() rather than sbuf_new_for_sysctl() with
ian [Mon, 16 Mar 2015 19:18:45 +0000 (19:18 +0000)]
Use a regular sbuf + SYSCTL_OUT() rather than sbuf_new_for_sysctl() with
auto-draining, to avoid a potential copyout fault while holding a lock.

Pointed out by:   jhb
Pointy hat to:   ian

9 years agoUpdate an sbuf assertion to allow for the new SBUF_INCLUDENUL flag. If
ian [Mon, 16 Mar 2015 17:45:41 +0000 (17:45 +0000)]
Update an sbuf assertion to allow for the new SBUF_INCLUDENUL flag.  If
INCLUDENUL is set and sbuf_finish() has been called, the length has been
incremented to count the nulterm byte, and in that case current length is
allowed to be equal to buffer size, otherwise it must be less than.

Add a predicate macro to test for SBUF_INCLUDENUL, and use it in tests, to
be consistant with the style in the rest of this file.

9 years agoIntroduce a cap_ioctl_t used for the 'cmds' arguments to cap_ioctls_limit()
rwatson [Mon, 16 Mar 2015 17:42:53 +0000 (17:42 +0000)]
Introduce a cap_ioctl_t used for the 'cmds' arguments to cap_ioctls_limit()
and cap_ioctls_get().  On FreeBSD, these are 'unsigned long', but on Linux,
ioctl(2) takes an 'int', making mild abstraction desirable.

MFC after: 3 days
Sponsored by: Google, Inc.

9 years agoConvert PTE eviction lock from an RW lock to a RM lock. It is held for
nwhitehorn [Mon, 16 Mar 2015 16:29:33 +0000 (16:29 +0000)]
Convert PTE eviction lock from an RW lock to a RM lock. It is held for
writing approximately never (< 0.00000001% under heavy VM load, and it can
go for months without ever being acquired in normal operation). This
provides a 10% (2-minute) improvement in wall clock time for make -j32
buildworld on a 4-core 32-thread POWER8.

9 years agoMove special DDP handling for closing a connection into a new
jhb [Mon, 16 Mar 2015 15:56:06 +0000 (15:56 +0000)]
Move special DDP handling for closing a connection into a new
handle_ddp_close() function in t4_ddp.c as the logic is similar
to handle_ddp_data().  This allows all knowledge of the special
DDP mbufs to be private to t4_ddp.c as well.

9 years agoDocument r279663, qsort(3) enhancements.
gjb [Mon, 16 Mar 2015 15:54:53 +0000 (15:54 +0000)]
Document r279663, qsort(3) enhancements.

Sponsored by: The FreeBSD Foundation