]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agointr unbreak KTR/LINT build
Matt Macy [Sat, 19 May 2018 07:04:43 +0000 (07:04 +0000)]
intr unbreak KTR/LINT build

6 years agoctfconvert: silence useless enum has too many values warning
Matt Macy [Sat, 19 May 2018 06:31:17 +0000 (06:31 +0000)]
ctfconvert: silence useless enum has too many values warning

6 years agopmap: silence warnings
Matt Macy [Sat, 19 May 2018 05:58:05 +0000 (05:58 +0000)]
pmap: silence warnings

6 years agonetmap and iflib drivers, silence unused var warnings
Matt Macy [Sat, 19 May 2018 05:57:26 +0000 (05:57 +0000)]
netmap and iflib drivers, silence unused var warnings

6 years agonetinet silence warnings
Matt Macy [Sat, 19 May 2018 05:56:21 +0000 (05:56 +0000)]
netinet silence warnings

6 years agotcp sysctl fix may be uninitialized
Matt Macy [Sat, 19 May 2018 05:55:31 +0000 (05:55 +0000)]
tcp sysctl fix may be uninitialized

6 years agotcp fastopen: fix may be uninitialized
Matt Macy [Sat, 19 May 2018 05:55:00 +0000 (05:55 +0000)]
tcp fastopen: fix may be uninitialized

6 years agoAF_UNIX: switch to annotations to avoid warnings
Matt Macy [Sat, 19 May 2018 05:37:58 +0000 (05:37 +0000)]
AF_UNIX: switch to annotations to avoid warnings

6 years agonetmap: compare e1 with e2, not with itself
Matt Macy [Sat, 19 May 2018 05:37:18 +0000 (05:37 +0000)]
netmap: compare e1 with e2, not with itself

6 years agonet: fix set but not used
Matt Macy [Sat, 19 May 2018 05:27:49 +0000 (05:27 +0000)]
net: fix set but not used

6 years agocapsicum: propagate const correctness
Matt Macy [Sat, 19 May 2018 05:14:05 +0000 (05:14 +0000)]
capsicum: propagate const correctness

6 years agoback out DBGSET macro
Matt Macy [Sat, 19 May 2018 05:12:57 +0000 (05:12 +0000)]
back out DBGSET macro

6 years agointr: eliminate / annotate unused stack locals
Matt Macy [Sat, 19 May 2018 05:12:18 +0000 (05:12 +0000)]
intr: eliminate / annotate unused stack locals

6 years agosendfile: annotate unused value and ensure that npages is actually initialized
Matt Macy [Sat, 19 May 2018 05:10:51 +0000 (05:10 +0000)]
sendfile: annotate unused value and ensure that npages is actually initialized

6 years agoumtx: don't call umtxq_getchain unless the value is needed
Matt Macy [Sat, 19 May 2018 05:09:10 +0000 (05:09 +0000)]
umtx: don't call umtxq_getchain unless the value is needed

6 years agocpuset: revert and annotate instead
Matt Macy [Sat, 19 May 2018 05:07:31 +0000 (05:07 +0000)]
cpuset: revert and annotate instead

6 years agoconf: revert last change and annotate unused var instead
Matt Macy [Sat, 19 May 2018 05:07:03 +0000 (05:07 +0000)]
conf: revert last change and annotate unused var instead

6 years agokevent: annotate unused stack local
Matt Macy [Sat, 19 May 2018 05:06:18 +0000 (05:06 +0000)]
kevent: annotate unused stack local

6 years agolockf: annotate LOCKF_DEBUG only var
Matt Macy [Sat, 19 May 2018 05:04:38 +0000 (05:04 +0000)]
lockf: annotate LOCKF_DEBUG only var

6 years agocapsicum: annotate variable only used by debug
Matt Macy [Sat, 19 May 2018 05:02:40 +0000 (05:02 +0000)]
capsicum: annotate variable only used by debug

6 years agoturnstile / sleepqueue: annotate variables only used by debug builds
Matt Macy [Sat, 19 May 2018 05:00:16 +0000 (05:00 +0000)]
turnstile / sleepqueue: annotate variables only used by debug builds

6 years agovfs: annotate variables only used by debug builds as __unused
Matt Macy [Sat, 19 May 2018 04:59:39 +0000 (04:59 +0000)]
vfs: annotate variables only used by debug builds as __unused

6 years agoAdd SPR_HSRR0/SPR_HSRR1 definitions
Justin Hibbits [Sat, 19 May 2018 04:56:10 +0000 (04:56 +0000)]
Add SPR_HSRR0/SPR_HSRR1 definitions

Reported by: Mark Millard
Pointy-hat to: jhibbits

6 years agotty: use __unused annotation instead to silence warnings
Matt Macy [Sat, 19 May 2018 04:48:26 +0000 (04:48 +0000)]
tty: use __unused annotation instead to silence warnings

6 years agoepoch: avoid warning when INVARIANTS is not enabled
Matt Macy [Sat, 19 May 2018 04:47:34 +0000 (04:47 +0000)]
epoch: avoid warning when INVARIANTS is not enabled

6 years agodisable set but not used on code that can't be changed
Matt Macy [Sat, 19 May 2018 04:46:34 +0000 (04:46 +0000)]
disable set but not used on code that can't be changed

6 years agomalloc: avoid possibly returning stack garbage if MALLOC_DEBUG is defined
Matt Macy [Sat, 19 May 2018 04:43:49 +0000 (04:43 +0000)]
malloc: avoid possibly returning stack garbage if MALLOC_DEBUG is defined

6 years agoAdd hypervisor trap handling, using HSRR0/HSRR1
Justin Hibbits [Sat, 19 May 2018 04:21:50 +0000 (04:21 +0000)]
Add hypervisor trap handling, using HSRR0/HSRR1

Summary:
Some hypervisor exceptions on POWER architecture only save state to HSRR0/HSRR1.
Until we have bhyve on POWER, use a lightweight exception frontend which copies
HSRR0/HSRR1 into SRR0/SRR1, and run the normal trap handler.

The first user of this is the Hypervisor Virtualization Interrupt, which targets
the XIVE interrupt controller on POWER9.

Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D15487

6 years agocpuset_thread0: avoid unused assignment on non debug build
Matt Macy [Sat, 19 May 2018 04:14:00 +0000 (04:14 +0000)]
cpuset_thread0: avoid unused assignment on non debug build

6 years agomake_dev: avoid unused assignments on non debug builds
Matt Macy [Sat, 19 May 2018 04:13:20 +0000 (04:13 +0000)]
make_dev: avoid unused assignments on non debug builds

6 years agomqueue: avoid unused variables
Matt Macy [Sat, 19 May 2018 04:10:53 +0000 (04:10 +0000)]
mqueue: avoid unused variables

6 years agophysio: avoid uninitialized variables
Matt Macy [Sat, 19 May 2018 04:09:58 +0000 (04:09 +0000)]
physio: avoid uninitialized variables

6 years agocache_lookup remove unused variable and initialize used
Matt Macy [Sat, 19 May 2018 04:08:11 +0000 (04:08 +0000)]
cache_lookup remove unused variable and initialize used

6 years agofilt_timerdetach: only assign to old if we're going to check it in
Matt Macy [Sat, 19 May 2018 04:07:00 +0000 (04:07 +0000)]
filt_timerdetach: only assign to old if we're going to check it in
a KASSERT

6 years agogetnextevent: put variable only used by KTR under ifdef KTR
Matt Macy [Sat, 19 May 2018 04:05:36 +0000 (04:05 +0000)]
getnextevent: put variable only used by KTR under ifdef KTR

6 years agosimplify control flow so that gcc knows we never pass save to curthread_pflags_restore
Matt Macy [Sat, 19 May 2018 04:04:44 +0000 (04:04 +0000)]
simplify control flow so that gcc knows we never pass save to curthread_pflags_restore
without initializing

6 years agotty: conditionally assign to ret value only used by MPASS statement
Matt Macy [Sat, 19 May 2018 04:02:29 +0000 (04:02 +0000)]
tty: conditionally assign to ret value only used by MPASS statement

6 years agopowerpc64: Add OPAL definitions
Justin Hibbits [Sat, 19 May 2018 04:01:15 +0000 (04:01 +0000)]
powerpc64: Add OPAL definitions

Summary:
Add additional OPAL PCI definitions and expand the code to use them in order to
ease the OPAL interface process for new comers.

These definitions came directly from the OPAL code and they are the same for
both PHB3 (POWER8) and PHB4 (POWER9).

Submitted by: Breno Leitao
Differential Revision: https://reviews.freebsd.org/D15432

6 years agoremove unused locked variable in lockmgr_unlock_fast_path
Matt Macy [Sat, 19 May 2018 03:58:40 +0000 (03:58 +0000)]
remove unused locked variable in lockmgr_unlock_fast_path

6 years agosignotify: don't create a stack local that isn't used on non-debug builds
Matt Macy [Sat, 19 May 2018 03:57:41 +0000 (03:57 +0000)]
signotify: don't create a stack local that isn't used on non-debug builds

6 years agosysv_msg initialize saved_msgsz
Matt Macy [Sat, 19 May 2018 03:56:39 +0000 (03:56 +0000)]
sysv_msg initialize saved_msgsz

6 years agoremove unused variable
Matt Macy [Sat, 19 May 2018 03:55:42 +0000 (03:55 +0000)]
remove unused variable

6 years agofix uninitialized variable warning in reader locks
Matt Macy [Sat, 19 May 2018 03:52:55 +0000 (03:52 +0000)]
fix uninitialized variable warning in reader locks

6 years agoadd DBGSET macro to conditionally assign to a variable depending on INVARIANTS
Matt Macy [Sat, 19 May 2018 03:50:29 +0000 (03:50 +0000)]
add DBGSET macro to conditionally assign to a variable depending on INVARIANTS

6 years agofix uninitialized variable warning
Matt Macy [Sat, 19 May 2018 03:49:36 +0000 (03:49 +0000)]
fix uninitialized variable warning

6 years agosys_process.c fix set but not used warning
Matt Macy [Sat, 19 May 2018 03:48:35 +0000 (03:48 +0000)]
sys_process.c fix set but not used warning

6 years agosubr_epoch.c fix unused variable warnings
Matt Macy [Sat, 19 May 2018 03:47:37 +0000 (03:47 +0000)]
subr_epoch.c fix unused variable warnings

6 years agoFix a manual copy from the original diff for r333825
Justin Hibbits [Sat, 19 May 2018 03:47:28 +0000 (03:47 +0000)]
Fix a manual copy from the original diff for r333825

The 'else' was in the original diff.

Submitted by: Breno Leitao

6 years agoAdd yet another option for gathering available memory
Justin Hibbits [Sat, 19 May 2018 03:45:38 +0000 (03:45 +0000)]
Add yet another option for gathering available memory

On some POWER9 systems, 'reg' denotes the full memory in the system, while
'linux,usable-memory' denotes the usable memory.  Some memory is reserved for
NVLink usage, so is partitioned off.

Submitted by: Breno Leitao

6 years agoAdd some Hypervisor interrupt definitions
Justin Hibbits [Sat, 19 May 2018 03:23:46 +0000 (03:23 +0000)]
Add some Hypervisor interrupt definitions

This mostly completes the interrupt definitions.  There are still some left out,
less likely to be used in the near term.

6 years agopidctrl Actually use the variables that we assign to as seatbelts to prevent divide
Matt Macy [Sat, 19 May 2018 02:17:18 +0000 (02:17 +0000)]
pidctrl Actually use the variables that we assign to as seatbelts to prevent divide
by zero

Reviewed by: jeffr

6 years agofix gcc8 unused variable and set but not used variable in unix sockets
Matt Macy [Sat, 19 May 2018 02:15:40 +0000 (02:15 +0000)]
fix gcc8 unused variable and set but not used variable in unix sockets
add copyright from lock rewrite while here

6 years agoMerge bmake-20180512
Simon J. Gerraty [Sat, 19 May 2018 00:26:00 +0000 (00:26 +0000)]
Merge bmake-20180512

Skip polling job token pipe,
better handle sysV style includes with variables.

6 years agoSilence non-actionable warnings in vendor code
Matt Macy [Sat, 19 May 2018 00:04:01 +0000 (00:04 +0000)]
Silence non-actionable warnings in vendor code

We can't modify vendor code so there's no signal in warnings from it.
Similarly -Waddress-of-packed-member is not useful on networking code
as access to packed structures is fundamental to its operation.

6 years agoAnnotate td_pre_epoch_prio in struct thread
Matt Macy [Fri, 18 May 2018 23:17:49 +0000 (23:17 +0000)]
Annotate td_pre_epoch_prio in struct thread

Reported by: jhb

6 years agolockmgr: avoid atomic on unlock in the slow path
Mateusz Guzik [Fri, 18 May 2018 22:57:52 +0000 (22:57 +0000)]
lockmgr: avoid atomic on unlock in the slow path

The code is pretty much guaranteed not to be able to unlock.

This is a minor nit. The code still performs way too many reads.
The altered exclusive-locked condition is supposed to be always
true as well, to be cleaned up at a later date.

6 years agoStop claiming the device-side USB serial interfaces talk Hayes AT.
Edward Tomasz Napierala [Fri, 18 May 2018 20:24:19 +0000 (20:24 +0000)]
Stop claiming the device-side USB serial interfaces talk Hayes AT.

There should be no functional difference.

Reviewed by: hselasky@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

6 years agoifnet: Replace if_addr_lock rwlock with epoch + mutex
Matt Macy [Fri, 18 May 2018 20:13:34 +0000 (20:13 +0000)]
ifnet: Replace if_addr_lock rwlock with epoch + mutex

Run on LLNW canaries and tested by pho@

gallatin:
Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5
based ConnectX 4-LX NIC, I see an almost 12% improvement in received
packet rate, and a larger improvement in bytes delivered all the way
to userspace.

When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1,
I see, using nstat -I mce0 1 before the patch:

InMpps OMpps  InGbs  OGbs err TCP Est %CPU syscalls csw     irq GBfree
4.98   0.00   4.42   0.00 4235592     33   83.80 4720653 2149771   1235 247.32
4.73   0.00   4.20   0.00 4025260     33   82.99 4724900 2139833   1204 247.32
4.72   0.00   4.20   0.00 4035252     33   82.14 4719162 2132023   1264 247.32
4.71   0.00   4.21   0.00 4073206     33   83.68 4744973 2123317   1347 247.32
4.72   0.00   4.21   0.00 4061118     33   80.82 4713615 2188091   1490 247.32
4.72   0.00   4.21   0.00 4051675     33   85.29 4727399 2109011   1205 247.32
4.73   0.00   4.21   0.00 4039056     33   84.65 4724735 2102603   1053 247.32

After the patch

InMpps OMpps  InGbs  OGbs err TCP Est %CPU syscalls csw     irq GBfree
5.43   0.00   4.20   0.00 3313143     33   84.96 5434214 1900162   2656 245.51
5.43   0.00   4.20   0.00 3308527     33   85.24 5439695 1809382   2521 245.51
5.42   0.00   4.19   0.00 3316778     33   87.54 5416028 1805835   2256 245.51
5.42   0.00   4.19   0.00 3317673     33   90.44 5426044 1763056   2332 245.51
5.42   0.00   4.19   0.00 3314839     33   88.11 5435732 1792218   2499 245.52
5.44   0.00   4.19   0.00 3293228     33   91.84 5426301 1668597   2121 245.52

Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch

Reviewed by: gallatin
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15366

6 years agoImport bmake-20180512
Simon J. Gerraty [Fri, 18 May 2018 19:49:54 +0000 (19:49 +0000)]
Import bmake-20180512

Of relevance:

  o job.c: skip polling job token pipe
  o parse.c: be more cautious about detecting depenency line
    rather than sysV style include.

also in mk:

* dirdeps.mk: include local.dirdeps-build.mk when .MAKE.LEVEL > 0
  ie. we are building something.
* FILES: add dirdeps-options.mk to deal with optional DIRDEPS.
* ldorder.mk: describe how to use LDORDER_EXTERN_BARRIER
  if needed.

6 years agoBe more robust against garbage input on a TOE TLS TX socket.
John Baldwin [Fri, 18 May 2018 19:09:11 +0000 (19:09 +0000)]
Be more robust against garbage input on a TOE TLS TX socket.

If a socket is closed or shutdown and a partial record (or what
appears to be a partial record) is waiting in the socket buffer,
discard the partial record and close the connection rather than
waiting forever for the rest of the record.

Reported by: Harsh Jain @ Chelsio
Sponsored by: Chelsio Communications

6 years agoepoch(9): allocate net epochs earlier in boot
Matt Macy [Fri, 18 May 2018 18:48:00 +0000 (18:48 +0000)]
epoch(9): allocate net epochs earlier in boot

6 years agoepoch(9): assert that epoch is allocated post-configure
Matt Macy [Fri, 18 May 2018 18:27:17 +0000 (18:27 +0000)]
epoch(9): assert that epoch is allocated post-configure

6 years agoepoch: move epoch variables to read mostly section
Matt Macy [Fri, 18 May 2018 17:58:15 +0000 (17:58 +0000)]
epoch: move epoch variables to read mostly section

6 years agoUse NULL for SYSINIT's last arg, which is a pointer type
Ed Maste [Fri, 18 May 2018 17:58:09 +0000 (17:58 +0000)]
Use NULL for SYSINIT's last arg, which is a pointer type

Sponsored by: The FreeBSD Foundation

6 years agoamd64 GENERIC: correct whitespace on smartpqi entry
Ed Maste [Fri, 18 May 2018 17:51:42 +0000 (17:51 +0000)]
amd64 GENERIC: correct whitespace on smartpqi entry

6 years agoUse sysrc(8) in the documentation rather than echoing things to rc.conf
Nathan Whitehorn [Fri, 18 May 2018 17:46:40 +0000 (17:46 +0000)]
Use sysrc(8) in the documentation rather than echoing things to rc.conf
in order to encourage good habits.

PR: 228325
Submitted by: Mateusz Piotrowski
MFC after: 2 weeks

6 years agoFix math error in the computation of the free space after the last partition
Nathan Whitehorn [Fri, 18 May 2018 17:43:15 +0000 (17:43 +0000)]
Fix math error in the computation of the free space after the last partition
on a disk. This resulted in one sector always remaining free at the end.

PR: bin/228322
Submitted by: Rikiya Yonemoto
MFC after: 2 weeks

6 years agoepoch(9): Make epochs non-preemptible by default
Matt Macy [Fri, 18 May 2018 17:29:43 +0000 (17:29 +0000)]
epoch(9): Make epochs non-preemptible by default

There are risks associated with waiting on a preemptible epoch section.
Change the name to make them not be the default and document the issue
under CAVEATS.

Reported by: markj

6 years agoQuiesce a couple pages of clang warnings with a cast. Duplicates
Sean Bruno [Fri, 18 May 2018 17:23:23 +0000 (17:23 +0000)]
Quiesce a couple pages of clang warnings with a cast.  Duplicates
linux maintainer commit:

https://github.com/torvalds/linux/commit/627871b71c89a6ec12fbed75063f238e0c7127b2#diff-8c6ddb4c3ad69a6fb9f289475821db56

ar9300template_aphrodite.h:575:40: warning: implicit conversion from 'int'
  to 'u_int8_t' (aka 'unsigned char') changes value from 3495 to 167
  [-Wconstant-conversion]
            /* Data[8].ctl_edges[7].bChannel*/FREQ2FBIN(5795, 0)}
                                              ^~~~~~~~~~~~~~~~~~
ar9300eep.h:142:41: note: expanded from macro 'FREQ2FBIN'
    (((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))

Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D15476

6 years agomuge(4): style and comment cleanup
Ed Maste [Fri, 18 May 2018 17:07:59 +0000 (17:07 +0000)]
muge(4): style and comment cleanup

And tag some spots to revisit with XXX.

Sponsored by: The FreeBSD Foundation

6 years agoDon't increment addl_page_shortage for wired pages.
Mark Johnston [Fri, 18 May 2018 16:59:58 +0000 (16:59 +0000)]
Don't increment addl_page_shortage for wired pages.

Such pages are dequeued as they're encountered during the inactive queue
scan, so by the time we get to the active queue scan, they should have
already been subtracted from the inactive queue length.

Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D15479

6 years agoBased on multiple sources including the State Gazette the last day of
Warner Losh [Fri, 18 May 2018 16:19:45 +0000 (16:19 +0000)]
Based on multiple sources including the State Gazette the last day of
Julian calendar in Bulgaria was 31.03.1916.

Submitted by: Konstantin Terziev
Pull Request: https://github.com/freebsd/freebsd/pull/142

(I independently confirmed the date and this was the right date to use for ncal)

6 years agomuge(4): sync register names with Microchip's lan7800.h
Ed Maste [Fri, 18 May 2018 14:30:45 +0000 (14:30 +0000)]
muge(4): sync register names with Microchip's lan7800.h

Microchip provided a permissively-licensed lan78xx header, which has
an 'ETH_' prefix on most definitions.  Follow suit in our driver.

Sponsored by: The FreeBSD Foundation

6 years agoTeach pmcannotate about $TMPDIR and _PATH_TMP
Andrew Gallatin [Fri, 18 May 2018 14:14:04 +0000 (14:14 +0000)]
Teach pmcannotate about $TMPDIR and _PATH_TMP

Convert pmcannotate to using $TMPDIR and _PATH_TMP rather than hard
coding /tmp for temporary files.  Pmcannotate sometimes needs quite a
lot of space to store the output from objdump, and will fail in odd
ways if that output is truncated due to lack of space in /tmp.

Reviewed by: jtl
Sponsored by: Netflix

6 years agobnxt(4)
Sean Bruno [Fri, 18 May 2018 13:49:12 +0000 (13:49 +0000)]
bnxt(4)
- Fix HWRM warning message during HW LRO configuration.

Submitted by: bhargava.marreddy@broadcom.com
MFC after: 1 week
Sponsored by: Broadcom Limited
Differential Revision: https://reviews.freebsd.org/D15466

6 years agoInstead of ignoring the VFP registers, set the dumppcb's pcb_fpusaved
Olivier Houchard [Fri, 18 May 2018 13:28:02 +0000 (13:28 +0000)]
Instead of ignoring the VFP registers, set the dumppcb's pcb_fpusaved
field, so that they are saved, as they may be used in the kernel, in the
EFI and the crypto code.

Reviewed by: andrew

6 years agoMake the name of option that toggles IFCAP_HWRXTSTMP capability to
Andrey V. Elsukov [Fri, 18 May 2018 12:12:24 +0000 (12:12 +0000)]
Make the name of option that toggles IFCAP_HWRXTSTMP capability to
match the name of this capability. It was added recently and is not merged
to stable branch, so I hope it is not too late to change the name.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D15475

6 years agoEnable the Qualcomm MSM UART driver. This is needed for some Qualcomm
Andrew Turner [Fri, 18 May 2018 11:32:48 +0000 (11:32 +0000)]
Enable the Qualcomm MSM UART driver. This is needed for some Qualcomm
Snapdragon SoCs.

Obtained from: ABT Systems Ltd
Sponsored by: Turing Robotic Industries

6 years agoamd64: tweak the read_frequently section
Mateusz Guzik [Fri, 18 May 2018 07:31:26 +0000 (07:31 +0000)]
amd64: tweak the read_frequently section

1. align to 128 bytes to avoid possible waste from the preceeding section
2. sort entries by alignment SORT_BY_ALIGNMENT, plugging the holes (most
entries are one byte in size, but they got interleaved with bigger ones)

Interestingly I was looking for a feature of the sort earlier and failed
to find it. It turns out the script was already utilizing sorting in other
places, so shame on me.

Thanks for Travis Geiselbrecht for pointing me at the feature.

6 years agoMFV r333779: xz 5.2.4.
Xin LI [Fri, 18 May 2018 06:10:16 +0000 (06:10 +0000)]
MFV r333779: xz 5.2.4.

MFC after: 2 weeks

6 years agocxgbe(4): Implement ifnet callbacks that deal with send tags.
Navdeep Parhar [Fri, 18 May 2018 06:09:15 +0000 (06:09 +0000)]
cxgbe(4): Implement ifnet callbacks that deal with send tags.

An etid (ethoffload tid) is allocated for a send tag and it acquires a
reference on the traffic class that matches the send parameters
associated with the tag.

Sponsored by: Chelsio Communications

6 years agoepoch(9): fix error in example and update API reference
Matt Macy [Fri, 18 May 2018 04:13:58 +0000 (04:13 +0000)]
epoch(9): fix error in example and update API reference

Submitted by: hps
Approved by: sbruno

6 years agoVendor import of xz-5.2.4 (trimmed).
Xin LI [Fri, 18 May 2018 04:06:35 +0000 (04:06 +0000)]
Vendor import of xz-5.2.4 (trimmed).

6 years agonetmap: pull fix for 32-bit support from upstream
Matt Macy [Fri, 18 May 2018 03:38:17 +0000 (03:38 +0000)]
netmap: pull fix for 32-bit support from upstream

Approved by: sbruno

6 years agovt: add more cp437 mappings for vga textmode
Ed Maste [Fri, 18 May 2018 02:58:26 +0000 (02:58 +0000)]
vt: add more cp437 mappings for vga textmode

In UTF-8 locales mandoc uses a number of characters outside of the Basic
Latin group, e.g. from general punctuation or miscellaneous mathematical
symbols, and these rendered as ? in text mode.

This change adds (char, replacement, code point, description):

    ¦ | U+00A6 Broken bar
    ✓ √ U+2713 Checkmark

Sponsored by:   The FreeBSD Foundation

6 years agoepoch: actually allocate the counters we've assigned sysctls too
Matt Macy [Fri, 18 May 2018 02:57:39 +0000 (02:57 +0000)]
epoch: actually allocate the counters we've assigned sysctls too

Approved by: sbruno

6 years agoepoch: add non-preemptible "critical" variant
Matt Macy [Fri, 18 May 2018 01:52:51 +0000 (01:52 +0000)]
epoch: add non-preemptible "critical" variant

adds:
- epoch_enter_critical() - can be called inside a different epoch,
  starts a section that will acquire any MTX_DEF mutexes or do
  anything that might sleep.
- epoch_exit_critical() - corresponding exit call
- epoch_wait_critical() - wait variant that is guaranteed that any
  threads in a section are running.
- epoch_global_critical - an epoch_wait_critical safe epoch instance

Requested by:   markj
Approved by: sbruno

6 years agoUse strsep() to parse init_path in start_init().
Brooks Davis [Thu, 17 May 2018 23:07:51 +0000 (23:07 +0000)]
Use strsep() to parse init_path in start_init().

This simplifies the use of the path variable by making it NUL
terminated.  This is a prerequisite for further cleanups.

Reviewed by: imp
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15467

6 years agoIn pmap_get_tables(), check that the L2 is indeed a table before attempting
Olivier Houchard [Thu, 17 May 2018 22:40:22 +0000 (22:40 +0000)]
In pmap_get_tables(), check that the L2 is indeed a table before attempting
to get the l3.

6 years agoIn vfp_save_state(), don't bother trying to save the VFP registers if the
Olivier Houchard [Thu, 17 May 2018 22:38:16 +0000 (22:38 +0000)]
In vfp_save_state(), don't bother trying to save the VFP registers if the
provided PCB doesn't have a pcb_fpusaved. All PCBs associated to a thread
should have one, but the dumppcb used when panic'ing doesn't.

6 years agoepoch: skip poll function call in hardclock unless there are callbacks pending
Matt Macy [Thu, 17 May 2018 21:39:15 +0000 (21:39 +0000)]
epoch: skip poll function call in hardclock unless there are callbacks pending

Reported by: mjg
Approved by: sbruno

6 years agoAdd a missing nfsrv_freesession() call for an unlikely failure case.
Rick Macklem [Thu, 17 May 2018 21:17:20 +0000 (21:17 +0000)]
Add a missing nfsrv_freesession() call for an unlikely failure case.

Since NFSv4.1 clients normally create a single session which supports
both fore and back channels, it is unlikely that a callback will fail
due to a lack of a back channel.
However, if this failure occurred, the session wasn't being dereferenced
and would never be free'd.
Found by inspection during pNFS server development.

Tested by: andreas.nagy@frequentis.com
MFC after: 2 months

6 years agopowerpc: fix LINT build
Matt Macy [Thu, 17 May 2018 21:04:19 +0000 (21:04 +0000)]
powerpc: fix LINT build

netmap currently doesn't build, take it out of LINT to prevent
hiding regressions in universe

Reviewed by: jhibbits
Approved by: sbruno

6 years agoepoch(9): schedule pcpu callback task in hardclock if there are callbacks pending
Matt Macy [Thu, 17 May 2018 19:57:07 +0000 (19:57 +0000)]
epoch(9): schedule pcpu callback task in hardclock if there are callbacks pending

Approved by: sbruno

6 years agoAdd a "multifunction" device side USB template, which provides mass
Edward Tomasz Napierala [Thu, 17 May 2018 19:54:11 +0000 (19:54 +0000)]
Add a "multifunction" device side USB template, which provides mass
storage, CDC ACM (serial), and CDC ECM (ethernet) at the same time.
It's quite similar in function to Linux' "g_multi" gadget.

Reviewed by: hselasky@
MFC after: 2 weeks
Relnotes: yes
Sponsored by: The FreeBSD Foundation

6 years agoepoch(9): eliminate the need to wait when polling for callbacks to run
Matt Macy [Thu, 17 May 2018 19:50:55 +0000 (19:50 +0000)]
epoch(9): eliminate the need to wait when polling for callbacks to run

by using ck's own callback handling mechanism we can simply check which
callbacks have had a grace period elapse

Approved by: sbruno

6 years agoepoch(9): fix potential deadlock
Matt Macy [Thu, 17 May 2018 19:41:58 +0000 (19:41 +0000)]
epoch(9): fix potential deadlock

Don't acquire a waiting thread's lock while holding our own

Approved by: sbruno

6 years agoepoch(9): missed add from r333755
Matt Macy [Thu, 17 May 2018 19:30:57 +0000 (19:30 +0000)]
epoch(9): missed add from r333755

Reported by: flo
Approved by: sbruno

6 years agorelease: rpi3: Copy the special rpi3 config.txt
Emmanuel Vadot [Thu, 17 May 2018 19:10:13 +0000 (19:10 +0000)]
release: rpi3: Copy the special rpi3 config.txt

RPI* 32bits and RPI* 64bits have a different config.txt
Copy to correct config.txt to the fat partition of the release image.
Also copy pwm.dtbo as some people want to use it.

Reviewed by: gjb

6 years agoepoch(9): restore thread priority on exit if it was changed by a waiter
Matt Macy [Thu, 17 May 2018 19:08:28 +0000 (19:08 +0000)]
epoch(9): restore thread priority on exit if it was changed by a waiter

Reported by: markj
Approved by: sbruno