]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC r305378,r305379,r305386,r305684,r306224,r306608,r306803,r307650,r307685,
mjg [Sat, 31 Dec 2016 12:32:50 +0000 (12:32 +0000)]
MFC r305378,r305379,r305386,r305684,r306224,r306608,r306803,r307650,r307685,
r308407,r308665,r308667,r309067:

    cache: put all negative entry management code into dedicated functions

==
    cache: manage negative entry list with a dedicated lock

    Since negative entries are managed with a LRU list, a hit requires a
    modificaton.

    Currently the code tries to upgrade the global lock if needed and is
    forced to retry the lookup if it fails.

    Provide a dedicated lock for use when the cache is only shared-locked.

==

    cache: defer freeing entries until after the global lock is dropped

    This also defers vdrop for held vnodes.

==

    cache: improve scalability by introducing bucket locks

    An array of bucket locks is added.

    All modifications still require the global cache_lock to be held for
    writing. However, most readers only need the relevant bucket lock and in
    effect can run concurrently to the writer as long as they use a
    different lock. See the added comment for more details.

    This is an intermediate step towards removal of the global lock.

==

    cache: get rid of the global lock

    Add a table of vnode locks and use them along with bucketlocks to provide
    concurrent modification support. The approach taken is to preserve the
    current behaviour of the namecache and just lock all relevant parts before
    any changes are made.

    Lookups still require the relevant bucket to be locked.

==

    cache: ignore purgevfs requests for filesystems with few vnodes

    purgevfs is purely optional and induces lock contention in workloads
    which frequently mount and unmount filesystems.

    In particular, poudriere will do this for filesystems with 4 vnodes or
    less. Full cache scan is clearly wasteful.

    Since there is no explicit counter for namecache entries, the number of
    vnodes used by the target fs is checked.

    The default limit is the number of bucket locks.

== (by kib)

    Limit scope of the optimization in r306608 to dounmount() caller only.
    Other uses of cache_purgevfs() do rely on the cache purge for correct
    operations, when paths are invalidated without unmount.

==

    cache: split negative entry LRU into multiple lists

    This splits the ncneg_mtx lock while preserving the hit ratio at least
    during buildworld.

    Create N dedicated lists for new negative entries.

    Entries with at least one hit get promoted to the hot list, where they
    get requeued every M hits.

    Shrinking demotes one hot entry and performs a round-robin shrinking of
    regular lists.

==

    cache: fix up a corner case in r307650

    If no negative entry is found on the last list, the ncp pointer will be
    left uninitialized and a non-null value will make the function assume an
    entry was found.

    Fix the problem by initializing to NULL on entry.

== (by kib)

    vn_fullpath1() checked VV_ROOT and then unreferenced
    vp->v_mount->mnt_vnodecovered unlocked.  This allowed unmount to race.
    Lock vnode after we noticed the VV_ROOT flag.  See comments for
    explanation why unlocked check for the flag is considered safe.

==

    cache: fix a race between entry removal and demotion

    The negative list shrinker can demote an entry with only hotlist + neglist
    locks held. On the other hand entry removal possibly sets the NCF_DVDROP
    without aformentioned locks held prior to detaching it from the respective
    netlist., which can lose the update made by the shrinker.

==

    cache: plug a write-only variable in cache_negative_zap_one

==

    cache: ensure that the number of bucket locks does not exceed hash size

    The size can be changed by side effect of modifying kern.maxvnodes.

    Since numbucketlocks was not modified, setting a sufficiently low value
    would give more locks than actual buckets, which would then lead to
    corruption.

    Force the number of buckets to be not smaller.

    Note this should not matter for real world cases.

7 years agoMFC r309893,r309929:
mjg [Sat, 31 Dec 2016 12:06:27 +0000 (12:06 +0000)]
MFC r309893,r309929:

    vfs: add vrefact, to be used when the vnode has to be already active

    This allows blind increment of relevant counters which under contention
    is cheaper than inc-not-zero loops at least on amd64.

    Use it in some of the places which are guaranteed to see already active
    vnodes.

==

    vfs: use vrefact in getcwd and fchdir

7 years agoMFC r310742
arybchik [Sat, 31 Dec 2016 11:30:18 +0000 (11:30 +0000)]
MFC r310742

sfxge(4): fix common code for non-Siena builds

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

7 years agoMFC r310741
arybchik [Sat, 31 Dec 2016 11:28:47 +0000 (11:28 +0000)]
MFC r310741

sfxge(4): fix misuse of siena_build_filter in common code

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

7 years agoMFC r310719
arybchik [Sat, 31 Dec 2016 11:27:58 +0000 (11:27 +0000)]
MFC r310719

sfxge(4): cleanup: remove last use of deprecated function flags with privilege check

The function flags were changed to mirror the privileges, but
the privileges are preferred.

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

7 years agoMFC r310717
arybchik [Sat, 31 Dec 2016 11:26:29 +0000 (11:26 +0000)]
MFC r310717

sfxge(4): move BIST methods from hunt_phy.c to ef10_phy.c

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

7 years agoMFC r310716
arybchik [Sat, 31 Dec 2016 11:24:59 +0000 (11:24 +0000)]
MFC r310716

sfxge(4): add UEFI ROM support to the common code

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

7 years agoMFC r310715
arybchik [Sat, 31 Dec 2016 11:23:43 +0000 (11:23 +0000)]
MFC r310715

sfxge(4): fix GET_RXDP_CONFIG usage for multi-PF on Medford

On Medford, using MC_CMD_GET_RXDP_CONFIG to query the RX end
padding setting is in the ADMIN group, and so fails for
unprivileged functions. In that case, assume the largest size
supported by Medford hardware (256bytes) to prevent overrun.

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

7 years agoMFC r310714
arybchik [Sat, 31 Dec 2016 11:23:03 +0000 (11:23 +0000)]
MFC r310714

sfxge(4): support Medford bootcfg partition layout in common code

For Siena and Huntington, the per-port bootcfg (aka expcfg) is
stored in a dedicated 4Kbyte partition for each port.

For Medford, the per-PF bootcfg is stored in a 2Kbyte sector
within a single shared partition. Update the common code to support
the new bootcfg layout.

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

7 years agoMFC r310713
arybchik [Sat, 31 Dec 2016 11:21:49 +0000 (11:21 +0000)]
MFC r310713

sfxge(4): add possibility to control event queue performance profile

It is ignored on SFN5xxx/6xxx (aka Siena).

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310709
arybchik [Sat, 31 Dec 2016 11:19:40 +0000 (11:19 +0000)]
MFC r310709

sfxge(4): fix invalid type of eft_unicst_filter_count

Found by clang when boolean_t is defined as bool for DPDK PMD.

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310708
arybchik [Sat, 31 Dec 2016 11:18:22 +0000 (11:18 +0000)]
MFC r310708

sfxge(4): do not initialize enumerated type variable to another type

Fix build warning generated by ICC.

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310704
arybchik [Sat, 31 Dec 2016 11:17:43 +0000 (11:17 +0000)]
MFC r310704

sfxge(4): translate MC_CMD_ERR_ERANGE to host errno value

This is needed because MCDI command MC_CMD_REKEY can return
MC_CMD_ERR_ERANGE.

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

7 years agoMFC r310699
arybchik [Sat, 31 Dec 2016 11:16:35 +0000 (11:16 +0000)]
MFC r310699

sfxge(4): rename hunt_bist_* methods to ef10_bist_*

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

7 years agoMFC r310696
arybchik [Sat, 31 Dec 2016 11:15:25 +0000 (11:15 +0000)]
MFC r310696

sfxge(4): cleanup: improve prefast annotations

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

7 years agoMFC r310695
arybchik [Sat, 31 Dec 2016 11:14:03 +0000 (11:14 +0000)]
MFC r310695

sfxge(4): fix defined-but-not-used warning if neither VPD nor NVRAM opt
enabled

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310694
arybchik [Sat, 31 Dec 2016 11:13:23 +0000 (11:13 +0000)]
MFC r310694

sfxge(4): cleanup: add missing spaces

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310693
arybchik [Sat, 31 Dec 2016 11:12:26 +0000 (11:12 +0000)]
MFC r310693

sfxge(4): cleanup: avoid unspecified unsigned

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310692
arybchik [Sat, 31 Dec 2016 11:11:04 +0000 (11:11 +0000)]
MFC r310692

sfxge(4): enclose macro complex value in parenthesis

Found by DPDK checkpatches.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310691
arybchik [Sat, 31 Dec 2016 11:10:01 +0000 (11:10 +0000)]
MFC r310691

sfxge(4): make strings array pointer itself immutable

Found by DPDK checkpatches.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310690
arybchik [Sat, 31 Dec 2016 11:09:01 +0000 (11:09 +0000)]
MFC r310690

sfxge(4): cleanup: add const qualifier to const array pointer

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310689
arybchik [Sat, 31 Dec 2016 11:07:44 +0000 (11:07 +0000)]
MFC r310689

sfxge(4): cleanup: avoid spaces before TAB

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310688
arybchik [Sat, 31 Dec 2016 11:06:19 +0000 (11:06 +0000)]
MFC r310688

sfxge(4): cleanup: avoid space just before TAB in efx_types.h

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310687
arybchik [Sat, 31 Dec 2016 11:05:04 +0000 (11:05 +0000)]
MFC r310687

sfxge(4): cleanup: use TAB to indent

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310686
arybchik [Sat, 31 Dec 2016 11:03:54 +0000 (11:03 +0000)]
MFC r310686

sfxge(4): cleanup: add missing space between type and pointer symbol

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310685
arybchik [Sat, 31 Dec 2016 11:02:33 +0000 (11:02 +0000)]
MFC r310685

sfxge(4): cleanup: open brace should be on a type name line

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310681
arybchik [Sat, 31 Dec 2016 11:01:11 +0000 (11:01 +0000)]
MFC r310681

sfxge(4): cleanup: remove unnecessary spaces

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310684
arybchik [Sat, 31 Dec 2016 11:00:35 +0000 (11:00 +0000)]
MFC r310684

sfxge(4): cleanup: remove trailing whitespaces

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310683
arybchik [Sat, 31 Dec 2016 10:59:22 +0000 (10:59 +0000)]
MFC r310683

sfxge(4): cleanup: pointer symbol should go together with struct member name

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310682
arybchik [Sat, 31 Dec 2016 10:57:24 +0000 (10:57 +0000)]
MFC r310682

sfxge(4): cleanup: avoid C99 // comments

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310668:
ngie [Sat, 31 Dec 2016 10:41:51 +0000 (10:41 +0000)]
MFC r310668:

style(9) fixes: clean up leading whitespace

7 years agoMFC r310500,r310660:
ngie [Sat, 31 Dec 2016 10:40:02 +0000 (10:40 +0000)]
MFC r310500,r310660:

r310500:

Minor style(9) fixes

- Trailing whitespace cleanup
- Sort variables in snmp_dialog(..) by alignment

No functional change

r310660:

style(9): fix whitespace in pdu_encode_secparams(..)

7 years agoMFC r310667:
ngie [Sat, 31 Dec 2016 10:37:39 +0000 (10:37 +0000)]
MFC r310667:

style(9) fixes: clean up leading whitespace

7 years agoMFC r310662,r310663:
ngie [Sat, 31 Dec 2016 10:36:07 +0000 (10:36 +0000)]
MFC r310662,r310663:

r310662:

style(9): snmp_send_packet(..): fix whitespace

r310663:

style(9): ip_get(..): clean up whitespace

7 years agoMFC r310669:
ngie [Sat, 31 Dec 2016 10:34:04 +0000 (10:34 +0000)]
MFC r310669:

style(9): clean up whitespace

7 years agoMFC r310648:
ngie [Sat, 31 Dec 2016 10:32:49 +0000 (10:32 +0000)]
MFC r310648:

style(9): clean up trailing whitespace

7 years agoMFC r310666,r310675:
ngie [Sat, 31 Dec 2016 10:28:59 +0000 (10:28 +0000)]
MFC r310666,r310675:

r310666:

style(9) fixes

- Clean up trailing whitespace
- Fix variable type alignment in storage_OS_get_swap(..)

r310675:

Fix the build by moving the initializers for len/nswapdev down below the
declarations

Pointyhat to: ngie

7 years agoMFC r310662:
ngie [Sat, 31 Dec 2016 10:27:10 +0000 (10:27 +0000)]
MFC r310662:

style(9): snmp_send_packet(..): fix whitespace

7 years agoMFC r310728:
ngie [Sat, 31 Dec 2016 10:25:55 +0000 (10:25 +0000)]
MFC r310728:

Install {asn1,bsnmpagent,bsnmpclient,bsnmplib}.3 as all of the APIs
they document

Also, alphabetically sort MAN

7 years agoMFC r310654:
ngie [Sat, 31 Dec 2016 10:23:52 +0000 (10:23 +0000)]
MFC r310654:

Install snmpmod.3 as all of the bsnmpd APIs it documents

7 years agoMFC r310642:
tuexen [Sat, 31 Dec 2016 10:08:44 +0000 (10:08 +0000)]
MFC r310642:

Consistent handling of errors reported from the lower layer.

7 years agoMFC r310000:
loos [Sat, 31 Dec 2016 02:02:42 +0000 (02:02 +0000)]
MFC r310000:

Remove a too strict test and instead, just filter the passed flags with the
supported capabilities.

Spotted by: yamori813@yahoo.co.jp (Hiroki Mori)

7 years agoMFC r309717:
loos [Sat, 31 Dec 2016 02:00:51 +0000 (02:00 +0000)]
MFC r309717:

Fix the typos and style(9) in comment.

7 years agoMFC r309461:
loos [Sat, 31 Dec 2016 01:58:04 +0000 (01:58 +0000)]
MFC r309461:

Allow simultaneous access to switch device, there is no reason to prevent
it.

Remove bogus wrappers and use the kernel defaults.

While here, use DEVMETHOD_END.

Obtained from: pfSense
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMFC r309345:
loos [Sat, 31 Dec 2016 01:54:48 +0000 (01:54 +0000)]
MFC r309345:

The RX_FREEBUFFER registers are a write to increment field.
Writing the full queue size to it every time was makeing it overflow with a
lot of bogus values.

This fixes the interrupt storms on irq 40.

MFC r309347:

MDIO_PHYACCESS_ACK is only valid for read access, remove it from
miibus_writereg.

Reduce the DELAY() between reads while waiting for MII access.

Spotted by: yongari

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMFC r309113:
loos [Sat, 31 Dec 2016 01:51:41 +0000 (01:51 +0000)]
MFC r309113:

Add the etherswitch(4) support for TI CPSW.
Adds VLAN and port management abilities for etherswitchcfg(8).

The code is conditionally enabled for now, because it is not necessary on
single ethernet use cases.

Obtained from: pfSense
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMFC r310455:
ngie [Sat, 31 Dec 2016 00:00:12 +0000 (00:00 +0000)]
MFC r310455:

Clarify failure in snmp_output(..) with call to snmp_pdu_decode

- Explicitly test snmp_pdu_encode against SNMP_CODE_OK instead of assuming
  any non-zero value is bad.
- Print out the code before calling abort() to give the end-user something
  actionable to debug without having to recompile the binary, since the
  core might not have these details.

7 years agoMFC r310458,r310466:
ngie [Fri, 30 Dec 2016 23:52:19 +0000 (23:52 +0000)]
MFC r310458,r310466:

r310458:

Group all loadable modules in the %default section

This will allow new users to uncomment the modules and have things work
with less head scratching, in the event they decide to uncomment any
of the section separators, e.g. %usm or %vcm, as the module loading is
only effective in the %default section.

r310466:

Don't hardcode $(securityModelUSM) (3) in the authPriv example under the %vacm
section

7 years agoMFC r308692:
loos [Fri, 30 Dec 2016 20:48:22 +0000 (20:48 +0000)]
MFC r308692:

Fix ti_gpio_detach() to avoid crashing if something goes wrong.

Sponsored by: Rubicon Communication, LLC (Netgate)

7 years agoMFC r308659:
loos [Fri, 30 Dec 2016 20:45:27 +0000 (20:45 +0000)]
MFC r308659:

Reduce dmesg verbosity.

7 years agoMFC r306717:
loos [Fri, 30 Dec 2016 20:43:00 +0000 (20:43 +0000)]
MFC r306717:

if_cpsw overhaul:
- Fix RX and TX teardown:
  . TX teardown would not reclaim the abandoned descriptors;
  . Interrupt storms in RX teardown;
  . Fixed the acknowledge of the teardown completion interrupt.

- Remove temporary lists for the descriptors;

- Simplified the descriptor handling (less writes and reads from
  descriptors where possible);

- Better debug;

- Add support for the RX threshold interrupts:
  With interrupt moderation only, an RX overrun is likely to happen.  The
  RX threshold is set to trigger a non paced interrupt everytime your RX
  free buffers are under the minimum threshold, helping to prevent the rx
  overrun.

The NIC now survive when pushed over its limits (where previously it would
lock up in a few seconds).

uFW (600MHz SoC) can now forward up to 560Mb/s of UDP traffic (netmap
pkt-gen as source and sink).  TCP forwarding rate is over 350Mb/s.

No difference (other than CPU use) was seen on Beaglebone black (1GHz SoC)
for his fast ethernet.

Tested on: uFW, BBB
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMFC r306654:
loos [Fri, 30 Dec 2016 20:40:25 +0000 (20:40 +0000)]
MFC r306654:

Enable the TX completion interrupt for the cpsw NIC to assure the free tx
descriptors are reclaimed as soon as possible.

Without this the free buffers are reclaimed only on watchdog runs or after
trying to enqueue more packets.

Sponsored by: Rubicon Communications, LLC (Netgte)

7 years agoMFC of r306388, r306510, r306511 and r306513:
loos [Fri, 30 Dec 2016 20:38:34 +0000 (20:38 +0000)]
MFC of r306388, r306510, r306511 and r306513:

Fix a typo.

Sort and remove unnecessary includes.

Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls
with CPSW_DEBUG().

Remove the GLOBAL queue lock which just adds unnecessary complexity to code
(when used together with the individual tx and rx locks).

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMFC r306376:
loos [Fri, 30 Dec 2016 20:33:54 +0000 (20:33 +0000)]
MFC r306376:

Add a sysctl to control the interrupt pacing on AM335x integrated switch.
The hardware can be set to limit the number of interrupts from 2 to 63
interrupts per ms.

To keep the compatibility with the TI documentation the sysctl take the
interval between the interrupts pulses: 16~500 us.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMFC of r305114, r305115 and r305149:
loos [Fri, 30 Dec 2016 20:28:07 +0000 (20:28 +0000)]
MFC of r305114, r305115 and r305149:

Allow the use of control module extensions to cope with specific platform
features.

Add a driver for the AM335x bandgap sensor, an on-die temperature sensor
as part of the AM335x control module extension.

TI says that the bandgap sensor is not very accurate on AM335x, but in our
tests it seems to be a good reference for the SoC temperature.

TI details:
http://processors.wiki.ti.com/index.php/AM335x_Thermal_Considerations#Measuring_Case_Temperature

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMFC of r305112, r305113, r305119, r305141 and r305432:
loos [Fri, 30 Dec 2016 20:18:50 +0000 (20:18 +0000)]
MFC of r305112, r305113, r305119, r305141 and r305432:

Replace magic numbers with the proper register names.

Fix the build, revert r305119, move the control module register data to
am335x_scm.h and fix if_cpsw.c to include the correct header.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMFC of r303230, r303253 and r303420:
loos [Fri, 30 Dec 2016 19:55:04 +0000 (19:55 +0000)]
MFC of r303230, r303253 and r303420:

Add support for the Microchip/Micrel KSZ9031 Gigabit Ethernet PHY.

Enable the build of micphy as part of generic miibus build, but only for
FDT enabled systems.

The Micrel PHYs reads the optional external delays from DTB.

Tested on uBMC and uFW.

Sponsored by: Rubicon Communications (Netgate)

7 years agoMFC r303227
loos [Fri, 30 Dec 2016 19:43:23 +0000 (19:43 +0000)]
MFC r303227

Remove unused USB ethernet driver from BEAGLEBONE/AM335x kernel.

7 years agoMFC r310680
arybchik [Fri, 30 Dec 2016 18:01:04 +0000 (18:01 +0000)]
MFC r310680

sfxge(4): cleanup: use spaces around binary arithmetic operations

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310679
arybchik [Fri, 30 Dec 2016 17:50:02 +0000 (17:50 +0000)]
MFC r310679

sfxge(4): cleanup: fix wrong indent

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310678
arybchik [Fri, 30 Dec 2016 17:43:47 +0000 (17:43 +0000)]
MFC r310678

sfxge(4): cleanup: remove trailing whitespace

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310677
arybchik [Fri, 30 Dec 2016 17:36:08 +0000 (17:36 +0000)]
MFC r310677

sfxge(4): cleanup: fix typo in siena_mac_loopback_set() instrumentation

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r310627
arybchik [Fri, 30 Dec 2016 17:26:19 +0000 (17:26 +0000)]
MFC r310627

sfxge(4): do not limit driver RSS table to RSS channels max

Specification of entire RSS table in the driver allows to spread traffic
more equally across CPUs/RSS channels if number of RSS channels is not
power of 2.

Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r306264: Use 32-bit value for .text padding, for linker portability
emaste [Fri, 30 Dec 2016 16:23:13 +0000 (16:23 +0000)]
MFC r306264: Use 32-bit value for .text padding, for linker portability

GNU ld interprets the padding value as a variable-length byte string,
while GNU gold and LLVM lld interpret it as a 32-bit value.

7 years agoMFC r305994: Catch up to sys/capability.h rename to sys/capsicum.h in r263232
emaste [Fri, 30 Dec 2016 16:22:24 +0000 (16:22 +0000)]
MFC r305994: Catch up to sys/capability.h rename to sys/capsicum.h in r263232

Also include r305995, reverting an unintended change from r305994.

7 years agoMFC r305854: Use arch-specific .text padding fill value in EFI loaders
emaste [Fri, 30 Dec 2016 16:19:19 +0000 (16:19 +0000)]
MFC r305854: Use arch-specific .text padding fill value in EFI loaders

The fill pattern was previously an ia64 instruction sequence. Presumably
ia64's linker script was copied as a starting point.

7 years agoMFC r309191 (by rakuco):
dim [Fri, 30 Dec 2016 09:38:45 +0000 (09:38 +0000)]
MFC r309191 (by rakuco):

fdt: Expect strchr() to return a const char*

In C, strchr(3) returns a char*, whereas C++ defines two overloads:
* const char *strchr(const char*, int)
* char *strchr(char*, int)

Building fdt.cc (with the WITHOUT_GPL_DTC knob set) with libc++ 3.9.0 (imported
in r309124) was failing because libc++ r260377 added the first overload to
string.h, leading to failures such as:

    fdt.cc:1638:8: error: cannot initialize a variable of type 'char *' with an
    rvalue of type 'const char *'

Just define val as a const char* to fix it.

Upstreamed in https://github.com/davidchisnall/dtc/pull/14

7 years agoMFC: 310175
gnn [Fri, 30 Dec 2016 01:24:08 +0000 (01:24 +0000)]
MFC: 310175

Remove extra DOF_SEC_XLIMPORT from the DOF_SEC_ISLOADABLE macro

Sponsored by: DARPA, AFRL

7 years agoMFC r309657:
markj [Thu, 29 Dec 2016 21:06:31 +0000 (21:06 +0000)]
MFC r309657:
Require the STACK option for code that captures stacks of running threads.

7 years agoMFC r309657:
markj [Thu, 29 Dec 2016 21:03:00 +0000 (21:03 +0000)]
MFC r309657:
Require the STACK option for code that captures stacks of running threads.

7 years agoMFC r310590:
tuexen [Thu, 29 Dec 2016 11:32:42 +0000 (11:32 +0000)]
MFC r310590:

Whitespace changes.

The toolchain for processing the sources has been updated. No functional
change.

7 years agoMFC r310547:
tuexen [Thu, 29 Dec 2016 11:25:41 +0000 (11:25 +0000)]
MFC r310547:

Remove a KASSERT which is not always true.

In case of the empty queue tp->snd_holes and tcp_sackhole_insert()
failing due to memory shortage, tp->snd_holes will be empty.
This problem was hit when stress tests where performed by pho.

PR: 215513
Reported by: pho
Tested by: pho
Sponsored by: Netflix, Inc.

7 years agoMFC r309257:
ae [Thu, 29 Dec 2016 09:50:37 +0000 (09:50 +0000)]
MFC r309257:
  Rework ip_tryforward() to use FIB4 KPI.

7 years agoMFC r310574:
ngie [Thu, 29 Dec 2016 00:25:38 +0000 (00:25 +0000)]
MFC r310574:

Fix style(9)

- Sort #includes
- Delete trailing whitespace

No functional change

7 years agoMFC r310592:
ngie [Thu, 29 Dec 2016 00:24:16 +0000 (00:24 +0000)]
MFC r310592:

style(9): fix trailing whitespace

7 years agoFix EFI self relocation code for rela architectures
emaste [Wed, 28 Dec 2016 21:58:20 +0000 (21:58 +0000)]
Fix EFI self relocation code for rela architectures

MFC r306812 (andrew):

The bootloader self relocation code was slightly wrong for the
R_AARCH64_RELATIVE relocation found on arm64. It would try to add the
contents of the memory location being relocated to the base address and
the relocation addend. This worked when the contents was zero, however
this now seems to be set to the value of the addend so we add this twice.
Fix this by just setting the memory to the computed value.

MFC r309360: EFI loaders: parse rela relocations on amd64

Prior to this change the loader self relocation code interpreted amd64's
rela relocations as if they were rel relocations, discarding the addend.
This "works" because GNU ld 2.17.50 stores the addend value in both the
r_addend field of the relocation (as expected) and at the target of the
relocation.

Other linkers, and possibly other versions of GNU ld, won't have this
behaviour, so interpret the relocations correctly.

7 years agoMFC r310274: Add ld.debug to ObsoleteFiles.inc
emaste [Wed, 28 Dec 2016 21:45:41 +0000 (21:45 +0000)]
MFC r310274: Add ld.debug to ObsoleteFiles.inc

After r293285 GNU ld is installed as /usr/bin/ld.bfd, and linked as
/usr/bin/ld.  The debug file is /usr/lib/debug/usr/bin/ld.bfd.debug.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r310499:
ngie [Wed, 28 Dec 2016 06:16:19 +0000 (06:16 +0000)]
MFC r310499:

Sort #includes

No functional change

7 years agoMFC r310503:
ngie [Wed, 28 Dec 2016 06:14:50 +0000 (06:14 +0000)]
MFC r310503:

style(9): delete stray trailing whitespace after break statement

7 years agoMFC r304957, r304958, r306310 (by bde):
kib [Wed, 28 Dec 2016 04:48:30 +0000 (04:48 +0000)]
MFC r304957, r304958,  r306310 (by bde):
Fix vm86 initialization.

MFC r310050:
Improve very early trap handling on amd64.

7 years agoMFC 309581,309582,310424: Document T6 support.
jhb [Tue, 27 Dec 2016 20:06:26 +0000 (20:06 +0000)]
MFC 309581,309582,310424: Document T6 support.

309581:
Document support for Terminator 6 adapters in cxgbe(4) and cxgbev(4).

309582:
Bump Dd for addition of T6.

310424:
Replace passive voice with active voice and other tweaks.

- Drop uses of 'will'.
- Replace 'to use' with active voice.
- Tidy language around interrupt types and clarify that INTx doesn't
  work on VFs.
- Drop leading articles from sysctl/tunable descriptions.
- Tweak the wording of several sysctl/tunable descriptions.

7 years agoMFC r308528: smbmsg: use a more convenient way of accessing data read
avg [Tue, 27 Dec 2016 10:26:58 +0000 (10:26 +0000)]
MFC r308528: smbmsg: use a more convenient way of accessing data read
from a slave

7 years agoMFH: r309407
julian [Tue, 27 Dec 2016 08:32:54 +0000 (08:32 +0000)]
MFH: r309407

A little light wordsmithing only.

Sponsored by: FreeBSD

7 years agoMFH: r309408
julian [Tue, 27 Dec 2016 08:31:40 +0000 (08:31 +0000)]
MFH: r309408

Changes to allow the patching of packets with an offset (and other changes.. see man page)

PR: 206185
Submitted by: Dmitry Vagin <daemon-hammer@ya.ru>
MFC after:  1 week
Relnotes: yes (also ng_checksum node)

7 years agoMFC r309124:
dim [Mon, 26 Dec 2016 20:36:37 +0000 (20:36 +0000)]
MFC r309124:

Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0
release, and add lld 3.9.0.  Also completely revamp the build system for
clang, llvm, lldb and their related tools.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm, clang and lld are available here:
<http://llvm.org/releases/3.9.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.9.0/tools/clang/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.9.0/tools/lld/docs/ReleaseNotes.html>

Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan
Beich for their help.

Relnotes: yes

MFC r309147:

Pull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek):

  [PPC] Set SP after loading data from stack frame, if no red zone is
  present

  Follow-up to r280705: Make sure that the SP is only restored after
  all data is loaded from the stack frame, if there is no red zone.

  This completes the fix for
  https://llvm.org/bugs/show_bug.cgi?id=26519.

  Differential Revision: https://reviews.llvm.org/D24466

Reported by:    Mark Millard
PR:             214433

MFC r309149:

Pull in r283060 from upstream llvm trunk (by Hal Finkel):

  [PowerPC] Refactor soft-float support, and enable PPC64 soft float

  This change enables soft-float for PowerPC64, and also makes
  soft-float disable all vector instruction sets for both 32-bit and
  64-bit modes. This latter part is necessary because the PPC backend
  canonicalizes many Altivec vector types to floating-point types, and
  so soft-float breaks scalarization support for many operations. Both
  for embedded targets and for operating-system kernels desiring
  soft-float support, it seems reasonable that disabling hardware
  floating-point also disables vector instructions (embedded targets
  without hardware floating point support are unlikely to have Altivec,
  etc. and operating system kernels desiring not to use floating-point
  registers to lower syscall cost are unlikely to want to use vector
  registers either). If someone needs this to work, we'll need to
  change the fact that we promote many Altivec operations to act on
  v4f32. To make it possible to disable Altivec when soft-float is
  enabled, hardware floating-point support needs to be expressed as a
  positive feature, like the others, and not a negative feature,
  because target features cannot have dependencies on the disabling of
  some other feature. So +soft-float has now become -hard-float.

  Fixes PR26970.

Pull in r283061 from upstream clang trunk (by Hal Finkel):

  [PowerPC] Enable soft-float for PPC64, and +soft-float -> -hard-float

  Enable soft-float support on PPC64, as the backend now supports it.
  Also, the backend now uses -hard-float instead of +soft-float, so set
  the target features accordingly.

  Fixes PR26970.

Reported by: Mark Millard
PR: 214433

MFC r309212:

Add a few missed clang 3.9.0 files to OptionalObsoleteFiles.

MFC r309262:

Fix packaging for clang, lldb and lld 3.9.0

During the upgrade of clang/llvm etc to 3.9.0 in r309124, the PACKAGE
directive in the usr.bin/clang/*.mk files got dropped accidentally.

Restore it, with a few minor changes and additions:
* Correct license in clang.ucl to NCSA
* Add PACKAGE=clang for clang and most of the "ll" tools
* Put lldb in its own package
* Put lld in its own package

Reviewed by: gjb, jmallett
Differential Revision: https://reviews.freebsd.org/D8666

MFC r309656:

During the bootstrap phase, when building the minimal llvm library on
PowerPC, add lib/Support/Atomic.cpp.  This is needed because upstream
llvm revision r271821 disabled the use of std::call_once, which causes
some fallback functions from Atomic.cpp to be used instead.

Reported by: Mark Millard
PR: 214902

MFC r309835:

Tentatively apply https://reviews.llvm.org/D18730 to work around gcc PR
70528 (bogus error: constructor required before non-static data member).
This should fix buildworld with the external gcc package.

Reported by: https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/

MFC r310194:

Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
3.9.1 release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm, clang and lld will be available here:
<http://releases.llvm.org/3.9.1/docs/ReleaseNotes.html>
<http://releases.llvm.org/3.9.1/tools/clang/docs/ReleaseNotes.html>
<http://releases.llvm.org/3.9.1/tools/lld/docs/ReleaseNotes.html>

Relnotes: yes

7 years agoMFC r310367:
pfg [Mon, 26 Dec 2016 16:42:38 +0000 (16:42 +0000)]
MFC r310367:
pax(1): Fix a bug with archives smaller than 512 bytes.

The problem here is that the archive is too short (< 512 bytes). The
buffer routines, try to read at least 512 bytes, even when we try to
determine what format file we have, which is wrong.

Obtained from: NetBSD (CVS rev 1.26)

7 years agoMFC r309873:
pfg [Mon, 26 Dec 2016 16:27:01 +0000 (16:27 +0000)]
MFC r309873:
ed(1): Prevent possible overflows during allocation.

Make sure the parameters used for malloc(3) can hold size_t sizes.
This should help ed(1) handle bigger data in the future.

7 years agoMFC r309957: Add tests for reaper receiving SIGCHLD (r309886).
jilles [Mon, 26 Dec 2016 14:39:05 +0000 (14:39 +0000)]
MFC r309957: Add tests for reaper receiving SIGCHLD (r309886).

PR: 213928

7 years agoMFC r309886:
kib [Mon, 26 Dec 2016 10:01:52 +0000 (10:01 +0000)]
MFC r309886:
When a zombie gets reparented due to the parent exit, send SIGCHLD to
the reaper.

7 years agoMFC r309887:
kib [Mon, 26 Dec 2016 09:56:52 +0000 (09:56 +0000)]
MFC r309887:
Enable lookup_cap_dotdot and lookup_cap_dotdot_nonlocal.

7 years agoMFC r310302:
kib [Mon, 26 Dec 2016 09:52:19 +0000 (09:52 +0000)]
MFC r310302:
Do not clear KN_INFLUX when not owning influx state.

PR: 214923

7 years agor310348
sephe [Mon, 26 Dec 2016 06:59:22 +0000 (06:59 +0000)]
r310348

    hyperv: Unbreak EARLY_AP_STARUP Hyper-V bootstrap by using intrhook

    Properly working pause and friends are required.

    Sponsored by:   Microsoft

7 years agoMFC r310459:
ngie [Mon, 26 Dec 2016 06:32:42 +0000 (06:32 +0000)]
MFC r310459:

Sort #includes per style(9)

No functional change

7 years agoMFC r309869:
ngie [Mon, 26 Dec 2016 06:16:27 +0000 (06:16 +0000)]
MFC r309869:

Merge changes from vendor to address several Coverity issues with
contrib/libarchive's tests

Obtained from: libarchive (ebe29c, fd0ea2, f9e3de)

7 years agoMFC r310457:
ngie [Mon, 26 Dec 2016 06:10:21 +0000 (06:10 +0000)]
MFC r310457:

Clean up trailing whitespace

No functional change

7 years agoMFC r310202:
ngie [Mon, 26 Dec 2016 06:08:20 +0000 (06:08 +0000)]
MFC r310202:

Clean up trailing and leading whitespace

Fix variable type alignment in snmp_dialog(..)

7 years agoMFC r310196:
ngie [Mon, 26 Dec 2016 06:05:47 +0000 (06:05 +0000)]
MFC r310196:

Fix some minor typos with begemotBridgeTpLearnedEntryDiscards and
begemotBridgeTpMaxAddresses

Bump LAST-UPDATED for the MIB, per the change

7 years agoMFC r310203:
ngie [Mon, 26 Dec 2016 06:02:45 +0000 (06:02 +0000)]
MFC r310203:

Clean up parse_ip(..)

- Clean up trailing whitespace
- Fix variable alignment

7 years agoSimilar to r310545, make some additional -Wconstant-conversion warnings
dim [Sun, 25 Dec 2016 17:01:58 +0000 (17:01 +0000)]
Similar to r310545, make some additional -Wconstant-conversion warnings
from clang 3.9.0 in si(4) non-fatal for now.

Direct commit to stable/11, since si(4) has been deleted from head.

7 years agoMFC r305393:
dim [Sun, 25 Dec 2016 16:37:35 +0000 (16:37 +0000)]
MFC r305393:

Make some additional -Wconstant-conversion warnings from clang 3.9.0 in
bwn(4) non-fatal for now.