Commit Graph

227386 Commits

Author SHA1 Message Date
Andrew Turner
2bfb5e812b Use mp_maxid when iterating over CPUs as we may have sparse id allocations.
Sponsored by:	DARPA, AFRL
2017-10-31 18:22:21 +00:00
Stephen Hurd
a1b799ca5b Fix PR221990 - Assertion at iflib.c:1947
ifl_pidx and ifl_credits are going out of sync in _iflib_fl_refill() as they
use different update log.  Use the same update logic for both, and add a
final call to isc_rxd_refill() to handle early exits from the loop.

PR:		221990
Reported by:	pho
Reviewed by:	sbruno
Approved by:	sbruno (mentor)
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D12798
2017-10-31 17:50:42 +00:00
Bryan Drewery
555c6e60bc Follow-up r297998: Remove redundant TOOLS_PREFIX in XMAKE.
Sponsored by:	Dell EMC Isilon
2017-10-31 17:16:46 +00:00
Marcin Wojtas
30217e2dff Rework counting of hardware statistics in ENA driver
Do not read all statistics from the device, instead count them in the
driver except from RX drops - they are received directly from the NIC
in the AENQ descriptor.

Submitted by: Michal Krawczyk <mk@semihalf.com>
Reviewed by: imp
Obtained from: Semihalf
Sponsored by: Amazon.com, Inc.
Differential Revision: https://reviews.freebsd.org/D12852
2017-10-31 16:31:23 +00:00
Marcin Wojtas
a195fab02b Update ena-com HAL to v1.1.4.3 and update driver accordingly
The newest ena-com HAL supports LLQv2 and introduces
API changes. In order not to break the driver compilation
it was updated/fixed in a following way:

* Change version of the driver to 0.8.0
* Provide reset cause when triggering reset of the device
* Reset device after attach fails
* In the reset task free management irq after calling ena_down. Admin
  queue can still be used before ena_down is called, or when it is
  being handled
* Do not reset device if ena_reset_task fails
* Move call of the ena_com_dev_reset to the ena_down() routine - it
  should be called only if interface was up
* Use different function for checking empty space on the sq ring
  (ena-com API change)
* Fix typo on ENA_TX_CLEANUP_THRESHOLD
* Change checking for EPERM with EOPNOTSUPP - change in the ena-com API
* Minor style fixes

Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Amazon.com, Inc.
               Semihalf
Sponsored by: Amazon.com, Inc.
Differential Revision: https://reviews.freebsd.org/D12143
2017-10-31 12:41:07 +00:00
Marcin Wojtas
6371f45637 Update ena-com HAL to newest version
The newest ena-com HAL supports LLQv2 and introduces numerous API changes.

Obtained from: Amazon.com, Inc.
2017-10-31 12:20:48 +00:00
Michael Zhilin
be04c94e1e [i2c/clock] add support for EPSON RTC-8583
RTC-8583 is time-of-day clock used in some SOHO routers. This clock has
only 2 bits for year values, but thanks to user SRAM it's possible to save
year value and keep it up to date via driver code.

Tested on Planex_MZK-W300NAG (SoC is RT2880)

Submitted by:	Hiroki Mori <yamori83@yahoo.co.jp>
Differential Revision:	https://reviews.freebsd.org/D12833
2017-10-31 12:15:00 +00:00
Tijl Coosemans
f236378b54 Set the return address for stack entry points to zero.
Stack unwinders treat zero as a stop condition.  The value on the stack can
be non-zero because thread stacks may be arbitrary memory provided via
pthread_attr_setstack(3) or may be recycled from previous threads.

Reference:
https://lists.freebsd.org/pipermail/freebsd-current/2017-August/066855.html
https://lists.freebsd.org/pipermail/freebsd-current/2017-October/067254.html

Discussed with:	kib
MFC after:	1 week
2017-10-31 11:51:34 +00:00
Michael Zhilin
26cb32ad01 [mips] Pin control configuration for MediaTek RT2880
RT2880 is MIPS4Kc SoC used in many SOHO routers. This commits adds GPIO pin
control configuration of RT2880.

Submitted by:	Hiroki Mori <yamori83@yahoo.co.jp>
Reviewed by:	mizhka, sgalabov
Differential Revision:	https://reviews.freebsd.org/D12648
2017-10-31 11:29:16 +00:00
Andriy Gapon
40d47bb4eb vdev_geom_close: close errored consumer even if vdev_reopening is set
If vdev_geom_close doesn't close the consumer, then the subsequent call
to vdev_geom_open() would be just a NOP and would always return success.
Thus, at present vdev_reopen() would always succeed for vdev_geom devices
even if the underlying provider is in error state.
The problem was introduced as a result of an optimization in rS308055.

The most significant manifistation of the problem is that
zio_vdev_io_done() --> vdev_probe() --> SPA_ASYNC_PROBE -->
spa_async_probe() --> vdev_reopen()
chain of calls and events becomes a NOP as well.
This chain is invoked when zio_vdev_io_done() detects an "unexpected"
error from the lower level I/O.
Additionally, that call path may race with SPA_ASYNC_REMOVE path because
of the asynchronous nature of them both.  So, the SPA_ASYNC_PROBE may
erroneously mark a vdev as being healthy after SPA_ASYNC_REMOVE marked
it as removed.

Reviewed by:	asomers, mav
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D12731
2017-10-31 10:15:03 +00:00
Andriy Gapon
9662d80af5 geom_slice: do not destroy softc until providers are gone
At present, g_slice_orphan and g_slice_spoiled destroy the softc
(struct g_slicer) even before calling g_wither_geom, so there can
be active and incoming io requests at that time and g_slice_start
can access the softc.

This commit changes the code to destroy the softc only after all
providers are closed.

While there, a couple of small cleanups.

Reported by:	Ben RUBSON <ben.rubson@gmail.com>
Tested by:	Ben RUBSON <ben.rubson@gmail.com>
Reviewed by:	mav, smh (earlier version)
MFC after:	2 weeks
Sponsored by:	Panzura
Differential Revision: https://reviews.freebsd.org/D12809
2017-10-31 10:10:13 +00:00
Yuri Victorovich
896b68b936 Add myself as a new committer
Reviewed by:	tcberner
Approved by:	tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D12845
2017-10-31 07:47:57 +00:00
Enji Cooper
b9a2bf88a3 Checkpoint work to integrate coverage and make check together 2017-10-31 07:16:18 +00:00
Enji Cooper
fb4132c662 Start hacking away with GCOV_PREFIX
See: https://gcc.gnu.org/onlinedocs/gcc/Cross-profiling.html
2017-10-31 06:59:28 +00:00
Eitan Adler
424b4e738a Fix '\' in binary ascii table 2017-10-31 06:43:37 +00:00
Eitan Adler
fc82a9aa1c Also bump Dd 2017-10-31 06:36:33 +00:00
Eitan Adler
c580de1476 Update tuning(7) some more
At this point its unclear how much help tuning(7) is whatsoever
but leave it around in case someone decides to spend some time on
it.
2017-10-31 06:35:17 +00:00
Enji Cooper
7c008e4270 Add MK_MAKE_CHECK_WITH_COVERAGE, reliant on MK_COVERAGE and MK_MAKE_CHECK_USE_SANDBOX 2017-10-31 06:16:40 +00:00
Enji Cooper
6b4df955a1 Polish up end-user messages 2017-10-31 05:11:55 +00:00
Enji Cooper
5e1d4ad0dc Start adding in simple wrapper around lgov/genhtml called gather_coverage
It will be installed to /usr/tests/tools for the time being

Based loosely on make snippet seen in
https://github.com/yaneurabeya/scratch/blob/master/demos/freebsd/runtime-coverage/Makefile .
The real difference is that one needs to run a binary with coverage compiled
in before running this script, so it can hoover up the .gcda's.
2017-10-31 05:04:03 +00:00
Enji Cooper
b4d173137c Fold all of the MK_COVERAGE _prereq_libs logic up. None of the deleted logic works. This seems to work 2017-10-31 04:27:06 +00:00
Enji Cooper
0821ef1af8 MFhead@r325209 2017-10-31 04:12:48 +00:00
Enji Cooper
fc13dfd2b7 The append to _startup_libs was bogus; remove it 2017-10-31 04:08:44 +00:00
Enji Cooper
ca28b8ee5b Add static to cap_setgrent prototype in !WITH_CASPER case
This unbreaks the default powerpc/sparc64 build configuration after r325062.
2017-10-31 04:02:50 +00:00
Enji Cooper
b94ab34d44 Remove c++ COMPILER_FEATURES check; it's not needed
Add _coverage_libs to _startup_libs for consistency with the other libraries
in _prereq_libs .
2017-10-31 03:47:22 +00:00
Warner Losh
25fd081525 Add -c to the usage statements.
Submitted by: Maxim Konovalov
2017-10-31 03:39:36 +00:00
Enji Cooper
75aaeb57f6 Don't override MK_COVERAGE from bsd.opts.mk in the CLANG_IS_CC case 2017-10-31 03:14:35 +00:00
Justin Hibbits
a32b54357f Make DPAA work in 64-bit mode
Rework the dTSEC and FMan drivers to be more like a full bus relationship,
so that dtsec can use bus_alloc_resource() instead of trying to handle the
offset from the dts.  This required taking some code from the sparc64 ebus
driver to allow subdividing the fman region for the dTSEC devices.
2017-10-31 02:53:50 +00:00
Enji Cooper
1633af78ab Shuffle MK_COVERAGE conditionals around 2017-10-31 02:52:59 +00:00
Bryan Drewery
337698b78d native-xtools: Allow SYSTEM_COMPILER to be used after r325001.
Now that a proper sysroot is used and a separate target list, it should
be safe to skip building the initial cross-compiler.

X-MFC-With:	r325001
MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-10-31 02:52:36 +00:00
Stephen Hurd
10e0d93811 Fix build with nodevice netmap
iru_init() was declared and used outside the DEV_NETMAP
conditional blocks, but was implemented inside one. Move the
implementation out of the DEV_NETMAP block to allow building with
netmap disabled.

Reported by:	Andrew Turner <andrew@fubar.geek.nz>
Reviewed by:	sbruno
Approved by:	sbruno (mentor)
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D12842
2017-10-31 02:49:28 +00:00
Enji Cooper
076777cc29 MFhead@r325199 2017-10-31 02:46:36 +00:00
Justin Hibbits
b171cc2c56 Add a file to unbreak the build 2017-10-31 02:36:11 +00:00
Bryan Drewery
89dd2beb7e Regenerate after r325180 2017-10-31 02:29:30 +00:00
Bryan Drewery
bec340c8f8 This check is not ready here yet.
Keeping for blame purposes, it will be enabled soon.
2017-10-31 02:25:47 +00:00
Bryan Drewery
177d707c0c makeman: Ensure MK_AUTO_OBJ is disabled in some lookups.
Sponsored by:	Dell EMC Isilon
2017-10-31 02:18:06 +00:00
Bryan Drewery
32e7d9d0d9 AUTO_OBJ can work for crunchgen build-tools.
Sponsored by:	Dell EMC Isilon
2017-10-31 02:12:13 +00:00
Bryan Drewery
579deb45c1 Disable MK_AUTO_OBJ as a make argument like r325078.
This avoids needlessly trying to enable it opportunistically.

Sponsored by:	Dell EMC Isilon
2017-10-31 02:12:09 +00:00
Bryan Drewery
601594ed6a cleanworld: No need to cleandir if MK_AUTO_OBJ is enabled.
Sponsored by:	Dell EMC Isilon
2017-10-31 01:45:14 +00:00
Bryan Drewery
ae160963d8 Fix installworld/distrib-dirs for pathconv after r325186.
Sponsored by:	Dell EMC Isilon
2017-10-31 01:43:36 +00:00
Bryan Drewery
0dd60f15a5 Move some objdir handling (OBJROOT/OBJTOP) out of DIRDEPS_BUILD-only files.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:26:42 +00:00
Bryan Drewery
95137b228e Add RELOBJTOP and RELSRCTOP for relative paths.
RELSRCTOP is likely not as useful since make will always be running from
inside of .OBJDIR and using something like ${.CURDIR}/${RELSRCTOP} is
not redundant for ${SRCTOP}.

Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:41 +00:00
Bryan Drewery
635718c0d9 Rename RELTOP since it will mean something else globally.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:37 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Bryan Drewery
3806950135 DIRDEPS_BUILD: Connect new directories.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:04:07 +00:00
Bryan Drewery
82fcadcd55 Connect libpathconv, disconnected since import in r309035.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:03:52 +00:00
Bryan Drewery
02dea92c10 Properly connect tests.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:03:49 +00:00
Bryan Drewery
6c0e752349 Provide clang-rt for the clang toolchain as well.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:03:46 +00:00
Bryan Drewery
389bd18d0b libdevdctl tests require an external port.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:03:43 +00:00
Bryan Drewery
d8ec01f108 Chase r315223: Disconnect ipftest/ipresend
Sponsored by:	Dell EMC Isilon
2017-10-31 00:03:40 +00:00