]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoMFC r356943,356944: Correct "service ipfw status" for INET6-only systems.
Eugene Grosbein [Tue, 7 Apr 2020 16:52:45 +0000 (16:52 +0000)]
MFC r356943,356944: Correct "service ipfw status" for INET6-only systems.

4 years agoMFC r342168,357786: Allow ng_nat to be attached to a ethernet interface
Eugene Grosbein [Tue, 7 Apr 2020 16:44:14 +0000 (16:44 +0000)]
MFC r342168,357786: Allow ng_nat to be attached to a ethernet interface

Allow ng_nat to be attached to a ethernet interface directly via ng_ether(4)
or the likes. Add new control message types: setdlt and getdlt to switch
from default DLT_RAW (no encapsulation) to DLT_EN10MB (ethernet).

Submitted by: sobomax
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D18535
Relnotes: yes

4 years agoMFC r357092,357787: Add support for RFC 6598/Carrier Grade NAT subnets
Eugene Grosbein [Tue, 7 Apr 2020 16:27:58 +0000 (16:27 +0000)]
MFC r357092,357787: Add support for RFC 6598/Carrier Grade NAT subnets
to libalias and ipfw.

In libalias, a new flag PKT_ALIAS_UNREGISTERED_RFC6598 is added.
This is like PKT_ALIAS_UNREGISTERED_ONLY, but also is RFC 6598 aware.
Also, we add a new NAT option to ipfw called unreg_cgn, which is like
unreg_only, but also is RFC 6598-aware.  The reason for the new
flags/options is to avoid breaking existing networks, especially those
which rely on RFC 6598 as an external address.

Submitted by: Neel Chauhan <neel AT neelc DOT org>
Reviewed by: melifaro, rgrimes, Lutz Donnerhacke
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D22877
Differential Revision: https://reviews.freebsd.org/D23448

4 years agoMFC r359277:
Mark Johnston [Tue, 7 Apr 2020 16:15:53 +0000 (16:15 +0000)]
MFC r359277:
Add regression tests for newsyslog.conf's p flag.

4 years agoMFC r359276:
Mark Johnston [Tue, 7 Apr 2020 16:15:35 +0000 (16:15 +0000)]
MFC r359276:
newsyslog: Fix stack corruption when initializing a zipwork structure.

4 years agoMFC of 359612
Kirk McKusick [Mon, 6 Apr 2020 22:12:42 +0000 (22:12 +0000)]
MFC of 359612

Use proper boolean expressions for soft update macros.

Sponsored by: Netflix

4 years agoMFC r359468:
Konstantin Belousov [Mon, 6 Apr 2020 18:52:40 +0000 (18:52 +0000)]
MFC r359468:
kern_sendfile.c: add specific malloc type.

4 years agoMFC r359466:
Konstantin Belousov [Mon, 6 Apr 2020 18:48:55 +0000 (18:48 +0000)]
MFC r359466:
VOP_GETPAGES_ASYNC(): consistently call iodone() callback in case of error.

4 years agoMFC r359464:
Konstantin Belousov [Mon, 6 Apr 2020 18:47:15 +0000 (18:47 +0000)]
MFC r359464:
buffer pager: skip bogus pages.

PR: 244713

4 years agoMFC r359463:
Konstantin Belousov [Mon, 6 Apr 2020 18:45:05 +0000 (18:45 +0000)]
MFC r359463:
kern_sendfile.c style: order headers alphabetically.

4 years agoMFC r359437:
Mark Johnston [Mon, 6 Apr 2020 14:58:24 +0000 (14:58 +0000)]
MFC r359437:
Fix accounting of hwpmc's thread descriptor freelist.

4 years agoMFC r359594, r359597:
Mark Johnston [Mon, 6 Apr 2020 14:56:19 +0000 (14:56 +0000)]
MFC r359594, r359597:
Fix the description of the -m flag in top.1.

PR: 244153

4 years agoMFC r359452:
Hans Petter Selasky [Mon, 6 Apr 2020 07:07:27 +0000 (07:07 +0000)]
MFC r359452:
Fine grain locking inside the cuse(3) kernel module.

Implement one mutex per cuse(3) server instance which also cover the
clients belonging to the given server instance.

This should significantly reduce the mutex congestion inside the
cuse(3) kernel module when multiple servers are in use.

Sponsored by: Mellanox Technologies

4 years agoMFC r359271:
Andrey V. Elsukov [Mon, 6 Apr 2020 06:34:45 +0000 (06:34 +0000)]
MFC r359271:
  Use IP_FW_NAT44_DESTROY opcode for IP_FW3 socket option to destroy
  NAT instance.

  The NAT44 group of opcodes for IP_FW3 socket option is modern way
  to control NAT instances and this method can be used in future to
  switch from numeric to named NAT instances, like was done for ipfw
  tables.
  The IP_FW_NAT_DEL opcode is the last remnant of old ipfw_ctl control
  plane that doesn't support versioned operations. This interface will
  be retired soon.

4 years agoMFC r359453, r359455
Kyle Evans [Mon, 6 Apr 2020 04:06:15 +0000 (04:06 +0000)]
MFC r359453, r359455

r359453:
flua: enable readline bits, courtesy of libedit

This is a nicer experience when attempting to run ad-hoc lua bits in the
flua REPL.

r359455:
flua: follow-up to r359453, don't bother with libedit in bootstrap

The bootstrap flua should not be used for REPL-like activities; exclude it
to save the dependency on libedit and not waste time with it.

PR: 245121

4 years agoDisable use of bswapxx with GCC.
Xin LI [Sun, 5 Apr 2020 04:01:11 +0000 (04:01 +0000)]
Disable use of bswapxx with GCC.

4 years agoWorkaround for GCC.
Xin LI [Sun, 5 Apr 2020 03:26:40 +0000 (03:26 +0000)]
Workaround for GCC.

4 years agoMFC r357716: Use humanize_number to format available and bad space size
Xin LI [Sun, 5 Apr 2020 02:45:54 +0000 (02:45 +0000)]
MFC r357716: Use humanize_number to format available and bad space size

4 years agoMFC r357757: MFV r357712: file 5.38.
Xin LI [Sun, 5 Apr 2020 02:27:49 +0000 (02:27 +0000)]
MFC r357757: MFV r357712: file 5.38.

4 years agoMFC r357609: MFV r357608: Limit memory usage in xz(1) instead of in tuklib.
Xin LI [Sun, 5 Apr 2020 02:08:17 +0000 (02:08 +0000)]
MFC r357609: MFV r357608: Limit memory usage in xz(1) instead of in tuklib.

4 years agoMFC r359201: MFV r359197: xz 5.2.5.
Xin LI [Sun, 5 Apr 2020 01:53:35 +0000 (01:53 +0000)]
MFC r359201: MFV r359197: xz 5.2.5.

Relnotes: yes

4 years agoFix the Linux truncate64 debug print after r359605.
Mark Johnston [Sat, 4 Apr 2020 17:08:58 +0000 (17:08 +0000)]
Fix the Linux truncate64 debug print after r359605.

Note, the debug code is not present in head, it was removed in r347538.
This is a direct commit to stable/12.

Reported by: Jenkins

4 years agoMFC r359489
Vincenzo Maffione [Fri, 3 Apr 2020 18:55:22 +0000 (18:55 +0000)]
MFC r359489

valectl: fix typo in man page

Submitted by:   Jose Luis Duran
MFC after:      3 days

4 years agoMFC: r359486
Jung-uk Kim [Fri, 3 Apr 2020 17:08:47 +0000 (17:08 +0000)]
MFC: r359486

Merge OpenSSL 1.1.1f.

PR: 245073

4 years agoMFC r356945, r356946:
Mark Johnston [Fri, 3 Apr 2020 16:31:45 +0000 (16:31 +0000)]
MFC r356945, r356946:
Fix 64-bit syscall argument fetching in 32-bit Linux syscall handlers.

PR: 243155

4 years agoMFC r355754, r355807 (trasz):
Mark Johnston [Fri, 3 Apr 2020 16:28:39 +0000 (16:28 +0000)]
MFC r355754, r355807 (trasz):
Add sync_file_range(2) implementation to linux(4).

4 years agoMFC r355752, r355753 (by trasz):
Mark Johnston [Fri, 3 Apr 2020 16:11:39 +0000 (16:11 +0000)]
MFC r355752, r355753 (by trasz):
Fix definitions for linuxulator's sync_file_range(2).

4 years agoMFC r359171:
Mark Johnston [Fri, 3 Apr 2020 13:26:38 +0000 (13:26 +0000)]
MFC r359171:
Simplify uipc_detach() slightly.

4 years agoMFC r359170:
Mark Johnston [Fri, 3 Apr 2020 13:25:53 +0000 (13:25 +0000)]
MFC r359170:
Remove UNP_NASCENT, reverting r303855.

4 years agoMFC r359239, r359241 setkey
Baptiste Daroussin [Fri, 3 Apr 2020 05:11:16 +0000 (05:11 +0000)]
MFC r359239, r359241 setkey

r359239:
Revove useless linking to yacc

r359241:
Remove the link to libl which only contains a stub function
on yywrap, if the flex is told yywrap is not in use, then this linkage becomes
unnecessary

4 years agoMFC r359232:
Baptiste Daroussin [Fri, 3 Apr 2020 05:08:06 +0000 (05:08 +0000)]
MFC r359232:

pw: do not removed home directories if not owned

When deleting a user, if its home directory does not belong to it, it should
not be removed. This is the promise that the manpage makes, the tool should
ensure that it respects that promise.

Add a regression test about it

PR:  244967
Submitted by: Eric Hanneken <eric@erichanneken.com>

4 years agoMFC r359371
Ryan Moeller [Fri, 3 Apr 2020 01:31:48 +0000 (01:31 +0000)]
MFC r359371

loader: Fully reset terminal settings, not just colors

Reviewed by:    kevans, tsoome
Approved by:    mav (mentor)

4 years agoMFC r359183:
Mark Johnston [Fri, 3 Apr 2020 00:32:48 +0000 (00:32 +0000)]
MFC r359183:
Fix uselocale(3) to not leak a reference to the old locale.

PR: 239520

4 years agoMFC r359130:
Kristof Provost [Thu, 2 Apr 2020 18:32:44 +0000 (18:32 +0000)]
MFC r359130:

pfctl: improve rule load times with thousands of interfaces

r343287 / D18759 introduced ifa_add_groups_to_map() which is now run by
ifa_load/ifa_lookup/host_if. When loading an anchor or ruleset via pfctl that
does NOT contain ifnames as hosts, host() still ends up iterating all
interfaces twice, grabbing SIOCGIFGROUP ioctl twice for each. This adds an
unnecessary amount of time on systems with thousands or tens of thousands of
interfaces.

Prioritize the IPv4/6 check over the interface name lookup, which skips loading
the iftab and iterating all interfaces when the configuration does not contain
interface names.

Submitted by: Nick Rogers
Sponsored by: RG Nets

4 years agoMFC r359006: muge: enable RXCSUM as it now works
Ed Maste [Thu, 2 Apr 2020 16:48:46 +0000 (16:48 +0000)]
MFC r359006: muge: enable RXCSUM as it now works

4 years agoMFC r359132:
Mark Johnston [Thu, 2 Apr 2020 15:37:40 +0000 (15:37 +0000)]
MFC r359132:
Enter a write sequence when updating rights.

4 years agoMFC r359133:
Mark Johnston [Thu, 2 Apr 2020 15:32:09 +0000 (15:32 +0000)]
MFC r359133:
kern_dup(): Call filecaps_free_prep() in a write section.

4 years agoMFC r359154:
Mark Johnston [Thu, 2 Apr 2020 15:30:51 +0000 (15:30 +0000)]
MFC r359154:
Fix synchronization in the IPV6_2292PKTOPTIONS set handler.

4 years agoMFC r359330:
Mark Johnston [Thu, 2 Apr 2020 15:30:30 +0000 (15:30 +0000)]
MFC r359330:
Remove unused SYSINIT macros for capability rights.

4 years agoMFC r359439:
Hans Petter Selasky [Thu, 2 Apr 2020 07:40:57 +0000 (07:40 +0000)]
MFC r359439:
Evaluate modifier keys before the regular keys, so that if a modifier
key is pressed at the same time as a regular key, that means key with
modifier is output. Some automated USB keyboards like Yubikeys need this.

This fixes a regression issue after r357861.

Reported by: Adam McDougall <mcdouga9@egr.msu.edu>
PR: 224592
PR: 233884
Sponsored by: Mellanox Technologies

4 years agoMFC r359331:
Mark Johnston [Thu, 2 Apr 2020 03:35:05 +0000 (03:35 +0000)]
MFC r359331:
Simplify td_ucred handling in newnfs_connect().

4 years agoMFC r359112: MFOpenZFS: make zil max block size tunable
Alexander Motin [Thu, 2 Apr 2020 00:30:01 +0000 (00:30 +0000)]
MFC r359112: MFOpenZFS: make zil max block size tunable

We've observed that on some highly fragmented pools, most metaslab
allocations are small (~2-8KB), but there are some large, 128K
allocations.  The large allocations are for ZIL blocks.  If there is a
lot of fragmentation, the large allocations can be hard to satisfy.

The most common impact of this is that we need to check (and thus load)
lots of metaslabs from the ZIL allocation code path, causing sync writes
to wait for metaslabs to load, which can take a second or more.  In the
worst case, we may not be able to satisfy the allocation, in which case
the ZIL will resort to txg_wait_synced() to ensure the change is on
disk.

To provide a workaround for this, this change adds a tunable that can
reduce the size of ZIL blocks.

External-issue: DLPX-61719
Reviewed-by: George Wilson <george.wilson@delphix.com>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #8865
openzfs/zfs@b8738257c2607c73c731ce8e0fd73282b266d6ef

4 years agoMFC r359110: Add missing STAILQ_INIT() in ciss_disable_adapter().
Alexander Motin [Thu, 2 Apr 2020 00:28:26 +0000 (00:28 +0000)]
MFC r359110: Add missing STAILQ_INIT() in ciss_disable_adapter().

I think it should fix reported panic after "ADAPTER HEARTBEAT FAILED".

4 years agoMFC r359111:
Konstantin Belousov [Wed, 1 Apr 2020 22:23:34 +0000 (22:23 +0000)]
MFC r359111:
Add file for static compilation of mlx5.

4 years agoMFC r359106:
Konstantin Belousov [Wed, 1 Apr 2020 19:46:31 +0000 (19:46 +0000)]
MFC r359106:
mlx5_core: lower the severity of message noting that no SR-IOV cap is present.

4 years agoMFC r359105:
Konstantin Belousov [Wed, 1 Apr 2020 19:45:27 +0000 (19:45 +0000)]
MFC r359105:
mlx5: Route NIC_VPORT_CHANGE events to eswitch code.

4 years agoMFC r359104:
Konstantin Belousov [Wed, 1 Apr 2020 19:44:03 +0000 (19:44 +0000)]
MFC r359104:
mlx5: Read number of VF ports from the SR-IOV cap.

4 years agoMFC r359103:
Konstantin Belousov [Wed, 1 Apr 2020 19:42:50 +0000 (19:42 +0000)]
MFC r359103:
mlx5: Use eswitch interface to configure VFs steering.

4 years agoMFC r359102:
Konstantin Belousov [Wed, 1 Apr 2020 19:41:26 +0000 (19:41 +0000)]
MFC r359102:
mlx5: Add 'follow' vport state, relevant for VFs.

4 years agoMFC r359101:
Konstantin Belousov [Wed, 1 Apr 2020 19:40:14 +0000 (19:40 +0000)]
MFC r359101:
mlx5: Integrate eswitch and mpfs management code.

4 years agoMFC r359100:
Konstantin Belousov [Wed, 1 Apr 2020 19:38:46 +0000 (19:38 +0000)]
MFC r359100:
mlx5: Restore eswitch management code from attic.

4 years agoMFC r359098:
Konstantin Belousov [Wed, 1 Apr 2020 19:37:23 +0000 (19:37 +0000)]
MFC r359098:
mlx5: Basic PCIe side of SR-IOV support.

4 years agoMFC r359094:
Konstantin Belousov [Wed, 1 Apr 2020 19:06:26 +0000 (19:06 +0000)]
MFC r359094:
mlx5_core: add sysctls to report device capabilities.

4 years agoMFC r359096, r359165 (by imp):
Konstantin Belousov [Wed, 1 Apr 2020 17:13:43 +0000 (17:13 +0000)]
MFC r359096, r359165 (by imp):
linuxkpi: Add infrastructure to pass FreeBSD IOV method calls into
pci_driver methods.

4 years agoMFC r359095:
Konstantin Belousov [Wed, 1 Apr 2020 17:08:55 +0000 (17:08 +0000)]
MFC r359095:
Add pci_iov_if.h header as a dependency for Linuxkpi consumers.

MFC note: this is not a true merge of r359095, but an adaptation of the
committed bit from r359378, which was MFC r359185.  The functional part
of the change should be same.

4 years agoMFC r359093:
Konstantin Belousov [Wed, 1 Apr 2020 16:01:03 +0000 (16:01 +0000)]
MFC r359093:
Do not spuriously re-enable disabled io_apic pin on EOI for some configurations.

4 years agoMFC r359092:
Konstantin Belousov [Wed, 1 Apr 2020 15:59:26 +0000 (15:59 +0000)]
MFC r359092:
Stop (trying to) renumber io apics.

4 years agoMFC r359090:
Konstantin Belousov [Wed, 1 Apr 2020 15:57:14 +0000 (15:57 +0000)]
MFC r359090:
Widen the stored io_apic_id to 8 bits.

4 years agoMFC 359071:
Mateusz Piotrowski [Wed, 1 Apr 2020 07:28:31 +0000 (07:28 +0000)]
MFC 359071:

Document that posixshmcontrol first appeared in 12.1

Also while here, I am addressing some linting issues.

PR: 243132
Submitted by: Noah Altunian <nbaltunian gmail com>
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24112

4 years agoMFC r359396:
Konstantin Belousov [Tue, 31 Mar 2020 15:26:56 +0000 (15:26 +0000)]
MFC r359396:
hdaa: remove verbosity from the normal driver operations.

4 years agoMFC r359278:
Mark Johnston [Tue, 31 Mar 2020 01:18:00 +0000 (01:18 +0000)]
MFC r359278:
newsyslog: Add fallthrough comments to appease Coverity.

4 years agoMFC r343758 (mmacy): Fix deterministic builds by sorting input...
Ed Maste [Mon, 30 Mar 2020 22:07:11 +0000 (22:07 +0000)]
MFC r343758 (mmacy): Fix deterministic builds by sorting input...

...to fts in jevents

4 years agoMFC r339880 (arichardson): Fix get_maxfds() in jevents
Ed Maste [Mon, 30 Mar 2020 22:02:27 +0000 (22:02 +0000)]
MFC r339880 (arichardson): Fix get_maxfds() in jevents

If RLIM_INFINITY == -1ULL (such as on macOS) the min() call will result
in a value of less than 1 being returned. This causes nftw() to fail
with EINVAL.

While touching this file also fix includes to work on Linux/macOS and don't
declare snprintf since it may have different attributes in the system
headers there.

4 years agoMFC r359368:
Brooks Davis [Mon, 30 Mar 2020 17:07:05 +0000 (17:07 +0000)]
MFC r359368:

Create and use a tests group for the tests user.

No user (except nobody) should be a member of the nobody group.

Reported by: rgrimes
Reviewed by: rgrimes
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24199

4 years agoMFC r358818:
Vladimir Kondratyev [Sun, 29 Mar 2020 23:38:55 +0000 (23:38 +0000)]
MFC r358818:

acpi: Fix stalled value returned by acpi_get_device() after device deletion

Newbus device reference attached to ACPI handle is not cleared when newbus
device is deleted with devctl(8) delete command. Fix that with calling of
AcpiDetachData() from "child_deleted" bus method like acpi_pci driver does.

MFC r358819:

acpi: Export functions required by upcoming acpi_iicbus driver.

MFC r358820:

iicbus(4): Add support for ACPI-based children enumeration

When iicbus is attached as child of Designware I2C controller it scans all
ACPI nodes for "I2C Serial Bus Connection Resource Descriptor" described
in section 19.6.57 of ACPI specs.
If such a descriptor is found, I2C child is added to iicbus, it's I2C
address, IRQ resource and ACPI handle are added to ivars. Existing
ACPI bus-hosted child is deleted afterwards.

The driver also installs so called "I2C address space handler" which is
disabled by default as nontested.
Set hw.iicbus.enable_acpi_space_handler loader tunable to 1 to enable it.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D22901

4 years agoMFC 359299:
Mateusz Piotrowski [Sat, 28 Mar 2020 08:15:18 +0000 (08:15 +0000)]
MFC 359299:

Fix formatting

Previously, the whole "jail_* variables" string would be stylized
as a variable. This is incorrect.

4 years agoMFC r359185:
Konstantin Belousov [Fri, 27 Mar 2020 20:06:40 +0000 (20:06 +0000)]
MFC r359185:
Introduce LINUXKPI_GENSRCS.

For MFC, pci_iov_if.h is excluded from the list.  It will be readded
when linuxkpi support for SRIOV is merged.

Sponsored by: Mellanox Technologies

4 years agoMFC r358314: style.9: update C99 commentary
Ed Maste [Fri, 27 Mar 2020 19:08:10 +0000 (19:08 +0000)]
MFC r358314: style.9: update C99 commentary

Make style.9 read as a current statement of C99 preferences, rather than a
description of ongoing changes to our preferred style.  Alsu use the short
form "ISO C99" on the 2nd and later instances rather than repeating the
unwieldy `ISO/IEC 9899:1999 ("ISO C99")` each time.

4 years agoMFC r359172-r359176:
Mark Johnston [Fri, 27 Mar 2020 17:06:24 +0000 (17:06 +0000)]
MFC r359172-r359176:
elftoolchain coverity fixes

4 years agoMFC r359184:
Mark Johnston [Fri, 27 Mar 2020 17:04:46 +0000 (17:04 +0000)]
MFC r359184:
Lock the socket in soo_stat().

4 years agoMFC r359285:
Justin Hibbits [Fri, 27 Mar 2020 15:26:30 +0000 (15:26 +0000)]
MFC r359285:

ichwd: Add Atom C3000 watchdog ID.

Sponsored by:   Juniper Networks, Inc

4 years agoMFC r359279:
Justin Hibbits [Fri, 27 Mar 2020 15:20:19 +0000 (15:20 +0000)]
MFC r359279:

ismt: Fix ISMT_DESC_ADDR_RW macro, slave addresses are already left-shifted

Reverts r293369.  The macro was orginally correct, since our SMBus
framework, unlike i2c, already requires addresses to be 8-bit, LSB-cleared.

Sponsored by:   Juniper Networks, Inc

4 years agoMFC r358959: Increase buffer in mprsas_log_command() from 192 to 224 bytes.
Alexander Motin [Fri, 27 Mar 2020 13:29:24 +0000 (13:29 +0000)]
MFC r358959: Increase buffer in mprsas_log_command() from 192 to 224 bytes.

192 bytes are not enough to print long commands, such as ATA COMMAND PASS
THROUGH(16), that makes debug output difficult to read.

4 years agoMFC 358954:
Mateusz Piotrowski [Fri, 27 Mar 2020 09:57:27 +0000 (09:57 +0000)]
MFC 358954:

CMSG_DATA.3: Fix formatting of printf escape sequences

Escape sequences like "\n" have to be escaped twice in examples in our
mdoc(7)-based manual pages in order to be displayed properly. The problem
is that otherwise they are interpreted by mdoc(7), which results in:

    printf("parent: received '%s'0, buf);

being shown to the user instead of:

    printf("parent: received '%s'\n", buf);

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24056

4 years agoMFC 359340:
Mateusz Piotrowski [Fri, 27 Mar 2020 09:55:08 +0000 (09:55 +0000)]
MFC 359340:

Do not use macros in -width

They do not expand.

4 years agoMFC r359159:
Navdeep Parhar [Fri, 27 Mar 2020 03:58:00 +0000 (03:58 +0000)]
MFC r359159:

cxgbe(4): Split sge_nm_rxq into three cachelines.

This reduces the lines bouncing around between the driver rx ithread and
the netmap rxsync thread.  There is no net change in the size of the
struct (it continues to waste a lot of space).

This kind of split was originally proposed in D17869 by Marc De La
Gueronniere @ Verisign, Inc.

Sponsored by: Chelsio Communications

4 years agoMFC r359247:
Brooks Davis [Thu, 26 Mar 2020 17:55:56 +0000 (17:55 +0000)]
MFC r359247:

Add the tests user, an unprivileged user from the default kyua config.

This is a preparatory commit for D24103.

Reviewed by: emaste
Obtained from: CheriBSD
Sponsored by: DARPA

4 years agoMFC r359120:
Hans Petter Selasky [Thu, 26 Mar 2020 05:37:08 +0000 (05:37 +0000)]
MFC r359120:
Correctly implement support for remote wakeup for USB 3.0 device.

Submitted by: Horse Ma <Shichun.Ma@dell.com>
Sponsored by: Mellanox Technologies

4 years agoMFC r359146: Fix SES on device slots without phys after r349321.
Alexander Motin [Thu, 26 Mar 2020 00:42:31 +0000 (00:42 +0000)]
MFC r359146: Fix SES on device slots without phys after r349321.

Broadcom 9400-8i8e HBAs report virtual SES device, where slots representing
external connectors are reported having no phys.  Since sasdev_phys is NULL
there and proto_hdr is a union, ses_paths_iter() misinterpreted them as ATA.
Add explicit protocol check to properly differentiate them.

4 years agoMFC r359057:
Navdeep Parhar [Thu, 26 Mar 2020 00:39:36 +0000 (00:39 +0000)]
MFC r359057:

Remove spurious warning about invalid VPD data.

The warning used to be displayed for valid VPDs about 512B or above in
size.  Fix the size check and add a break while here so that the routine
stops if if detects any problem.

Tested with "pciconf -lV"

Reviewed by: kib@, jhb@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D23679

4 years agoMFC r358860:
Navdeep Parhar [Thu, 26 Mar 2020 00:31:21 +0000 (00:31 +0000)]
MFC r358860:

cxgbe/t4_tom: The MSS in a FLOWC work request must not be 0.

Submitted by: jhb@
Sponsored by: Chelsio Communications

4 years agoMFC r359282
Sergio Carlavilla Delgado [Wed, 25 Mar 2020 20:16:24 +0000 (20:16 +0000)]
MFC r359282
Correct path in EXAMPLES ypldap.conf.5

Submitted by: alex@i.org.ua
Approved by: bcr@(mentor)

4 years agoMFC r359072-r359073
Ryan Moeller [Wed, 25 Mar 2020 16:24:28 +0000 (16:24 +0000)]
MFC r359072-r359073

loader: Add a "kernel.loaded" hook

This hook can be useful, for example to run a local function to choose
different modules to load when a user has picked a different kernel
from the menu.

Reviewed by:    kevans
Approved by:    mav (mentor)
Sponsored by:   iXsystems, Inc.
Differential Revision:  https://reviews.freebsd.org/D24115

4 years agoMFC 359229:
Mateusz Piotrowski [Wed, 25 Mar 2020 08:48:24 +0000 (08:48 +0000)]
MFC 359229:

Use -F instead of -f in tail(1) examples

There is an example in tail(1) manual page explaining how to use tail(1) to
track the contents of /var/log/messages. The example uses the -f flag to
follow the file. The problem with the -f flag is that it cannot handle the
situation where /var/log/messages is rotated. Hence, use -F instead in the
example.

Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D24157

4 years agoMFC r358553: hexdump: tests: take into account byte order
Kyle Evans [Wed, 25 Mar 2020 00:31:42 +0000 (00:31 +0000)]
MFC r358553: hexdump: tests: take into account byte order

Hexdump test was failling on big endian systems when testing decimal, octal
and hexa outputs as the tests were designed on a little endian system. This
revision adds the two distinct flavors of output expected and determines at
runtime which to compare against.

4 years agoMFC r359210:
Sergio Carlavilla Delgado [Tue, 24 Mar 2020 19:09:37 +0000 (19:09 +0000)]
MFC r359210:
Add HISTORY section to exec(3)

Submitted by: gbergling@gmail.com
Approved by: bcr@(mentor)

4 years agoMFC r359031:
Hans Petter Selasky [Mon, 23 Mar 2020 18:31:13 +0000 (18:31 +0000)]
MFC r359031:
Add new USB device ID to u3g driver.

Submitted by: super_gromit@hotmail.com
PR: 244798
Sponsored by: Mellanox Technologies

4 years agoMFC r359046:
Brooks Davis [Mon, 23 Mar 2020 17:45:31 +0000 (17:45 +0000)]
MFC r359046:

Support SUBDIR.${MK_FOO}.${MK_BAR} expresssions.

This allows simplification of Makefiles where some SUBDIR entries depend
on two things (e.g. something that depends on C++ and some other knob).

Discussed with: imp, jhb
Obtained from: CheriBSD
Sponsored by: DARPA

4 years agoMFC r359129:
David Bright [Mon, 23 Mar 2020 12:38:44 +0000 (12:38 +0000)]
MFC r359129:

Fix parameter reversal potentially causing buffer overrun.

Two arguments were reversed in calls to cam_strvis() in
nvme_da.c. This was found by a Coverity scan of this code within Dell
(Isilon). These are also marked in the FreeBSD Coverity scan as CIDs
1400526 & 1400531.

Sponsored by: Dell EMC Isilon

4 years agoMFC r358971:
Ryan Moeller [Sun, 22 Mar 2020 17:13:19 +0000 (17:13 +0000)]
MFC r358971:

TODO DONE: Use sx_xholder in SPL rwlock.h

Approved by: mav (mentor)
Sponsored by: iXsystems, Inc.

4 years agoMFC r358867:
Alan Somers [Sun, 22 Mar 2020 15:24:25 +0000 (15:24 +0000)]
MFC r358867:

fusefs: avoid cache corruption with buggy fuse servers

The FUSE protocol allows the client (kernel) to cache a file's size, if the
server (userspace daemon) allows it. A well-behaved daemon obviously should
not change a file's size while a client has it cached. But a buggy daemon
might. If the kernel ever detects that that has happened, then it should
invalidate the entire cache for that file. Previously, we would not only
cache stale data, but in the case of a file extension while we had the size
cached, we accidentally extended the cache with zeros.

PR: 244178
Reported by: Ben RUBSON <ben.rubson@gmx.com>
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D24012

4 years agoMFC r358798:
Alan Somers [Sun, 22 Mar 2020 15:16:59 +0000 (15:16 +0000)]
MFC r358798:

fusefs: fix fsync for files with multiple open handles

We were reusing a structure for multiple operations, but failing to
reinitialize one member.  The result is that a server that cares about FUSE
file handle IDs would see one correct FUSE_FSYNC operation, and one with the
FHID unset.

PR: 244431
Reported by: Agata <chogata@gmail.com>

4 years agoMFC r358089, r358797
Alan Somers [Sun, 22 Mar 2020 15:03:09 +0000 (15:03 +0000)]
MFC r358089, r358797

r358089:
[skip ci] delete obsolete comment in fusefs tests

It should've been deleted by r349436

r358797:
[skip ci] fix typo in comment in the fusefs tests

4 years agoMFC r357835:
Alan Somers [Sun, 22 Mar 2020 15:01:13 +0000 (15:01 +0000)]
MFC r357835:

fusefs: fix some memory leaks in the tests.

Oddly, most of these were not detected by Coverity.

Reported by: Coverity (one of them, anyway)
Coverity CID: 1404490

4 years agoMFC r353909, r355192, r355218, r355218, r358506, r359005:
Pedro F. Giffuni [Sun, 22 Mar 2020 01:22:44 +0000 (01:22 +0000)]
MFC r353909, r355192, r355218, r355218, r358506, r359005:
calendar(1): Updates and corrections for some calendar files.

PR: 242909, 242918

4 years agoMFC r359070: if_muge: use C99 bool for boolean vars
Ed Maste [Sat, 21 Mar 2020 00:34:28 +0000 (00:34 +0000)]
MFC r359070: if_muge: use C99 bool for boolean vars

4 years agoMFC r359009: if_muge: whitespace and style cleanup
Ed Maste [Sat, 21 Mar 2020 00:32:43 +0000 (00:32 +0000)]
MFC r359009: if_muge: whitespace and style cleanup

4 years agoMFC r359007: muge: drop CSUM from MUGE_DEFAULT_TSO_CSUM_ENABLE
Ed Maste [Sat, 21 Mar 2020 00:31:27 +0000 (00:31 +0000)]
MFC r359007: muge: drop CSUM from MUGE_DEFAULT_TSO_CSUM_ENABLE

TSO is independent of checksum offload

4 years agoMFC r358979: muge: correct RX checksum offload
Ed Maste [Sat, 21 Mar 2020 00:29:16 +0000 (00:29 +0000)]
MFC r358979: muge: correct RX checksum offload

4 years agoMFC: r359060, r359061, r359066
Jung-uk Kim [Fri, 20 Mar 2020 21:43:08 +0000 (21:43 +0000)]
MFC: r359060, r359061, r359066

Merge OpenSSL 1.1.1e.