]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoImport to 0.6.1
phil [Fri, 15 Apr 2016 18:46:15 +0000 (18:46 +0000)]
Import to 0.6.1
  0.5.0:
    document "trim" modifier
    add xo_emit_field functions
    Add xo_set_file{,_h} functions
    Fix LIBXO_* variables; add -L and -I as needed
    add --disable-silent-rules and an explicit make; s/PACKAGE-NAME/PACKAGE_NAME/; add /download/ to 'url'
    fix silliness where xo_flush_h emitted closing tag (html); make the caller (xo_message) do it
    flush after transitions; fix flush call in xo_do_emit
    mkdir the version-specific packaging dir
    use "XO_" instead of LIBXO_

  0.6.0:
    Add --with-retain-size to set the size (in bits) of the retain hash buckets
    Add The Argument Modifier ({a:})
    Add retain and no-retain to --libxo
    autoconf: Add test for monitor.h
    Document quote heuristic
    go deep with nroff backslashes
    Use "ULL" for 32 bit check
    add xo_retain_clear and xo_retain_clear_all
    docs: combine two 'handles' section; move command line argument section
    handle GETTEXT when msgfmt isn't where it's supposed to be (FreeBSD)
    make 'retain' a flag (XOEF_RETAIN) instead of a role; it's simpler, and doesn't feel as tacky. "{R:}" was painful to document, which means it's painful to use.
    new xo_emit_f functions
    nuke some unused UNUSEDs
    test code: path must be static
    update test cases

  0.6.1:
    fix version number (missed a commit during new-release)

Reviewed by: sjg
Approved by: sjg (mentor)

8 years agoAdd SHLIB_CXX to allow building a C++ shared library without a static one.
bdrewery [Fri, 15 Apr 2016 18:43:54 +0000 (18:43 +0000)]
Add SHLIB_CXX to allow building a C++ shared library without a static one.

Submitted by: ngie
Sponsored by: EMC / Isilon Storage Division

8 years agoSet CPP from XCPP for the libcompat build.
bdrewery [Fri, 15 Apr 2016 18:32:05 +0000 (18:32 +0000)]
Set CPP from XCPP for the libcompat build.

Submitted by: Mark Millard <markmi@dsl-only.net>

8 years agoTag libxo 0.6.0
phil [Fri, 15 Apr 2016 18:03:53 +0000 (18:03 +0000)]
Tag libxo 0.6.0

8 years agoImport libxo 0.6.0
phil [Fri, 15 Apr 2016 18:03:30 +0000 (18:03 +0000)]
Import libxo 0.6.0

8 years agoAdd 4Kn kernel dump support
cem [Fri, 15 Apr 2016 17:45:12 +0000 (17:45 +0000)]
Add 4Kn kernel dump support

(And 4Kn minidump support, but only for amd64.)

Make sure all I/O to the dump device is of the native sector size.  To
that end, we keep a native sector sized buffer associated with dump
devices (di->blockbuf) and use it to pad smaller objects as needed (e.g.
kerneldumpheader).

Add dump_write_pad() as a convenience API to dump smaller objects with
zero padding.  (Rather than pull in NPM leftpad, we wrote our own.)

Savecore(1) has been updated to deal with these dumps.  The format for
512-byte sector dumps should remain backwards compatible.

Minidumps for other architectures are left as an exercise for the
reader.

PR: 194279
Submitted by: ambrisko@
Reviewed by: cem (earlier version), rpokala
Tested by: rpokala (4Kn/512 except 512 fulldump), cem (512 fulldump)
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5848

8 years agosys/net* : for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 17:30:33 +0000 (17:30 +0000)]
sys/net* : for pointers replace 0 with NULL.

Mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agofs misc: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 17:28:24 +0000 (17:28 +0000)]
fs misc: for pointers replace 0 with NULL.

Mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoddb: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 17:27:20 +0000 (17:27 +0000)]
ddb: for pointers replace 0 with NULL.

Mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoDon't corrupt ZFS label's physpath attribute when booting while a disk is missing
asomers [Fri, 15 Apr 2016 16:36:17 +0000 (16:36 +0000)]
Don't corrupt ZFS label's physpath attribute when booting while a disk is missing

Prior to this change, vdev_geom_open_by_path would call vdev_geom_attach
prior to verifying the device's GUIDs.  vdev_geom_attach calls
vdev_geom_attrchange to set the physpath in the vdev object.  The result is
that if the disk could not be found, then the labels for other disks in the
same TLD would overwrite the missing disk's physpath with the physpath of
whichever disk currently has the same devname as the missing one used to
have.

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

8 years agocompat/linux: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 16:21:13 +0000 (16:21 +0000)]
compat/linux: for pointers replace 0 with NULL.

plvc is a pointer, no functional change.

Found with devel/coccinelle.

8 years agog_gate: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 16:18:07 +0000 (16:18 +0000)]
g_gate: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agokern: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 16:10:11 +0000 (16:10 +0000)]
kern: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoRename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine
andrew [Fri, 15 Apr 2016 16:05:41 +0000 (16:05 +0000)]
Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine
independent code that needs to know about INTRNG such as PCI drivers.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoimport libxo-0.4.7
phil [Fri, 15 Apr 2016 15:50:13 +0000 (15:50 +0000)]
import libxo-0.4.7
    Fix bug w/ {e:} in html, where no default encoding format was built
    docs: "t" == "trim" (typo) (cf svn commit: r290445 - head/contrib/libxo/libxo)

Reviewed by: sjg
Approved by: sjg (mentor)

8 years agonetinet: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 15:46:41 +0000 (15:46 +0000)]
netinet: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by: ae. tuexen

8 years agoMake NIRQ configurable for MIPS
sgalabov [Fri, 15 Apr 2016 15:44:02 +0000 (15:44 +0000)]
Make NIRQ configurable for MIPS

Submitted by: kan
Reviewed by: kan
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5964

8 years agoTag libxo 0.4.7
phil [Fri, 15 Apr 2016 15:42:35 +0000 (15:42 +0000)]
Tag libxo 0.4.7

8 years agoImport libxo 0.4.7
phil [Fri, 15 Apr 2016 15:42:12 +0000 (15:42 +0000)]
Import libxo 0.4.7

8 years agoImport Mediatek/Ralink dtsi patches against OpenWRT dtsi files
sgalabov [Fri, 15 Apr 2016 15:36:09 +0000 (15:36 +0000)]
Import Mediatek/Ralink dtsi patches against OpenWRT dtsi files

This revision suggests dtsi patches to be used with the original OpenWRT
dtsi files so we can re-use what has already been done in OpenWRT for the
Mediatek/Ralink SoCs.

The only thing that is required after importing this revision should be
the following:
1. Import OpenWRT dts/dtsi files into sys/gnu/dts/mips
2. Run the following script in sys/gnu/dts/mips:
for f in `ls [mr]t*.dtsi`; do
printf "\n#include <fbsd-$f>\n" > $f
done

This will apply our dtsi patches to OpenWRT's dtsi files and will allow us
to re-use dts/dtsi files for ~170 Mediatek/Ralink boards.

Currently our drivers are not 100% compatible with OpenWRT's dts files, but
they're compatible enough.
We can add more functionality in the future that would better leverage the
OpenWRT work as well.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5965

8 years agoChange the fdt_static_dtb.S dependency
sgalabov [Fri, 15 Apr 2016 15:28:23 +0000 (15:28 +0000)]
Change the fdt_static_dtb.S dependency

fdt_static_dtb.S dependency in sys/conf/files is currently set as:
$S/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE}

This is wrong, as what fdt_static_dtb.S actually uses is the DTB file
produced from the FDT_DTS_FILE.
In addition it also makes using DTS files stored in $S/gnu/dts/${MACHINE}/
impossible.

So, change the dependency to "fdt_dtb_file", which seems to be the right
option here anyway.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5963

8 years agoMake mx25l compatible with jedec,spi-nor as well
sgalabov [Fri, 15 Apr 2016 15:26:31 +0000 (15:26 +0000)]
Make mx25l compatible with jedec,spi-nor as well

A lot of dts files define the SPI flashes supported by mx25l as
compatible with 'jedec,spi-nor', so we add this to the mx25l
compat_data.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5962

8 years agoMediatek/Ralink: Get our drivers closer to OpenWRT dts definitions
sgalabov [Fri, 15 Apr 2016 15:24:42 +0000 (15:24 +0000)]
Mediatek/Ralink: Get our drivers closer to OpenWRT dts definitions

This revision gets our Mediatek/Ralink drivers closer to OpenWRT's dts
definitions, so we can reuse them with less modifications later in order
to bring support for a lot of boards at once.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5961

8 years agoRemove unneeded initialization in mtk_xhci.c
sgalabov [Fri, 15 Apr 2016 15:22:28 +0000 (15:22 +0000)]
Remove unneeded initialization in mtk_xhci.c

This is actually initialized properly within xhci.c, so it's better to
not initialize it in mtk_xhci.c

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5935

8 years agoIn order to build a kernel with one of these configs the user should do
sgalabov [Fri, 15 Apr 2016 15:20:41 +0000 (15:20 +0000)]
In order to build a kernel with one of these configs the user should do
the following:

1. Give the appropriate board dts file to be used by either:
1.1. edit the SoC kernel config required (e.g., MT7620A_FDT) and include
the required FDT_DTS_FILE makeoption; or
1.2. simply supply FDT_DTS_FILE="xx.dts" on the command line when building
the kernel
Of course, the user can also create a completely new kernel config to
match the desired board and include the SoC kernel config from within
it.

If required, edit the MEDIATEK config file, which includes optional
drivers and comment out the unneeded ones.
2.1. this would only make sense if kernel size is a concern. Even if we
build the kernel with all drivers, if we lzma it and package it as a uImage,
its size is still around 1.1MiB.

The user will have to choose a dts file (or create a new one) from
sys/gnu/dts/mips , where all Mediatek/Ralink dts files will be imported via
a later revision.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5966

8 years agoAlways calculate divisor for the counter mode of LAPIC timer. Even if
kib [Fri, 15 Apr 2016 14:36:38 +0000 (14:36 +0000)]
Always calculate divisor for the counter mode of LAPIC timer.  Even if
initially configured in the TSC deadline mode, eventtimer subsystem
can be switched to periodic, and then DCR register is loaded with
unitialized value.

Reset the LAPIC eventtimer frequency and min/max periods when changing
between deadline and counted periodic modes.

Reported and tested by: Vladimir Zakharov <zakharov.vv@gmail.com>
Sponsored by: The FreeBSD Foundation

8 years agoarm: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 14:30:40 +0000 (14:30 +0000)]
arm: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoAdd a flag field to struct gic_irqsrc and use it to mark when we should
andrew [Fri, 15 Apr 2016 14:28:34 +0000 (14:28 +0000)]
Add a flag field to struct gic_irqsrc and use it to mark when we should
write to the End of Interrupt (EOI) register before handling the interrupt.
This should be a noop as it will be set for all edge triggered interrupts,
however this will not be the case for MSI interrupts. These are also edge
triggered, however we should not write to the EOI register until later in
arm_gic_pre_ithread.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agomips: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 14:26:24 +0000 (14:26 +0000)]
mips: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by: adrian

8 years agopowerpc: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 14:25:13 +0000 (14:25 +0000)]
powerpc: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by: jhibbits

8 years agoAdd initial GICv2m support to the arm GIC driver. This will be used to
andrew [Fri, 15 Apr 2016 14:19:25 +0000 (14:19 +0000)]
Add initial GICv2m support to the arm GIC driver. This will be used to
support MSI and MSI-X interrupts, however intrng needs updates before this
can happen.

For now we just attach the driver until the MSI API is ready.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5950

8 years agoAllocate RACCT/RCTL zones without UMA_ZONE_NOFREE; no idea why it was there
trasz [Fri, 15 Apr 2016 13:34:59 +0000 (13:34 +0000)]
Allocate RACCT/RCTL zones without UMA_ZONE_NOFREE; no idea why it was there
in the first place.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoSync cam.ko module source list with the static kernel file list.
kib [Fri, 15 Apr 2016 12:55:40 +0000 (12:55 +0000)]
Sync cam.ko module source list with the static kernel file list.

Sponsored by: The FreeBSD Foundation

8 years agonetpfil: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 12:24:01 +0000 (12:24 +0000)]
netpfil: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by: ae

8 years agosparc64: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 12:17:34 +0000 (12:17 +0000)]
sparc64: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoofed: for pointers replace 0 with NULL.
pfg [Fri, 15 Apr 2016 12:16:15 +0000 (12:16 +0000)]
ofed: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.
Reviewed by: hselasky

8 years agoSort variable declarations.
trasz [Fri, 15 Apr 2016 11:55:29 +0000 (11:55 +0000)]
Sort variable declarations.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agobusdma/bounce: revert r292255
royger [Fri, 15 Apr 2016 09:21:50 +0000 (09:21 +0000)]
busdma/bounce: revert r292255

Revert r292255 because it can create bounced regions without contiguous
page offsets, which is needed for USB devices.

Another solution would be to force bouncing the full buffer always (even
when only one page requires bouncing), but this seems overly complicated and
unnecessary, and it will probably involve using more bounce pages than the
current code.

Reported by: phk

8 years agoAvoid NULL pointer dereference, for a process which is not (yet) a
kib [Fri, 15 Apr 2016 09:13:01 +0000 (09:13 +0000)]
Avoid NULL pointer dereference, for a process which is not (yet) a
member of a process group, e.g. during the system bootstrap.

Submitted by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
MFC after: 1 week

8 years agohyperv/hn: Hide ring to channel linkage message under bootverbose
sephe [Fri, 15 Apr 2016 08:17:55 +0000 (08:17 +0000)]
hyperv/hn: Hide ring to channel linkage message under bootverbose

Suggested by: Dexuan Cui <decui microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv: No need to zero out softc
sephe [Fri, 15 Apr 2016 08:08:46 +0000 (08:08 +0000)]
hyperv: No need to zero out softc

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/stor: Use xpt_done_direct() upon I/O completion
sephe [Fri, 15 Apr 2016 08:01:07 +0000 (08:01 +0000)]
hyperv/stor: Use xpt_done_direct() upon I/O completion

Reviewed by: mav
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5955

8 years agohyperv/vmbus: Put multi-channel offer logging under bootverbose
sephe [Fri, 15 Apr 2016 07:48:41 +0000 (07:48 +0000)]
hyperv/vmbus: Put multi-channel offer logging under bootverbose

Suggested by: Dexuan Cui <decui microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/stor: Temporary disable the wrongly done command timeout.
sephe [Fri, 15 Apr 2016 07:39:43 +0000 (07:39 +0000)]
hyperv/stor: Temporary disable the wrongly done command timeout.

It will be reenabled once the request processing is corrected.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoExpand CAM_IO_STATS #ifdef to logical unit.
imp [Fri, 15 Apr 2016 05:10:39 +0000 (05:10 +0000)]
Expand CAM_IO_STATS #ifdef to logical unit.

8 years agoPut function only used by CAM_NETFLIX_IOSCHED under that ifdef.
imp [Fri, 15 Apr 2016 05:10:32 +0000 (05:10 +0000)]
Put function only used by CAM_NETFLIX_IOSCHED under that ifdef.

8 years agoOut of an abundance of caution treat
imp [Fri, 15 Apr 2016 05:10:31 +0000 (05:10 +0000)]
Out of an abundance of caution treat
 * Samsung 843T Series SSDs (MZ7WD*)
 * Samsung PM851 Series SSDs (MZ7TE*)
 * Samsung PM853T Series SSDs (MZ7GE*)
as known having broken NCQ TRIM support as they appear to be based on
the same controller technology as the 840 and 850 series.

I've had at least one report of the PM853 being broken, so err on the
side of caution for the above drives. The PM863/SM863 appears to be
based on a newer controller, so give it the benefit of the doubt.

8 years agoAdd update.
imp [Fri, 15 Apr 2016 04:45:37 +0000 (04:45 +0000)]
Add update.

8 years agoUse NULL instead of 0 for pointers.
araujo [Fri, 15 Apr 2016 04:10:47 +0000 (04:10 +0000)]
Use NULL instead of 0 for pointers.

fgetln(3) will returns NULL if cannot get a line from a stream.
strsep(3) it will returns NULL if the end of the string was reached.
jemalloc(3) malloc will returns NULL if it cannot allocate memory.
fgetln(3) it will returns NULL if it cannot get a line from a stream.

MFC after: 4 weeks

8 years agoUse NULL instead of 0 for pointers.
araujo [Fri, 15 Apr 2016 03:50:33 +0000 (03:50 +0000)]
Use NULL instead of 0 for pointers.

getenv(3) returns NULL if the variable name is not in the current
environment.
getservent(3) returns NULL on EOF or error

MFC after: 4 weeks

8 years agoStatic pointers need not be initialized.
cy [Fri, 15 Apr 2016 03:45:09 +0000 (03:45 +0000)]
Static pointers need not be initialized.
MFC after: 4 weeks

8 years agoUse NULL instead of 0 for pointer comparison.
cy [Fri, 15 Apr 2016 03:43:16 +0000 (03:43 +0000)]
Use NULL instead of 0 for pointer comparison.

MFC after: 4 weeks

8 years agoAdd a new PCI bus interface method to alloc the ivars (dinfo) for a device.
jhb [Fri, 15 Apr 2016 03:42:12 +0000 (03:42 +0000)]
Add a new PCI bus interface method to alloc the ivars (dinfo) for a device.

The ACPI and OFW PCI bus drivers as well as CardBus override this to
allocate the larger ivars to hold additional info beyond the stock PCI ivars.

This removes the need to pass the size to functions like pci_add_iov_child()
and pci_read_device() simplifying IOV and bus rescanning implementations.

As a result of this and earlier changes, the ACPI PCI bus driver no longer
needs its own device_attach and pci_create_iov_child methods but can use
the methods in the stock PCI bus driver instead.

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

8 years agoUse NULL instead of 0 for pointers.
araujo [Fri, 15 Apr 2016 03:38:58 +0000 (03:38 +0000)]
Use NULL instead of 0 for pointers.

fopen(3) returns NULL in case it can't open the STREAM.
fgetln(3) returns NULL if it can't get a line from a STREAM.
malloc returns NULL if it can't allocate memory.

8 years agoAdd FCCT M500 to the NCQ black list. Linux added it in 4.2 (August
imp [Fri, 15 Apr 2016 03:10:04 +0000 (03:10 +0000)]
Add FCCT M500 to the NCQ black list. Linux added it in 4.2 (August
2015). Correct the M500 firmware versions. EU07 was the engineering
test version, not the release version with the fix. MU07 is the
release version. It's the only Micron firmware version to actually
work. Remove support for EU07.

This brings the blacklist into parity with the Linux blacklist as of
4.5, except for the Micron M500 MU07 entry. I personally tested the
MU07 firmware on 12 machines running 6 drives each with no corruption
in the past 6 months with Netflix production loads. Prior versions of
the M500 firmware wouldn't last more than a few days.

Sponsored by: Netflix, Inc.

8 years agoUse the new TUNABLE_INT64 to match the type of sbintime_t.
imp [Fri, 15 Apr 2016 03:09:58 +0000 (03:09 +0000)]
Use the new TUNABLE_INT64 to match the type of sbintime_t.

8 years agoCreate wrappers for uint64_t and int64_t for the tunables. While not
imp [Fri, 15 Apr 2016 03:09:55 +0000 (03:09 +0000)]
Create wrappers for uint64_t and int64_t for the tunables. While not
strictly necessary, it is more convenient.

8 years agoSet test_argv to NULL, not 0, if not executing a specific test
ngie [Fri, 15 Apr 2016 02:53:52 +0000 (02:53 +0000)]
Set test_argv to NULL, not 0, if not executing a specific test

MFC after: 1 week
Submitted by: pfg
Sponsored by: EMC / Isilon Storage Division

8 years agoFix typos (intenral -> internal) in comments
ngie [Fri, 15 Apr 2016 02:36:14 +0000 (02:36 +0000)]
Fix typos (intenral -> internal) in comments

8 years agohyperv: Deprecate HYPERV option by moving Hyper-V IDT vector into vmbus
sephe [Fri, 15 Apr 2016 02:20:18 +0000 (02:20 +0000)]
hyperv: Deprecate HYPERV option by moving Hyper-V IDT vector into vmbus

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: jhb, kib, sephe
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5910

8 years agoUse NULL instead of 0 for pointers and memory allocation.
araujo [Fri, 15 Apr 2016 02:14:11 +0000 (02:14 +0000)]
Use NULL instead of 0 for pointers and memory allocation.
malloc and realloc will return NULL pointer if it can't alloc memory.

MFC after: 4 weeks

8 years agoAdd fman and dpaa fixups for powerpc fdt
jhibbits [Fri, 15 Apr 2016 01:45:05 +0000 (01:45 +0000)]
Add fman and dpaa fixups for powerpc fdt

Obtained from: Semihalf

8 years agoInitialize pointer with NULL instead of 0.
araujo [Fri, 15 Apr 2016 00:47:30 +0000 (00:47 +0000)]
Initialize pointer with NULL instead of 0.

Submitted by: pfg

8 years agoAdd more debugging statements in vdev_geom.c
asomers [Thu, 14 Apr 2016 23:14:41 +0000 (23:14 +0000)]
Add more debugging statements in vdev_geom.c

Log a debugging message whenever geom functions fail in vdev_geom_attach.
Printing these messages is controlled by vfs.zfs.debug

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

8 years agoAdd External Actions KPI to ipfw(9).
ae [Thu, 14 Apr 2016 22:51:23 +0000 (22:51 +0000)]
Add External Actions KPI to ipfw(9).

It allows implementing loadable kernel modules with new actions and
without needing to modify kernel headers and ipfw(8). The module
registers its action handler and keyword string, that will be used
as action name. Using generic syntax user can add rules with this
action. Also ipfw(8) can be easily modified to extend basic syntax
for external actions, that become a part base system.
Sample modules will coming soon.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoAdd note about CAM I/O scheduler.
imp [Thu, 14 Apr 2016 22:38:13 +0000 (22:38 +0000)]
Add note about CAM I/O scheduler.

8 years agoRegenerate the list of bsd.progs.mk supported variables
ngie [Thu, 14 Apr 2016 22:32:56 +0000 (22:32 +0000)]
Regenerate the list of bsd.progs.mk supported variables

Prefix with dashes (unordered list) and put one variable on each
line (to avoid future conflicts)

Done via the following one-liner:

> sh -c 'for i in $(make -C tests/sys/aio PROG=foo -VPROG_VARS:O); do printf "\t\t- $i\n"; done'

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoCommit documentation change for r298012
ngie [Thu, 14 Apr 2016 22:23:15 +0000 (22:23 +0000)]
Commit documentation change for r298012

Requested by: bdrewery
X-MFC with: r298012
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd DEBUG_FLAGS to PROG_VARS and STRIP to PROG_OVERRIDE_VARS
ngie [Thu, 14 Apr 2016 22:22:03 +0000 (22:22 +0000)]
Add DEBUG_FLAGS to PROG_VARS and STRIP to PROG_OVERRIDE_VARS

This will allow the variables [*] to be overridden on a per-PROG basis,
which is useful when controlling "stripping" behavior for some tests
that require debug symbols or to be unstripped

DEBUG_FLAGS (similar to CFLAGS) supports appending, whereas STRIP is
an override

*: Due to how STRIP is defined in bsd.own.mk (in addition to
bsd.lib.mk and bsd.prog.mk), and the fact that bsd.test.mk pulls in
bsd.own.mk first, overriding STRIP doesn't work today.

A follow up commit is pending to "rectify" this after additional
testing is done.

Discussed with: bdrewery
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd a comment about why the timeout for flush was lowered to 5s.
imp [Thu, 14 Apr 2016 22:13:46 +0000 (22:13 +0000)]
Add a comment about why the timeout for flush was lowered to 5s.

8 years agoAdd in missing files from r298002.
imp [Thu, 14 Apr 2016 22:13:44 +0000 (22:13 +0000)]
Add in missing files from r298002.

8 years agoRegenerate
bdrewery [Thu, 14 Apr 2016 22:10:37 +0000 (22:10 +0000)]
Regenerate

8 years agoUpdate the devd.conf man page to describe the new CAM/periph system/subsystem.
scottl [Thu, 14 Apr 2016 22:03:23 +0000 (22:03 +0000)]
Update the devd.conf man page to describe the new CAM/periph system/subsystem.

MFC after: 3 days
Sponsored by: Netflix

8 years agoAdd more content for WITH_META_MODE/WITH_DIRDEPS_BUILD.
bdrewery [Thu, 14 Apr 2016 22:00:49 +0000 (22:00 +0000)]
Add more content for WITH_META_MODE/WITH_DIRDEPS_BUILD.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE+filemon: Default -DNO_CLEAN enabled.
bdrewery [Thu, 14 Apr 2016 22:00:33 +0000 (22:00 +0000)]
META_MODE+filemon: Default -DNO_CLEAN enabled.

When using meta mode with filemon, the build is reliably incremental
safe.  Bmake will use the meta files, along with filemon information,
to rebuild targets when their dependencies change, commands change,
or files they generate are missing.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove a link to the CTM section of the Handbook, which no longer exists.
wblock [Thu, 14 Apr 2016 21:56:36 +0000 (21:56 +0000)]
Remove a link to the CTM section of the Handbook, which no longer exists.

MFC after: 1 week

8 years agoAdd a devctl/devd notification conduit for CAM errors that happen at the
scottl [Thu, 14 Apr 2016 21:55:42 +0000 (21:55 +0000)]
Add a devctl/devd notification conduit for CAM errors that happen at the
periph level.  When a relevant error is reported to the periph, some
amplifying information is gathered, and the error and information are fed
to devctl with the attributes / keys system=CAM, subsystem=periph.  The
'type' key will be either 'error' or 'timeout', and based on this, various
other keys are also populated.

The purpose of this is to provide a concise mechanism for error reporting
that is less noisy than the system console but higher in resolution and
fidelity than simple sysctl counters.  We will be using it at Netflix to
populate a structured log and database to track errors and error trends
across our world-wide population of drives.

Submitted by: imp, scottl
Approved by: kenm
MFC after: 3 days
Sponsored by: Netflix
Differential Revision: D5943

8 years agoChange the type of 'etlv' field in struct named_object to uint16_t.
ae [Thu, 14 Apr 2016 21:52:31 +0000 (21:52 +0000)]
Change the type of 'etlv' field in struct named_object to uint16_t.
It should match with the type field in struct ipfw_obj_tlv.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoNew CAM I/O scheduler for FreeBSD. The default I/O scheduler is the same
imp [Thu, 14 Apr 2016 21:47:58 +0000 (21:47 +0000)]
New CAM I/O scheduler for FreeBSD. The default I/O scheduler is the same
as before. The common scheduling bits have moved from inline code in
each of the CAM periph drivers into a library that implements the
default scheduling.

In addition, a number of rate-limiting and I/O preference options can
be enabled by adding CAM_IOSCHED_NETFLIX to your config file. A number
of extra stats are also maintained. CAM_IOSCHED_NETFLIX isn't on by
default because it uses a separate BIO_READ and BIO_WRITE queue, so
doesn't honor BIO_ORDERED between these two types of operations. We
already didn't honor it for BIO_DELETE, and we don't depend on
BIO_ORDERED between reads and writes anywhere in the system (it is
currently used with BIO_FLUSH in ZFS to make sure some writes are
complete before others start and as a poor-man's soft dependency in
one place in UFS where we won't be issuing READs until after the
operation completes). However, out of an abundance of caution, it
isn't enabled by default.

Plus, this also brings in NCQ TRIM support for those SSDs that support
it. A black list is also provided for known rogues that use NCQ trim
as an excuse to corrupt the drive. It was difficult to separate out
into a separate commit.

This code has run in production at Netflix for over a year now.

Sponsored by: Netflix, Inc
Differential Revision: https://reviews.freebsd.org/D4609

8 years agoAdjust some comments and make ref_opcode_object() static.
ae [Thu, 14 Apr 2016 21:45:18 +0000 (21:45 +0000)]
Adjust some comments and make ref_opcode_object() static.

8 years agoo Teach opcode rewriting framework handle several rewriters for
ae [Thu, 14 Apr 2016 21:31:16 +0000 (21:31 +0000)]
o Teach opcode rewriting framework handle several rewriters for
  the same opcode.

o Reduce number of times classifier callback is called. It is
  redundant to call it just after find_op_rw(), since the last
  does call it already and can have all results.

o Do immediately opcode rewrite in the ref_opcode_object().
  This eliminates additional classifier lookup later on bulk update.
  For unresolved opcodes the behavior still the same, we save information
  from classifier callback in the obj_idx array, then perform automatic
  objects creation, then perform rewriting for opcodes using indeces
  from created objects.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoClean up trailing whitespace in lib/libcam; no functional change
ngie [Thu, 14 Apr 2016 21:10:53 +0000 (21:10 +0000)]
Clean up trailing whitespace in lib/libcam; no functional change

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Pass along the default sysroot in bootstrap-tools to avoid rebuilds later.
bdrewery [Thu, 14 Apr 2016 21:09:03 +0000 (21:09 +0000)]
META_MODE: Pass along the default sysroot in bootstrap-tools to avoid rebuilds later.

Some of the clang libraries build in this phase and the cross-tools
phase.  Later in the cross-tools phase when they build with a default
TOOLS_PREFIX, they see a changed build command in meta mode due to
the changed DEFAULT_SYSROOT.  This is avoided by passing along
TOOLS_PREFIX earlier.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Don't rebuild build-tools targets during normal build.
bdrewery [Thu, 14 Apr 2016 21:06:10 +0000 (21:06 +0000)]
META_MODE: Don't rebuild build-tools targets during normal build.

This avoids 'build command changed' due to CFLAGS/CC changes during the
normal build.  Without this the build-tools targets end up rebuilding
for the *target* rather than keeping the native versions built in
build-tools.

Sponsored by: EMC / Isilon Storage Division

8 years agoImplement the dependency condition more safely.
bdrewery [Thu, 14 Apr 2016 21:04:49 +0000 (21:04 +0000)]
Implement the dependency condition more safely.

Nested : are not handled well without "".

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r297835: Let the intented default cookie work.
bdrewery [Thu, 14 Apr 2016 21:04:45 +0000 (21:04 +0000)]
Follow-up r297835: Let the intented default cookie work.

This happened to work for not prepending .OBJDIR twice but broke the
other case of prepending it when needed.

Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division

8 years agoRework META_TARGETS so that it automatically adds META_DEPS to the targets.
bdrewery [Thu, 14 Apr 2016 21:04:42 +0000 (21:04 +0000)]
Rework META_TARGETS so that it automatically adds META_DEPS to the targets.

This will only be done if the target is defined, so if the target is
defined after bsd.sys.mk is included then it needs to manually add
${META_DEPS} still.

Sponsored by: EMC / Isilon Storage Division

8 years agoMark some more .PHONY targets.
bdrewery [Thu, 14 Apr 2016 21:04:37 +0000 (21:04 +0000)]
Mark some more .PHONY targets.

Sponsored by: EMC / Isilon Storage Division

8 years agoMove several functions related to opcode rewriting framework from
ae [Thu, 14 Apr 2016 20:49:27 +0000 (20:49 +0000)]
Move several functions related to opcode rewriting framework from
ip_fw_table.c into ip_fw_sockopt.c and make them static.

Obtained from: Yandex LLC

8 years agoExtract virtual port address from RQSTYPE_RPT_ID_ACQ.
mav [Thu, 14 Apr 2016 20:49:01 +0000 (20:49 +0000)]
Extract virtual port address from RQSTYPE_RPT_ID_ACQ.

This should close the race between request arriving on new target mode
virtual port and its scanner thread finally fetch its address for request
routing.

8 years agoAllow the handling of ICMP messages sent in response to SCTP packets
tuexen [Thu, 14 Apr 2016 19:59:21 +0000 (19:59 +0000)]
Allow the handling of ICMP messages sent in response to SCTP packets
containing an INIT chunk. These need to be handled in case the peer
does not support SCTP and returns an ICMP messages indicating destination
unreachable, protocol unreachable.

MFC after: 1 week

8 years agoWhen delivering an ICMP packet to the ctlinput function, ensure that
tuexen [Thu, 14 Apr 2016 19:51:29 +0000 (19:51 +0000)]
When delivering an ICMP packet to the ctlinput function, ensure that
the outer IP header, the ICMP header, the inner IP header and the
first n bytes are stored in contgous memory. The ctlinput functions
currently rely on this for n = 8. This fixes a bug in case the inner IP
header had options.
While there, remove the options from the outer header and provide a
way to increase n to allow improved ICMP handling for SCTP. This will
be added in another commit.

MFC after: 1 week

8 years agoDefine the *soft targets properly.
bdrewery [Thu, 14 Apr 2016 19:29:35 +0000 (19:29 +0000)]
Define the *soft targets properly.

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r284673: /usr/lib32/libc_pic.a is still installed, just not the profiled...
bdrewery [Thu, 14 Apr 2016 19:26:29 +0000 (19:26 +0000)]
Follow-up r284673: /usr/lib32/libc_pic.a is still installed, just not the profiled libs.

Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate a debugging message in vdev_geom_open_by_guids for consistency with
asomers [Thu, 14 Apr 2016 19:20:31 +0000 (19:20 +0000)]
Update a debugging message in vdev_geom_open_by_guids for consistency with
similar messages elsewhere in the file.

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

8 years agoDo not overwrite the dchg variable.
loos [Thu, 14 Apr 2016 18:57:30 +0000 (18:57 +0000)]
Do not overwrite the dchg variable.

It does not cause any real issues because the variable is overwritten
only when the packet is forwarded (and the variable is not used anymore).

Obtained from: pfSense
MFC after: 2 weeks
Sponsored by: Rubicon Communications (Netgate)

8 years agoMake pfctl(8) more flexible when parsing bandwidth values.
loos [Thu, 14 Apr 2016 18:37:40 +0000 (18:37 +0000)]
Make pfctl(8) more flexible when parsing bandwidth values.

This is the current behaviour in OpenBSD and a similar patch exist in
pfSense too.

Obtained from: OpenBSD (partly - rev. 1.625)
MFC after: 2 weeks
Sponsored by: Rubicon Communications (Netgate)

8 years agolibpcap: fix for simple NULL pointer dereference.
pfg [Thu, 14 Apr 2016 18:31:45 +0000 (18:31 +0000)]
libpcap: fix for simple NULL pointer dereference.

Found with devel/coccinelle.

8 years agoSet NULL to the ai_next pointer which fix cap_getaddrinfo().
oshogbo [Thu, 14 Apr 2016 18:27:10 +0000 (18:27 +0000)]
Set NULL to the ai_next pointer which fix cap_getaddrinfo().
Add regression test case.

PR: 195551
Submitted by: Mikhail <mp39590@gmail.com>
Approved by: pjd (mentor)

8 years agoFix output formatting of O_UNREACH6 opcode.
ae [Thu, 14 Apr 2016 18:22:08 +0000 (18:22 +0000)]
Fix output formatting of O_UNREACH6 opcode.

Obtained from: Yandex LLC