]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r300608
arybchik [Sat, 4 Jun 2016 17:11:04 +0000 (17:11 +0000)]
MFC r300608

sfxge(4): bump driver version to the closest out-of-tree version

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300607
arybchik [Sat, 4 Jun 2016 17:08:34 +0000 (17:08 +0000)]
MFC r300607

sfxge(4): cleanup: update copyright to 2016

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301388 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300606
arybchik [Sat, 4 Jun 2016 17:05:20 +0000 (17:05 +0000)]
MFC r300606

sfxge(4): provide option to disable not a local MAC address check

Option EFSYS_OPT_ALLOW_UNCONFIGURED_NIC disables check that the adapter
MAC address is not a local address (beginning 02).

Submitted by:   Laurence Evans <levans at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300605
arybchik [Sat, 4 Jun 2016 17:03:06 +0000 (17:03 +0000)]
MFC r300605

sfxge(4): be ready to receive events immediately after event queues are created

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300505
arybchik [Sat, 4 Jun 2016 17:00:50 +0000 (17:00 +0000)]
MFC r300505

sfxge(4): cleanup: remove unused EFX preempt macros

The EFSYS_PREEMPT_DISABLE() and EFSYS_PREEMPT_ENABLE() macros
were used to ensure correct timing of I2C operations. The APIs
for I2C operations have been removed, so these macros have no
callers.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300135
arybchik [Sat, 4 Jun 2016 16:58:34 +0000 (16:58 +0000)]
MFC r300135

sfxge(4): cleanup: remove trailing whitespaces

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300011
arybchik [Sat, 4 Jun 2016 16:57:38 +0000 (16:57 +0000)]
MFC r300011

sfxge(4): only raise an exception after MC assert or reboot in the common code

Fix efx_mcdi_request_poll so it only raises an exception if EIO is
reported from a detected MC assert or reboot. This prevents
an unnecessary exception being raised if an MCDI response error code
is trandlated to EIO.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301383 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300010
arybchik [Sat, 4 Jun 2016 16:56:36 +0000 (16:56 +0000)]
MFC r300010

sfxge(4): restore clearing of MCDI new epoch flag in common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300009
arybchik [Sat, 4 Jun 2016 16:54:28 +0000 (16:54 +0000)]
MFC r300009

sfxge(4): fix Medford timer quantum calculation in common code

The event/timer block used sysclk in Huntington, but has been
moved to the dpcpu clock domain for Medford. Fix the computed
timer quantum to use the right clock.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301381 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300008
arybchik [Sat, 4 Jun 2016 16:52:04 +0000 (16:52 +0000)]
MFC r300008

sfxge(4): query and use current MTU if setting the MTU fails

This allows the driver to fall back to the largest usable MTU if a
user attempts to configure an unprivileged function with an MTU higher
than that of the attached port.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301380 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300007
arybchik [Sat, 4 Jun 2016 16:49:58 +0000 (16:49 +0000)]
MFC r300007

sfxge(4): store licensing state in efx_lic

Check licensing support at NIC startup to avoid multiple checks later.
As state is stored, licensing initialisation is moved later in start
procedure.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299925
arybchik [Sat, 4 Jun 2016 16:47:39 +0000 (16:47 +0000)]
MFC r299925

sfxge(4): cleanup: quieten more common code MCDI handlers

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301378 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299924
arybchik [Sat, 4 Jun 2016 16:45:36 +0000 (16:45 +0000)]
MFC r299924

sfxge(4): cleanup: remove misnamed function declaration

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301377 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299923
arybchik [Sat, 4 Jun 2016 16:43:26 +0000 (16:43 +0000)]
MFC r299923

sfxge(4): cleanup: make MCDI license queries quieter in common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301376 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299920
arybchik [Sat, 4 Jun 2016 16:42:31 +0000 (16:42 +0000)]
MFC r299920

sfxge(4): cleanup: simplify ef10_ev_qcreate

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301375 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299919
arybchik [Sat, 4 Jun 2016 16:41:31 +0000 (16:41 +0000)]
MFC r299919

sfxge(4): translate MC_CMD_ERR_EEXIST to host errno value

This is needed because the new MCDI command nvram_private_append can
return MC_CMD_ERR_EEXIST

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301374 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299918
arybchik [Sat, 4 Jun 2016 16:39:05 +0000 (16:39 +0000)]
MFC r299918

sfxge(4): cleanup: run genfwdef to propogate prior changes to TLV headers

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301373 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299917
arybchik [Sat, 4 Jun 2016 16:37:14 +0000 (16:37 +0000)]
MFC r299917

sfxge(4): set TSOv2 feature flag on Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301372 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299915
arybchik [Sat, 4 Jun 2016 16:36:23 +0000 (16:36 +0000)]
MFC r299915

sfxge(4): improve TX/RX queue error messages

Report the full error descriptor in a form that can be passed to
firmwaresrc/dpcpu/scripts/evdecode

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299911
arybchik [Sat, 4 Jun 2016 16:35:29 +0000 (16:35 +0000)]
MFC r299911

sfxge(4): fix license validation check for V3 licenses

Length consistency checks were failing for ECC hashes.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301370 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299909
arybchik [Sat, 4 Jun 2016 16:33:54 +0000 (16:33 +0000)]
MFC r299909

sfxge(4): regenerate MCDI headers from firmwaresrc .yml

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301369 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299907
arybchik [Sat, 4 Jun 2016 16:31:56 +0000 (16:31 +0000)]
MFC r299907

sfxge(4): increase maximum size of license keys

Increase buffer sizes for license keys to 160 bytes to accomodate ECDSA
hashes.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301368 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299905
arybchik [Sat, 4 Jun 2016 16:31:04 +0000 (16:31 +0000)]
MFC r299905

sfxge(4): fix V1 licensing MCDI operations

Implementation of the MCDI commands for Siena boards was requesting
the wrong operation.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301366 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299904
arybchik [Sat, 4 Jun 2016 16:28:52 +0000 (16:28 +0000)]
MFC r299904

sfxge(4): improve PCIe link speed and width check

Perform a more accurate check of whether the PCIe bandwidth is
sufficient for the current/supported port modes.

Give a different warning if there is sufficient bandwidth to achieve
line rate, but the link is not fast enough for optimal latency.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299903
arybchik [Sat, 4 Jun 2016 16:26:25 +0000 (16:26 +0000)]
MFC r299903

sfxge(4): cleanup: make TLV scans quieter

Find end of segments in a more direct way that avoids an error report at
the terminator.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301364 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299901
arybchik [Sat, 4 Jun 2016 16:25:18 +0000 (16:25 +0000)]
MFC r299901

sfxge(4): cleanup: make VPD lookups quieter

A lookup on a VPD entry which is missing reports several failure
messages as it propagates through wrapper functions. Restructured
the wrappers to treat this gracefully as an expected case.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301363 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299899
arybchik [Sat, 4 Jun 2016 16:24:14 +0000 (16:24 +0000)]
MFC r299899

sfxge(4): cleanup: make licensing function quieter

Silent handling of failure to invoke functions that are not supported on
older licensing versions.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301362 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299898
arybchik [Sat, 4 Jun 2016 16:22:03 +0000 (16:22 +0000)]
MFC r299898

sfxge(4): restructure efx_lic to support V3 licensing

Create separate implementations of the efx_lic API for each revision of
the licensing system. All processing of the V1/V2 license partition is
moved to efx_lic, and an implementation of V3 licensing uses the existing
TLV functions with extensions for writing new TLV entries.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301361 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299734
arybchik [Sat, 4 Jun 2016 16:19:48 +0000 (16:19 +0000)]
MFC r299734

sfxge(4): remove unused EFX PHY symbols

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301360 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299733
arybchik [Sat, 4 Jun 2016 16:17:41 +0000 (16:17 +0000)]
MFC r299733

sfxge(4): remove obsolete EFX_MON types

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301359 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299732
arybchik [Sat, 4 Jun 2016 16:15:31 +0000 (16:15 +0000)]
MFC r299732

sfxge(4): remove unimplemented sensor reconfigure method

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301358 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299731
arybchik [Sat, 4 Jun 2016 16:13:18 +0000 (16:13 +0000)]
MFC r299731

sfxge(4): remove unimplemented sensor reset method

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301357 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299730
arybchik [Sat, 4 Jun 2016 16:11:16 +0000 (16:11 +0000)]
MFC r299730

sfxge(4): fix build with -Werror=pointer-sign

-Werror=pointer-sign is enabled in OmniOS GLD driver build.

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301356 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299729
arybchik [Sat, 4 Jun 2016 16:08:41 +0000 (16:08 +0000)]
MFC r299729

sfxge(4): remove unimplemented MAC reset method

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301355 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299728
arybchik [Sat, 4 Jun 2016 16:06:19 +0000 (16:06 +0000)]
MFC r299728

sfxge(4): cleanup: remove unused define EFX_EVQ_FALCON_TIMER_QUANTUM_NS

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301354 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299727
arybchik [Sat, 4 Jun 2016 16:04:06 +0000 (16:04 +0000)]
MFC r299727

sfxge(4): cleanup: remove unused variable flags

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301353 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299724
arybchik [Sat, 4 Jun 2016 16:02:03 +0000 (16:02 +0000)]
MFC r299724

sfxge(4): remove unimplemented EFX PHY methods

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301352 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299723
arybchik [Sat, 4 Jun 2016 15:58:02 +0000 (15:58 +0000)]
MFC r299723

sfxge(4): import TLV layout from firmwaresrc

Submitted by:   Laurence Evans <levans at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301351 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299722
arybchik [Sat, 4 Jun 2016 15:57:01 +0000 (15:57 +0000)]
MFC r299722

sfxge(4): remove obsolete EFSYS_OPT_PHY_PROPS option and APIs

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301350 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299721
arybchik [Sat, 4 Jun 2016 15:54:54 +0000 (15:54 +0000)]
MFC r299721

sfxge(4): remove PHY property method stubs

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301349 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299720
arybchik [Sat, 4 Jun 2016 15:52:48 +0000 (15:52 +0000)]
MFC r299720

sfxge(4): move ef10 definitions to ef10_impl.h

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301348 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299719
arybchik [Sat, 4 Jun 2016 15:50:44 +0000 (15:50 +0000)]
MFC r299719

sfxge(4): prepare for moving EF10 definitions to ef10_impl.h

Move legacy privilege masks near to their only user.
Move Huntington definitions to the top of hunt_impl.h to prepare
for moving the remaining EF10 definitions to ef10_impl.h.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301347 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299718
arybchik [Sat, 4 Jun 2016 15:48:40 +0000 (15:48 +0000)]
MFC r299718

sfxge(4): rename falconsiena_filter types

Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301346 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299607-r299612
arybchik [Sat, 4 Jun 2016 15:46:37 +0000 (15:46 +0000)]
MFC r299607-r299612

sfxge(4): rename falconsiena_*

Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301345 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299596-r299606, r299681, r299726, r299738
arybchik [Sat, 4 Jun 2016 15:24:11 +0000 (15:24 +0000)]
MFC r299596-r299606, r299681, r299726, r299738

sfxge(4): move ef10_*() functions to ef10_*.c files

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299595
arybchik [Sat, 4 Jun 2016 15:02:25 +0000 (15:02 +0000)]
MFC r299595

sfxge(4): comment on when we assume multicast chaining is available

It's the same on Medford as Huntington.

Multicast chaining is not always on, even with Medford, as it's not
supported by low latency firmware.

Unlike the Linux driver, we don't need to support virtulization with
firmware released before support for multicast chaining was added.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299594
arybchik [Sat, 4 Jun 2016 15:01:08 +0000 (15:01 +0000)]
MFC r299594

sfxge(4): avoid duplicate delivery of packets when changing multicast
mode with multicast chaining enabled

With multicast chaining, if e.g. a specific multicast filter is
inserted and the multicast mis-match filter is then inserted, both may
match a packet and cause it to be delivered.

Copy the behaviour of the Linux driver, which is to remove the old filters
first, on the basis that customers are more likely to be able to handle
drops than duplicates (see bug49178 comment 4).

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301342 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299518
arybchik [Sat, 4 Jun 2016 14:59:54 +0000 (14:59 +0000)]
MFC r299518

sfxge(4): update multicast filter insertion algorithm

When the multicast filters we're allowed to insert are controlled by the
hypervisor, it may be that we can insert some but not others. So we need
to have fallbacks where we insert any filters we can without rolling back
when one fails to insert.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301341 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299517
arybchik [Sat, 4 Jun 2016 14:58:34 +0000 (14:58 +0000)]
MFC r299517

sfxge(4): cleanup: constify common code method tables

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301340 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299411
arybchik [Sat, 4 Jun 2016 14:57:08 +0000 (14:57 +0000)]
MFC r299411

sfxge(4): update unicast filter insertion algorithm

As unicast filters are not chained, we should always try to insert the
specific filter for our MAC address, and then try to insert the unicast
mis-match filter if that fails or all unicast has been requested.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301338 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299410
arybchik [Sat, 4 Jun 2016 14:55:56 +0000 (14:55 +0000)]
MFC r299410

sfxge(4): fix efx_filter_reconfigure parameter type

This caused signed/unsigned errors in some subsequent patches.
The only value passed to this is a uint32_t.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301337 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299407
arybchik [Sat, 4 Jun 2016 14:52:32 +0000 (14:52 +0000)]
MFC r299407

sfxge(4): make efx_sram_test Siena-only

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301336 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299406
arybchik [Sat, 4 Jun 2016 14:50:42 +0000 (14:50 +0000)]
MFC r299406

sfxge(4): add new Emerald board sensors to common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301334 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299405
arybchik [Sat, 4 Jun 2016 14:48:48 +0000 (14:48 +0000)]
MFC r299405

sfxge(4): simplify efx_mac_select

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301332 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299404
arybchik [Sat, 4 Jun 2016 14:48:00 +0000 (14:48 +0000)]
MFC r299404

sfxge(4): remove Falcon specific EV_GLOBAL support

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301331 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299403
arybchik [Sat, 4 Jun 2016 14:46:40 +0000 (14:46 +0000)]
MFC r299403

sfxge(4): remove Falcon-specific code paths from common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301330 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299344
arybchik [Sat, 4 Jun 2016 14:45:18 +0000 (14:45 +0000)]
MFC r299344

sfxge(4): cleanup: remove unneeded include files

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301329 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299340
arybchik [Sat, 4 Jun 2016 14:44:04 +0000 (14:44 +0000)]
MFC r299340

sfxge(4): cleanup: remove unused efx_infer_family()

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301328 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299339
arybchik [Sat, 4 Jun 2016 14:42:36 +0000 (14:42 +0000)]
MFC r299339

sfxge(4): cleanup: remove obsolete common code module

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301327 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299338, r299345
arybchik [Sat, 4 Jun 2016 14:41:09 +0000 (14:41 +0000)]
MFC r299338, r299345

sfxge(4): cleanup: fix typos

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299337
arybchik [Sat, 4 Jun 2016 14:39:26 +0000 (14:39 +0000)]
MFC r299337

sfxge(4): cleanup efx_check.h comments and error messages

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301325 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299320-r299328, r299330-r299336
arybchik [Sat, 4 Jun 2016 14:37:36 +0000 (14:37 +0000)]
MFC r299320-r299328, r299330-r299336

sfxge(4): remove EFSYS_OPT_FALCON and related EFSYS_OPT_ options

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299402
arybchik [Sat, 4 Jun 2016 14:29:20 +0000 (14:29 +0000)]
MFC r299402

sfxge(4): add TLV format buffer manipulation functions for V3 licensing

The licensing partition for V3 licensing will use the standard TLV format,
so Medford licensing operations on the staging buffer are implemented using
the TLV functions.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301323 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299319
arybchik [Sat, 4 Jun 2016 14:27:59 +0000 (14:27 +0000)]
MFC r299319

sfxge(4): add TLV item manipulation functions to common code

Add creation, deletion and checksumming operations to the private copy of
TLV functions in the common code.  Functions added in preparation for V3
licensing support, as licensing keys are stored in the TLV format.  Missing
support for multiple segment partitions added. Annotations for Windows code
analysis also updated.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301322 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299318
arybchik [Sat, 4 Jun 2016 14:26:40 +0000 (14:26 +0000)]
MFC r299318

sfxge(4): restructure TLV buffer validation

Move TLV buffer validation into ef10-specific function and add accessor
function which also converts the partition ID to the internal
representation.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301321 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299254
arybchik [Sat, 4 Jun 2016 14:23:11 +0000 (14:23 +0000)]
MFC r299254

sfxge(4): remove EFSYS_OPT_PCIE_TUNE

With the removal of Falcon support, this is now dead code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299253
arybchik [Sat, 4 Jun 2016 14:20:45 +0000 (14:20 +0000)]
MFC r299253

sfxge(4): disable common code support for Falcon

This patch ensures that client code will fail to build
with Falcon support. Following patches remove Falcon
support code entirely.

sfxge(4) has never supported Falcon.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301319 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299252
arybchik [Sat, 4 Jun 2016 14:19:00 +0000 (14:19 +0000)]
MFC r299252

sfxge(4): cleanup: fix obsolete EFSYS_OPT_PHY_BIST option

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299251
arybchik [Sat, 4 Jun 2016 14:16:00 +0000 (14:16 +0000)]
MFC r299251

sfxge(4): Siena no longer supports EFSYS_OPT_PCIE_TUNE

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301317 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299250
arybchik [Sat, 4 Jun 2016 14:13:56 +0000 (14:13 +0000)]
MFC r299250

sfxge(4): remove unused efx_nic_pcie_extended_sync()

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301316 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301105
arybchik [Sat, 4 Jun 2016 14:11:32 +0000 (14:11 +0000)]
MFC r301105

sfxge(4): cope with code duplication on SW events composition

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301075
arybchik [Sat, 4 Jun 2016 14:09:39 +0000 (14:09 +0000)]
MFC r301075

sfxge(4): avoid code duplication in SW events definition

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301314 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301067
arybchik [Sat, 4 Jun 2016 14:07:42 +0000 (14:07 +0000)]
MFC r301067

sfxge(4): move definition of the SW events to sfxge.h

Tx flush done event is defined and Rx-specific header is not a good
place for it.

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301313 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301065
arybchik [Sat, 4 Jun 2016 14:06:22 +0000 (14:06 +0000)]
MFC r301065

sfxge(4): zero should be used as RxQ label in SW event

The buggy code was using the rxq index but should use the evq label
associated with the rxq. It was missed in r298735.

Sponsored by:   Solarflare Communications, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301312 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300365:
kib [Sat, 4 Jun 2016 10:19:07 +0000 (10:19 +0000)]
MFC r300365:
Remove zero assignments in the cdev allocator.  cdp memory is
requested with M_ZERO.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301311 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300364:
kib [Sat, 4 Jun 2016 10:16:58 +0000 (10:16 +0000)]
MFC r300364:
Improve handling of rdev->si_mountpt on mount and unmount of FFS
volumes.  Treat the field as a semaphore protecting availability of
the device for mounting.  Do no access devvp->v_rdev without the vnode
lock owned.

Protect change of the devvp->v_bufobj bo_ops vector with the vnode
lock.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301310 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300376:
pfg [Sat, 4 Jun 2016 04:01:28 +0000 (04:01 +0000)]
MFC r300376:
ndis(4): Better mimic the behavior of rand() on Windows.

In ndis(4) we expose a rand() function that was constantly reseeding
with a time depending function every time it was called. This
essentially broke the reasoning behind seeding, and rendered srand()
a no-op.

Keep it simple, just use random() and srandom() as it's meant to work.
It would have been tempting to just go for arc4random() but we
want to mimic Microsoft, and we don't need crypto-grade randomness
here.

PR: 209616

git-svn-id: svn://svn.freebsd.org/base/stable/10@301298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301101:
gjb [Sat, 4 Jun 2016 00:32:26 +0000 (00:32 +0000)]
MFC r301101:
  Turn off nfsv4acls for arm/armv6 builds, which has an impact
  on performance, especially with SD cards on certain SoCs.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@301294 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r294832:
hselasky [Fri, 3 Jun 2016 10:17:19 +0000 (10:17 +0000)]
MFC r294832:
Implement ether_addr_equal(), ether_addr_equal_64bits() and
random_ether_addr() for the LinuxKPI.

Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/10@301264 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300489:
hselasky [Fri, 3 Jun 2016 09:10:37 +0000 (09:10 +0000)]
MFC r300489:
Use DELAY() instead of _sleep() when SCHEDULER_STOPPED() is set inside
pause_sbt(). This allows pause() to continue working during a panic()
which is not invoking KDB. This is useful when debugging graphics
drivers using the LinuxKPI.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301261 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300282:
hselasky [Fri, 3 Jun 2016 09:07:40 +0000 (09:07 +0000)]
MFC r300282:
Verify one sysctl parameter at a time. When a mlx5en sysctl parameter
is updated only verify the changed one instead of all.

No functional change.

Sponsored by: Mellanox Technologies
Tested by: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/10@301260 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300280:
hselasky [Fri, 3 Jun 2016 09:05:49 +0000 (09:05 +0000)]
MFC r300280:
Optimise use of doorbell and remove redundant NOPs

Store the last doorbell write in the mlx5e_sq structure and write the
doorbell to the hardware when the transmit routine finishes
transmitting all queued mbufs.

Sponsored by: Mellanox Technologies
Tested by: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/10@301259 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300277:
hselasky [Fri, 3 Jun 2016 09:03:44 +0000 (09:03 +0000)]
MFC r300277:
Implement TX completion event interleaving.

This patch implements a sysctl which allows setting a factor, N, for
how many work queue elements can be generated before requiring a
completion event. When a completion event happens the code simulates N
completion events instead of only one. When draining a transmit queue,
N-1 NOPs are transmitted at most, to force generation of the final
completion event.  Further a timer is running every HZ ticks to flush
any remaining data off the transmit queue when the tx_completion_fact
> 1.

The goal of this feature is to reduce the PCI bandwidth needed when
transmitting data.

Sponsored by: Mellanox Technologies
Tested by: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/10@301258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301247: MFV r301238:
delphij [Fri, 3 Jun 2016 08:59:21 +0000 (08:59 +0000)]
MFC r301247: MFV r301238:

ntp 4.2.8p8.

Security: CVE-2016-4957, CVE-2016-4953, CVE-2016-4954
Security: CVE-2016-4955, CVE-2016-4956
Security: FreeBSD-SA-16:24.ntp
Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@301256 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300667:
hselasky [Fri, 3 Jun 2016 08:55:28 +0000 (08:55 +0000)]
MFC r300667:
Check for signals when locking the USB enumeration thread from
userspace, so that USB applications can be killed if an enumeration
thread should be stuck for various reasons.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301253 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299060:
hselasky [Fri, 3 Jun 2016 08:49:04 +0000 (08:49 +0000)]
MFC r299060:
Extend the UQ_NO_STRINGS quirk to also cover the USB language string
descriptor. This fixes enumeration of some older Samsung Galaxy S3
phones.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301250 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoFor EILSEQ case in mbsnrtowcs() and wcsnrtombs() update src to point to
ache [Fri, 3 Jun 2016 07:34:59 +0000 (07:34 +0000)]
For EILSEQ case in mbsnrtowcs() and wcsnrtombs() update src to point to
the character after the one this conversion stopped at.

PR:     209907
Submitted by:   Roel Standaert <roel@abittechnical.com> (partially)

git-svn-id: svn://svn.freebsd.org/base/stable/10@301245 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300322, 300340:
pfg [Fri, 3 Jun 2016 03:20:54 +0000 (03:20 +0000)]
MFC r300322, 300340:
ed(1): Cleanups for the DES mode.

- Use arc4random_buf(3).
- Prevent a segmentation fault when ed receives a signal
  while being in getpass(). [1]

Obtained from: OpenBSD [1] (CVS Rev. 1.15)

git-svn-id: svn://svn.freebsd.org/base/stable/10@301233 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300304:
pfg [Fri, 3 Jun 2016 03:12:28 +0000 (03:12 +0000)]
MFC r300304:
gas/config/tc-arm.c: Minor re-sorting to match upstream history.

No functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301232 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r266941, r266955
truckman [Fri, 3 Jun 2016 00:48:50 +0000 (00:48 +0000)]
MFC r266941, r266955

Needed for anticipated dummynet AQM MFC next week.

r266941 | hiren | 2014-06-01 00:28:24 -0700 (Sun, 01 Jun 2014) | 9 lines

ECN marking implenetation for dummynet.
Changes include both DCTCP and RFC 3168 ECN marking methodology.

DCTCP draft: http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-00

Submitted by: Midori Kato (aoimidori27@gmail.com)
Worked with: Lars Eggert (lars@netapp.com)
Reviewed by: luigi, hiren

r266955 | hiren | 2014-06-01 13:19:17 -0700 (Sun, 01 Jun 2014) | 5 lines

DNOLD_IS_ECN introduced by r266941 is not required.
DNOLD_* flags are for compat with old binaries.

Suggested by: luigi

Discussed with: hiren
Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@301231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299121
asomers [Thu, 2 Jun 2016 17:08:08 +0000 (17:08 +0000)]
MFC r299121

mpr(4) and mps(4) shouldn't indefinitely retry for "terminated ioc" errors

Sponsored by: Spectra Logic Corp

git-svn-id: svn://svn.freebsd.org/base/stable/10@301211 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoAdd missing file from r301145
asomers [Thu, 2 Jun 2016 16:40:09 +0000 (16:40 +0000)]
Add missing file from r301145

This is a direct commit to stable/10, because it's fixing a mistake made in
an MFC.  I forgot to commit etc/mtree/BSD.tests.dist.

Pointyhat to: asomers
Sponsored by: Spectra Logic Corp

git-svn-id: svn://svn.freebsd.org/base/stable/10@301209 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300758:
kib [Thu, 2 Jun 2016 02:39:40 +0000 (02:39 +0000)]
MFC r300758:
Prevent parallel object collapses.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301184 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300756:
kib [Thu, 2 Jun 2016 02:36:06 +0000 (02:36 +0000)]
MFC r300756:
Style.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301183 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300705 (compensating for fortune moving from games to usr.bin)
truckman [Wed, 1 Jun 2016 22:39:15 +0000 (22:39 +0000)]
MFC r300705 (compensating for fortune moving from games to usr.bin)

Avoid buffer overflow when copying the input file name and appending .dat.

Check the return value from fread() to be sure that it was successful.

Reported by: Coverity
CID: 10067091009452

git-svn-id: svn://svn.freebsd.org/base/stable/10@301178 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r300169
rmacklem [Wed, 1 Jun 2016 20:30:31 +0000 (20:30 +0000)]
MFC: r300169
If a local (AF_LOCAL, AF_UNIX) socket creation (bind) is attempted
on a fuse mounted file system, it will crash. Although it may be
possible to make this work correctly, this patch avoids the crash
in the meantime.
I removed the MPASS(), since panicing for the FIFO case didn't make
a lot of sense when it returns an error for the others.

git-svn-id: svn://svn.freebsd.org/base/stable/10@301164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300706
truckman [Wed, 1 Jun 2016 17:57:56 +0000 (17:57 +0000)]
MFC r300706

Avoid buffer overflow or truncation when constructing path_zoneinfo_file.

Reported by: Coverity
CID: 1011160

git-svn-id: svn://svn.freebsd.org/base/stable/10@301156 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300692
truckman [Wed, 1 Jun 2016 17:47:34 +0000 (17:47 +0000)]
MFC r300692

Close the input FILE * in read_file() and the output FILE * in write_file()
if read_stream() or write_stream() fails to avoid leaking the FILE.

Reported by: Coverity
CID: 977702
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D6554

git-svn-id: svn://svn.freebsd.org/base/stable/10@301155 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300666
truckman [Wed, 1 Jun 2016 17:45:00 +0000 (17:45 +0000)]
MFC r300666

Call closedir() before returning from fetchListFile() to avoid a leak.

Reported by: Coverity
CID: 1016697

git-svn-id: svn://svn.freebsd.org/base/stable/10@301154 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r300665
truckman [Wed, 1 Jun 2016 17:43:04 +0000 (17:43 +0000)]
MFC r300665

Don't leak addrinfo in fetch_bind()

Submitted by: Coverity
CID: 1225038

git-svn-id: svn://svn.freebsd.org/base/stable/10@301153 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f