]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoMFC: r367423
Rick Macklem [Sun, 29 Nov 2020 23:23:08 +0000 (23:23 +0000)]
MFC: r367423
Add support for the new mountd -R option.

r376026 added a new "-R" option to mountd, which tells it to
not support the Mount protocol (not used by NFSv4) and not
register with rpcbind.
Rpcbind is considered a security issue by some sites now.

This patch adds a new yes/no variable called nfsv4_server_only.
When that is set, make vfs.nfsd.server_min_vers=4 and set "=R"
for mountd.
Setting vfs.nfsd.server_min_vers=4 tells nfsd to not register with rpcbind.
While here, add a check for "load_kld nfsd" failing to nfsd.

3 years agoMFC r368084:
Mateusz Piotrowski [Sun, 29 Nov 2020 14:20:42 +0000 (14:20 +0000)]
MFC r368084:

libprocstat.3: Correct two occurrences of kvm_getprocs to procstat_getprocs

Submitted by: otis_sk.freebsd.org
Reviewed by: markj

3 years agoMFC r368083:
Konstantin Belousov [Sun, 29 Nov 2020 10:36:56 +0000 (10:36 +0000)]
MFC r368083:
Remove stray semicolumn.

3 years agoMFC r368082:
Konstantin Belousov [Sun, 29 Nov 2020 10:34:49 +0000 (10:34 +0000)]
MFC r368082:
Style.

3 years agoMFC: r367027
Rick Macklem [Sun, 29 Nov 2020 01:32:53 +0000 (01:32 +0000)]
MFC: r367027
Update man page for -R option added by r376026.

This is a content change.

3 years agoMFC: r367026
Rick Macklem [Sun, 29 Nov 2020 01:22:30 +0000 (01:22 +0000)]
MFC: r367026
Add "-R" option to tell mountd to not register with rpcbind.

rpcbind is now considered a security risk for some sites.
Since an NFSv4 only NFS server does not need rpcbind,
it makes sense to have an option that implements this.

This patch adds a "-R" option that disables the Mount
protocol (not used by NFSv4) and does not register
with rpcbind.

Changes are required to /etc/rc.d/mountd and /etc/rc.d/nfsd.
Those will be in a separate commit.

3 years agoMFC r368047
Peter Grehan [Sun, 29 Nov 2020 00:54:13 +0000 (00:54 +0000)]
MFC r368047
 Remove manual instruction encodings for VMLOAD, VMRUN, and VMSAVE.

3 years agoMFC r367094:
Cy Schubert [Sat, 28 Nov 2020 18:09:16 +0000 (18:09 +0000)]
MFC r367094:

MFV r367082:

Update unbound 1.11.0 --> 1.12.0.

3 years agoMFC r367923:
Konstantin Belousov [Sat, 28 Nov 2020 10:38:00 +0000 (10:38 +0000)]
MFC r367923:
Stop using eventhandlers for itimers subsystem exec and exit hooks.

3 years agoMFC r367918, r367919:
Konstantin Belousov [Sat, 28 Nov 2020 10:36:19 +0000 (10:36 +0000)]
MFC r367918, r367919:
Stop using eventhandler to invoke umtx_exec hook.

3 years agoMFC r366700:
Michal Meloun [Sat, 28 Nov 2020 09:06:51 +0000 (09:06 +0000)]
MFC r366700:

  Add 'netserver' command to EFI loader.

3 years agoMFC r367862: Microoptimize cam_num_doneqs math in xpt_done().
Alexander Motin [Fri, 27 Nov 2020 13:25:12 +0000 (13:25 +0000)]
MFC r367862: Microoptimize cam_num_doneqs math in xpt_done().

3 years agoMFC r367892:
Konstantin Belousov [Fri, 27 Nov 2020 11:51:07 +0000 (11:51 +0000)]
MFC r367892:
Unlock channels when any of them are locked, when returning for non-busy state.

3 years agoMFC r367890:
Konstantin Belousov [Fri, 27 Nov 2020 11:48:33 +0000 (11:48 +0000)]
MFC r367890:
msdosfs: Add trivial support for suspension.

3 years agoMFC r367869:
Kristof Provost [Fri, 27 Nov 2020 11:12:59 +0000 (11:12 +0000)]
MFC r367869:

pf tests: Basic source tracking test

3 years agoMFC r367867:
Kristof Provost [Fri, 27 Nov 2020 11:12:10 +0000 (11:12 +0000)]
MFC r367867:

pf: Fix incorrect assertion

We never set PFRULE_RULESRCTRACK when calling pf_insert_src_node(). We do set
PFRULE_SRCTRACK, so update the assertion to match.

3 years agoMFC r367866: bzgrep: make flag --no-filename work
Eugene Grosbein [Fri, 27 Nov 2020 08:45:43 +0000 (08:45 +0000)]
MFC r367866: bzgrep: make flag --no-filename work

PR: 248813

3 years agoMFC r366132:
Alan Somers [Fri, 27 Nov 2020 04:45:10 +0000 (04:45 +0000)]
MFC r366132:

lib/libc/tests/iconv: raise WARNS to 6

3 years agoMFC r367980:
Cy Schubert [Fri, 27 Nov 2020 03:17:21 +0000 (03:17 +0000)]
MFC r367980:

Fix a typo in a comment.

3 years agoMFC r366131:
Alan Somers [Thu, 26 Nov 2020 23:54:13 +0000 (23:54 +0000)]
MFC r366131:

lib/libc/tests/sys: raise WARNS to 6

3 years agoMFC r366118:
Alan Somers [Thu, 26 Nov 2020 23:44:57 +0000 (23:44 +0000)]
MFC r366118:

Fix some signed/unsigned comparison warnings in NFS

Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D26533

3 years agoMFC r365956:
Alan Somers [Thu, 26 Nov 2020 23:35:13 +0000 (23:35 +0000)]
MFC r365956:

fsx: fix build with WARNS=6

* signed/unsigned comparisons
* use standard warn(3)
* Suppress warnings about local vars and funcs not declared static
* const-correctness
* declaration shadows a variable in the global scope

Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D26516

3 years agoMFC r365910:
Alan Somers [Thu, 26 Nov 2020 23:34:02 +0000 (23:34 +0000)]
MFC r365910:

fix integer underflow in getgrnam_r and getpwnam_r

Sometimes nscd(8) will return a 1-byte buffer for a nonexistent entry. This
triggered an integer underflow in grp_unmarshal_func, causing getgrnam_r to
return ERANGE instead of 0.

Fix the user's buffer size check, and add a correct check for a too-small
nscd buffer.

PR: 248932
Event: September 2020 Bugathon
Reviewed by: markj
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D26204

3 years agoMFC r367849:
Mark Johnston [Thu, 26 Nov 2020 14:57:30 +0000 (14:57 +0000)]
MFC r367849:
callout(9): Fix a race between CPU migration and callout_drain()

3 years agoAdd missing NET_EPOCH_EXIT() to if_bridge
Kristof Provost [Thu, 26 Nov 2020 10:17:56 +0000 (10:17 +0000)]
Add missing NET_EPOCH_EXIT() to if_bridge

In r367706 one return in bridge_input() did not NET_EPOCH_EXIT(), which caused
seemingly random panics on the next use of NET_EPOCH.

Direct commit to stable/12, because this code is different in CURRENT.

3 years agoMFC r367613:
Konstantin Belousov [Thu, 26 Nov 2020 07:31:30 +0000 (07:31 +0000)]
MFC r367613:
bhyve: remove a hack to map all 8G BARs 1:1

3 years agoMFC r367607:
Konstantin Belousov [Thu, 26 Nov 2020 07:30:29 +0000 (07:30 +0000)]
MFC r367607:
bhyve: increase allowed size for 64bit BAR allocation below 4G from 32 to 128 MB.

3 years agoMFC r367606:
Konstantin Belousov [Thu, 26 Nov 2020 07:29:28 +0000 (07:29 +0000)]
MFC r367606:
bhyve: avoid allocating BARs above the end of supported physical addresses.

3 years agoMFC r367936
Vincenzo Maffione [Wed, 25 Nov 2020 21:25:17 +0000 (21:25 +0000)]
MFC r367936

netmap: bridge: improve readability

Multiple cosmetic changes, plus a fix to a verbose print
(indicating wrong net->host/host->net direction).

3 years agoMFC r367935
Vincenzo Maffione [Wed, 25 Nov 2020 21:24:39 +0000 (21:24 +0000)]
MFC r367935

netmap: valectl: switch to libnetmap

Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h

3 years agoMFC r367934
Vincenzo Maffione [Wed, 25 Nov 2020 21:23:58 +0000 (21:23 +0000)]
MFC r367934

netmap: nmreplay: switch to libnetmap

Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h

3 years agoMFC r367933
Vincenzo Maffione [Wed, 25 Nov 2020 21:23:13 +0000 (21:23 +0000)]
MFC r367933

netmap: lb: switch to libnetmap

Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h

3 years agoMFC r367932
Vincenzo Maffione [Wed, 25 Nov 2020 21:22:16 +0000 (21:22 +0000)]
MFC r367932

netmap: pkt-gen: switch to libnetmap

Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h

3 years agoMFC r367931
Vincenzo Maffione [Wed, 25 Nov 2020 21:20:55 +0000 (21:20 +0000)]
MFC r367931

netmap: bridge: switch to libnetmap

Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h

3 years agoMFC r351700: libc: Use musl's optimized memchr
Ed Maste [Wed, 25 Nov 2020 18:36:38 +0000 (18:36 +0000)]
MFC r351700: libc: Use musl's optimized memchr

Parentheses added to HASZERO macro to avoid a GCC warning.

Sponsored by: The FreeBSD Foundation

3 years agoMFC: Merge ENA v2.3.0 driver
Marcin Wojtas [Wed, 25 Nov 2020 03:24:43 +0000 (03:24 +0000)]
MFC: Merge ENA v2.3.0 driver

r367805 Update ENA driver version to v2.3.0
r367803 Rename descriptions of the supported ENA devices
r367802 Add ENI metrics for the ENA driver
r367801 Add SPDX license tag to the ENA driver files
r367800 Add Rx offsets support for the ENA driver
r367799 Adjust ENA driver files to latest ena-com changes
r367795 Fix completion descriptors alignment for the ENA

Obtained from:  Semihalf
Sponsored by:   Amazon, Inc

3 years agoMFC r367920, r367921
Vincenzo Maffione [Tue, 24 Nov 2020 19:55:01 +0000 (19:55 +0000)]
MFC r367920, r367921

netmap: bridge: update man page with more information

Update the man page to describe how it is necessary to
enable promiscuous mode and/or disable offloads.

3 years agoMFCr367741:
Konstantin Belousov [Tue, 24 Nov 2020 13:19:31 +0000 (13:19 +0000)]
MFCr367741:
vmem: trivial warning and style fixes.

3 years agoMFC r367044: Introduce support of SCSI Command Priority.
Alexander Motin [Tue, 24 Nov 2020 13:17:12 +0000 (13:17 +0000)]
MFC r367044: Introduce support of SCSI Command Priority.

SAM-3 specification introduced concept of Task Priority, that was renamed
to Command Priority in SAM-4, and supported by all modern SCSI transports.
It provides 15 levels of relative priorities: 1 - highest, 15 - lowest and
0 - default.  SAT specification for SATA devices translates priorities 1-3
into NCQ high priority.

This change adds new "priority" field into empty spots of struct ccb_scsiio
and struct ccb_accept_tio of CAM and struct ctl_scsiio of CTL.  Respective
support is added into iscsi(4), isp(4), mpr(4), mps(4) and ocs_fc(4) drivers
for both initiator and where applicable target roles.  Minimal support was
added to CTL to receive the priority value from different frontends, pass it
between HA controllers and report in few places.

This patch does not add consumers of this functionality, so nothing should
really change yet, since the field is still set to 0 (default) on initiator
and not actively used on target.  Those are to be implemented separately.

I've confirmed priority working on WD Red SATA disks connected via mpr(4)
and properly transferred to CTL target via iscsi(4), isp(4) and ocs_fc(4).

While there, added missing tag_action support to ocs_fc(4) initiator role.

3 years agoMFC r366922, r367915, r367916:
Alexander Motin [Tue, 24 Nov 2020 00:30:47 +0000 (00:30 +0000)]
MFC r366922, r367915, r367916:
Pass lower 3 bits of sector_count for FPDMA commands.

When this code was written those bits were N/A, but now the lowest bit
is Rebuild Assist Recovery Control (RARC).

3 years agoMFC r367502:
Navdeep Parhar [Tue, 24 Nov 2020 00:27:21 +0000 (00:27 +0000)]
MFC r367502:

cxgbe(4): Allow the PF driver to set a VF's MAC address.

The MAC address can be set with the optional mac-addr property in the VF
section of the iovctl.conf(5) used to instantiate the VFs.

Sponsored by: Chelsio Communications

3 years agoMFC r367497:
Navdeep Parhar [Tue, 24 Nov 2020 00:25:03 +0000 (00:25 +0000)]
MFC r367497:

cxgbev(4): Use the MAC address set by the the PF if there is one.

Query the firmware for the MAC address set by the PF for the VF and use
it instead of the firmware generated MAC if it's available.

Sponsored by: Chelsio Communications

3 years agoMFC r367428 and r367495.
Navdeep Parhar [Tue, 24 Nov 2020 00:22:33 +0000 (00:22 +0000)]
MFC r367428 and r367495.

r367428:
cxgbe(4):  Update firmwares to 1.25.0.40.

This fixes a potential crash in firmware 1.25.0.0 on the passive open
side during TOE operation.

r367495:
cxgbe(4): Add the firmware binaries missing in r367428.

Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications

3 years agoMFC r366929 and r367608.
Navdeep Parhar [Tue, 24 Nov 2020 00:17:05 +0000 (00:17 +0000)]
MFC r366929 and r367608.

r366929:
cxgbe(4): fix the size of the iq/eq maps.

The firmware can allocate ingress and egress context ids anywhere from
its configured range.  Size the iq/eq maps to match the entire range
instead of assuming that the firmware always allocates the first
available context id.

Reported by: Baptiste Wicht @ Verisign

r367608:
cxgbev(4): Make sure that the iq/eq map sizes are correct for VFs.

This should have been part of r366929.

Sponsored by: Chelsio Communications

3 years agoMFC r366916:
Navdeep Parhar [Tue, 24 Nov 2020 00:12:42 +0000 (00:12 +0000)]
MFC r366916:

cxgbe(4): display correct tid range for T6 based -SO cards.

Reported by: Chelsio QA
Sponsored by: Chelsio Communications

3 years agoMFC r366853:
Navdeep Parhar [Tue, 24 Nov 2020 00:07:22 +0000 (00:07 +0000)]
MFC r366853:

cxgbe(4): Fix page fault in t4_get_lb_stats with 2 port T5 cards.

PR: 250449
Reported by: freqlabs@
Sponsored by: Chelsio Communications

3 years agoMFC r366696:
Navdeep Parhar [Tue, 24 Nov 2020 00:02:14 +0000 (00:02 +0000)]
MFC r366696:

cxgbe(4): Do not request FEC when requesting speeds that don't have FEC.

Sponsored by: Chelsio Communications

3 years agoMFC r366694:
Navdeep Parhar [Mon, 23 Nov 2020 23:58:14 +0000 (23:58 +0000)]
MFC r366694:

cxgbe(4): unimplemented cudbg routines should return the correct
internal error code and not an errno.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

3 years agoMFC r366532 and r366862.
Navdeep Parhar [Mon, 23 Nov 2020 23:53:21 +0000 (23:53 +0000)]
MFC r366532 and r366862.

r366532:
cxgbe(4): knobs to drop various kinds of undesirable frames on ingress.

These kind of drops come for free in the sense that they do not use the
filter TCAM or any other resource that wouldn't normally be used during
rx.  Frames dropped by the hardware get counted in the MAC's rx stats
but are not delivered to the driver.

hw.cxgbe.attack_filter
Set to 1 to enable the "attack filter".  Default is 0.  The attack
filter will drop an incoming frame if any of these conditions is true:
src ip/ip6 == dst ip/ip6; tcp and src/dst ip is not unicast; src/dst ip
is loopback (127.x.y.z); src ip6 is not unicast; src/dst ip6 is loopback
(::1/128) or unspecified (::/128); tcp and src/dst ip6 is mcast
(ff00::/8).

hw.cxgbe.drop_ip_fragments
Set to 1 to drop all incoming IP fragments.  Default is 0.  Note that
this drops valid frames.

hw.cxgbe.drop_pkts_with_l2_errors
Set to 1 to drop incoming frames with Layer 2 length or checksum errors.
Default is 1.

hw.cxgbe.drop_pkts_with_l3_errors
Set to 1 to drop incoming frames with IP version, length, or checksum
errors.  Default is 0.

hw.cxgbe.drop_pkts_with_l4_errors
Set to 1 to drop incoming frames with Layer 4 length, checksum, or other
errors.  Default is 0.

r366862:
cxgbe(4): Updates to the drop features from r366532.

Sponsored by: Chelsio Communications

3 years agoMFC r365732 and r366589.
Navdeep Parhar [Mon, 23 Nov 2020 23:46:07 +0000 (23:46 +0000)]
MFC r365732 and r366589.

r365732:
cxgbe(4): Get the count of FCS errors from the MAC and not MPS for T6 ports.

The MPS register on the T6 counts something other than FCS errors despite its
name.

r366589:
cxgbe(4): More fixes for the T6 FCS error counter.

r365732 was the first attempt to get an accurate count but it was
writing to some read-only registers to clear them and that obviously
didn't work.  Instead, note the counter's value when it is supposed to
be cleared and subtract it from future readings.

dev.<port>.stats.rx_fcs_error should not be serviced from the MPS
register for T6.

The stats.* sysctls should all use T5_PORT_REG for T5 and above.  This
must have been missed in the initial T5 support years ago.  Fix it while
here.

Sponsored by: Chelsio Communications

3 years agoMFC r367807
Justin Hibbits [Mon, 23 Nov 2020 16:26:49 +0000 (16:26 +0000)]
MFC r367807

Fix octeon_pmc post-r334827

Sponsored by: Juniper Networks, Inc

3 years agoMFC r366969, r366973:
Mark Johnston [Sun, 22 Nov 2020 18:54:14 +0000 (18:54 +0000)]
MFC r366969, r366973:
ntb: Add Intel Xeon Gen3 support

3 years agoMFC r366953: Negotiate iSCSIProtocolLevel of 2 (RFC 7144) in initiator.
Alexander Motin [Sat, 21 Nov 2020 00:40:59 +0000 (00:40 +0000)]
MFC r366953: Negotiate iSCSIProtocolLevel of 2 (RFC 7144) in initiator.

It does not change anything immediately, but allows further support of
Command Priority, Status Qualifier and new task management functions.

3 years agoMFC r367640:
Mateusz Piotrowski [Fri, 20 Nov 2020 10:27:54 +0000 (10:27 +0000)]
MFC r367640:

Explicitly note in the EXAMPLES section that uname(3) contains more details

3 years agoMFC r367419:
Mateusz Piotrowski [Fri, 20 Nov 2020 10:09:48 +0000 (10:09 +0000)]
MFC r367419:

Fix a typo and remove Xr's to vn(4) and vnconfig(4)

"mandoc -Tlint" complained about the Xr to vnconfig, which was removed in
r238202.  I am not sure but maybe it's time to do the same to vn(4).

3 years agoMFC r367709
Peter Grehan [Fri, 20 Nov 2020 03:33:30 +0000 (03:33 +0000)]
MFC r367709
    Fix regression in AHCI controller settings.

PR: 250924
Submitted by: Rolf Stalder
Reported by: Rolf Stalder
Relnotes: Yes

3 years agoMFC r367630: Improve nvmecontrol error reporting.
Alexander Motin [Fri, 20 Nov 2020 00:30:58 +0000 (00:30 +0000)]
MFC r367630: Improve nvmecontrol error reporting.

3 years agoMFC r366506, r366511:
Alexander Motin [Fri, 20 Nov 2020 00:30:07 +0000 (00:30 +0000)]
MFC r366506, r366511:
nvmecontrol: Update wdc module for newer WDC NVMe products

Update the to log fetch operation for latest WDC NVMe products.

Tested on HGST SN100 (a few years old) and WDC SN720 (more recent).

Submitted by: Akhilesh Rn <Akhilesh.RN@wdc.com> (minor style tweak by me)
Github PR: 435

3 years agoMFC r367612:
Konstantin Belousov [Thu, 19 Nov 2020 09:17:41 +0000 (09:17 +0000)]
MFC r367612:
mlx5en: Set ifmr_current same as ifmr_active.

3 years agoMFC r367611:
Konstantin Belousov [Thu, 19 Nov 2020 09:16:22 +0000 (09:16 +0000)]
MFC r367611:
mlx5en: stop ignoring pauses and flow in the media reqs.

3 years agoMFC r367610:
Konstantin Belousov [Thu, 19 Nov 2020 09:15:04 +0000 (09:15 +0000)]
MFC r367610:
mlx5en: Register all combinations of FDX/RXPAUSE/TXPAUSE as valid media types.

3 years agoMFC r367609:
Konstantin Belousov [Thu, 19 Nov 2020 09:13:23 +0000 (09:13 +0000)]
MFC r367609:
mlx5en: Refactor repeated code to register media type to mlx5e_ifm_add().

3 years agoMFC r367398:
Konstantin Belousov [Thu, 19 Nov 2020 09:09:19 +0000 (09:09 +0000)]
MFC r367398:
Suspend all writeable local filesystems on power suspend.

3 years agoMFC r367625: Fix panic if NVMe is detached before the intrhook call.
Alexander Motin [Thu, 19 Nov 2020 02:44:08 +0000 (02:44 +0000)]
MFC r367625: Fix panic if NVMe is detached before the intrhook call.

3 years agoMFC r367596:
Mark Johnston [Wed, 18 Nov 2020 14:27:47 +0000 (14:27 +0000)]
MFC r367596:
iflib: Free full mbuf chains when draining transmit queues

3 years agoMFC r367588:
Mark Johnston [Wed, 18 Nov 2020 14:27:24 +0000 (14:27 +0000)]
MFC r367588:
Fix a pair of races in SIGIO registration

3 years agoMFC r367594:
Andrey V. Elsukov [Wed, 18 Nov 2020 13:52:13 +0000 (13:52 +0000)]
MFC r367594:
  Fix possible NULL pointer dereference.

  lagg(4) replaces if_output method of its child interfaces and expects
  that this method can be called only by child interfaces. But it is
  possible that lagg_port_output() could be called by children of child
  interfaces. In this case ifnet's if_lagg field is NULL. Add check that
  lp is not NULL.

3 years agoMFC r367552:
Mateusz Piotrowski [Wed, 18 Nov 2020 09:00:05 +0000 (09:00 +0000)]
MFC r367552:

Do not document MOTIFLIB in ports(7)

Perhaps it made sense in 1998 (r32836), but now it feels a bit out of
place.  We tend to avoid documenting non-essential ports variables in
the manual page (we try to document them in the Porter's Handbook instead).

3 years agoMFC r367600: Make CTL nicer to increased MAXPHYS.
Alexander Motin [Wed, 18 Nov 2020 02:05:59 +0000 (02:05 +0000)]
MFC r367600: Make CTL nicer to increased MAXPHYS.

Before this CTL always allocated MAXPHYS-sized buffers, even for 4KB I/O,
that is even more overkill for MAXPHYS of 1MB.  This change limits maximum
allocation to 512KB if MAXPHYS is bigger, plus if one is above 128KB, adds
new 128KB UMA zone for smaller I/Os.  The patch factors out alloc/free,
so later we could make it use more zones or malloc() if we'd like.

3 years agoMFC r367008: TCP Cubic: improve reaction to (and rollback from) RTO
Richard Scheffenegger [Tue, 17 Nov 2020 08:11:17 +0000 (08:11 +0000)]
MFC r367008: TCP Cubic: improve reaction to (and rollback from) RTO

fix compliancy issue of CUBIC RTO handling according to RFC8312 section 4.7
add CUBIC CC_RTO_ERR handling

Submitted by: chengc_netapp.com
Reviewed by: rrs, tuexen, rscheff
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D26808

3 years agoMFC r367007: tcp: move cwnd and ssthresh updates into cc modules
Richard Scheffenegger [Tue, 17 Nov 2020 08:03:49 +0000 (08:03 +0000)]
MFC r367007: tcp: move cwnd and ssthresh updates into cc modules

This will pave the way of setting ssthresh differently in TCP CUBIC, according
to RFC8312 section 4.7.

Use dynamic tcp_maxseg() adjusting for tcp options instead of static t_maxseg.

Submitted by: chengc_netapp.com
Reviewed by: rrs, tuexen, rscheff
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D26807

3 years agoMFC of 367045.
Kirk McKusick [Tue, 17 Nov 2020 06:04:16 +0000 (06:04 +0000)]
MFC of 367045.

Avoid improper sign extension in Pass5 inumber checks.

Sponsored by: Netflix

3 years agoMFC of 367035.
Kirk McKusick [Tue, 17 Nov 2020 05:59:55 +0000 (05:59 +0000)]
MFC of 367035.

Require clean superblock for tunefs, growfs, and fsirand

Sponsored by: Netflix

3 years agoMFC of 340927 and 367034.
Kirk McKusick [Tue, 17 Nov 2020 05:48:00 +0000 (05:48 +0000)]
MFC of 340927 and 367034.

Move clear of UFS feature flags from ufs_mountfs() to ffs_sbget() to
ensure that the appropriate feature flags get cleared by filesystem
utilities as well as the kernel when they modify the filesystem.

Note 340927 is relevant for this even though it was done for a
different reason at the time.

Sponsored by: Netflix

3 years agoMFC r367545: ng_nat: unbreak ABI
Eugene Grosbein [Tue, 17 Nov 2020 05:00:23 +0000 (05:00 +0000)]
MFC r367545: ng_nat: unbreak ABI

The revision r342168 broke ABI of ng_nat needlessly and
the change was merged to stable branches breaking ABI there, too.
Unbreak it.

PR: 250722

3 years agoMFC: 367628, 367635, 367645
George V. Neville-Neil [Tue, 17 Nov 2020 01:02:00 +0000 (01:02 +0000)]
MFC: 367628, 367635, 367645

An earlier commit effectively turned out the fast forwading path
  due to its lack of support for ICMP redirects. The following commit
  adds redirects to the fastforward path, again allowing for decent
  forwarding performance in the kernel.

  Reviewed by: ae, melifaro (also helped with the MFC)
  Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")

3 years agoMFC r367659: Add PMRCAP printing and fix earlier CAP_HI.
Alexander Motin [Tue, 17 Nov 2020 00:35:59 +0000 (00:35 +0000)]
MFC r367659: Add PMRCAP printing and fix earlier CAP_HI.

3 years agoMFC r367178:
Mitchell Horne [Mon, 16 Nov 2020 17:45:42 +0000 (17:45 +0000)]
MFC r367178:
arm64: set the correct partition type in make-memstick.sh

3 years agoMFC r367177:
Mitchell Horne [Mon, 16 Nov 2020 17:44:34 +0000 (17:44 +0000)]
MFC r367177:
arm64: convert virtual machine images to GPT

3 years agoMFC r367176:
Mitchell Horne [Mon, 16 Nov 2020 17:42:22 +0000 (17:42 +0000)]
MFC r367176:
vmimage.subr: noisier failure for unsupported targets

3 years agoMFC r367175:
Mitchell Horne [Mon, 16 Nov 2020 17:41:05 +0000 (17:41 +0000)]
MFC r367175:
Slight refactor in vmimage.subr

3 years agoMFC r367617:
Mark Johnston [Mon, 16 Nov 2020 16:53:46 +0000 (16:53 +0000)]
MFC r367617:
qat: Fix nits reported by Coverity

3 years agoMFC r367639:
Mateusz Piotrowski [Mon, 16 Nov 2020 11:57:49 +0000 (11:57 +0000)]
MFC r367639:

Reference setprogname(3) in setproctitle(3)

The reference to setproctitle(3) in the setprogname(3) manual is already
in place.

3 years agoMFC r367253:
Mateusz Piotrowski [Sun, 15 Nov 2020 12:28:57 +0000 (12:28 +0000)]
MFC r367253:

Document how to use sudo for SU_CMD

It is rather common for the ports users to replace su(1) with sudo(8)
within the SU_CMD variable. Let's document it in the manual page (so far
it's been hidden in a comment within bsd.commands.mk).

3 years agoMFC r366500:
Kristof Provost [Sun, 15 Nov 2020 11:56:16 +0000 (11:56 +0000)]
MFC r366500:

bridge: call member interface ioctl() without NET_EPOCH

We're not allowed to hold NET_EPOCH while sleeping, so when we call ioctl()
handlers for member interfaces we cannot be in NET_EPOCH.  We still need some
protection of our CK_LISTs, so hold BRIDGE_LOCK instead.

That requires changing BRIDGE_LOCK into a sleepable lock, and separating the
BRIDGE_RT_LOCK, to protect bridge_rtnode lists. That lock is taken in the data
path (while in NET_EPOCH), so it cannot be a sleepable lock.

While here document the locking strategy.

3 years agobridge: epoch-ification
Kristof Provost [Sun, 15 Nov 2020 11:46:44 +0000 (11:46 +0000)]
bridge: epoch-ification

Undo the revert (r363568). This commit still violates epoch rules by sleeping
within NET_EPOCH. That will be resolved in the following commit.

3 years agoMFC r367623:
Dimitry Andric [Sun, 15 Nov 2020 11:28:02 +0000 (11:28 +0000)]
MFC r367623:

Merge commit 8df4e6094 from llvm git (by Fangrui Song):

  [ELF] Don't consider SHF_ALLOC ".debug*" sections debug sections

  Fixes PR48071

  * The Rust compiler produces SHF_ALLOC `.debug_gdb_scripts` (which
    normally does not have the flag)
  * `.debug_gdb_scripts` sections are removed from `inputSections` due
    to --strip-debug/--strip-all
  * When processing --gc-sections, pieces of a SHF_MERGE section can be
    marked live separately

  `=>` segfault when marking liveness of a `.debug_gdb_scripts` which
  is not split into pieces (because it is not in `inputSections`)

  This patch circumvents the problem by not treating SHF_ALLOC
  ".debug*" as debug sections (to prevent --strip-debug's stripping)
  (which is still useful on its own).

  Reviewed By: grimar

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

This should fix lld segfaulting when linking the rust-based parts of the
devel/py-maturin port.

Reported by: Nick Venenga <nijave@gmail.com>
PR: 250783

3 years agoMFC r366231: Address whitespace nits in subr_rtc.c
Kyle Evans [Sat, 14 Nov 2020 20:45:12 +0000 (20:45 +0000)]
MFC r366231: Address whitespace nits in subr_rtc.c

These were separated out from a nearby patch from Andrew Gierth.

3 years agoMFC r365883: pkgbase: use consistent annotation for object keys
Kyle Evans [Sat, 14 Nov 2020 20:44:34 +0000 (20:44 +0000)]
MFC r365883: pkgbase: use consistent annotation for object keys

Everywhere else we use objects ("scripts", generally) we do specify the
optional colon. Be consistent and do the same for directories.

PR: 249273

3 years agoMFC r367604: umtx: drop incorrect timespec32 definition
Kyle Evans [Sat, 14 Nov 2020 15:33:39 +0000 (15:33 +0000)]
MFC r367604: umtx: drop incorrect timespec32 definition

This works for amd64, but none others -- drop it, because we already have a
proper definition in sys/compat/freebsd32/freebsd32.h that correctly uses
time32_t.

3 years agoMFC r366819: libbe(3): const'ify a couple arguments
Kyle Evans [Sat, 14 Nov 2020 15:26:18 +0000 (15:26 +0000)]
MFC r366819: libbe(3): const'ify a couple arguments

libbe will never need to mutate these as we either process them into a local
buffer or we just don't touch them and write to a separate out argument.

3 years agoMFC r366820-r366821: libbe(3) documentation improvements
Kyle Evans [Sat, 14 Nov 2020 15:21:20 +0000 (15:21 +0000)]
MFC r366820-r366821: libbe(3) documentation improvements

r366820:
libbe(3): document be_snapshot()

While toying around with lua bindings for libbe(3), I discovered that I
apparently never documented this, despite having documented
be_is_auto_snapshot_name that references it.

r366821:
libbe(3): install MLINKS for all of the functions provided

3 years agoMFC r366769: MFC r366760: lua: update to 5.3.6
Kyle Evans [Sat, 14 Nov 2020 15:19:36 +0000 (15:19 +0000)]
MFC r366769: MFC r366760: lua: update to 5.3.6

This release contains some minor bugfixes; notably:
- 2x minor Makefile fixes (not used in base)
- Long brackets with a huge number of '=' overflow some internal buffer
  arithmetic.
- Joining an upvalue with itself can cause a use-after-free crash.

See here for examples: http://www.lua.org/bugs.html#5.3.5

3 years agoMFC r366580: bpf(4): Update the man page to reflect reality
Gordon Bergling [Sat, 14 Nov 2020 14:15:49 +0000 (14:15 +0000)]
MFC r366580: bpf(4): Update the man page to reflect reality

PR: 131918
Submitted by: guy at alum dot mit dot edu
Reviewed by: gnn, gbe
Approved by: gnn
Differential Revision: https://reviews.freebsd.org/D25993

3 years agoMFC r367239-367241:
Vladimir Kondratyev [Sat, 14 Nov 2020 12:02:50 +0000 (12:02 +0000)]
MFC r367239-367241:

r367239:
Add plug and play information macroses for ACPI and I2C buses.

Matching table format is compatible with ACPI_ID_PROBE bus method.

Note that while ACPI_ID_PROBE matches against _HID and all _CIDs, current
acpi_pnpinfo_str() exports only _HID and first _CID.  That means second
and further _CIDs should be added to both acpi_pnpinfo_str() and
ACPICOMPAT_PNP_INFO if device matching against them is required.

r367240:
acpi_wmi(4): Add ACPI_PNP_INFO

r367241:
acpi_dock(4): Add ACPI_PNP_INFO

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D26824

3 years agoMFC r367237:
Vladimir Kondratyev [Sat, 14 Nov 2020 11:51:37 +0000 (11:51 +0000)]
MFC r367237:

devmatch(8): Respect mask field when matching strings of Z type.

While here, add debug output for this action.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D26823

3 years agoMFC r367230:
Vladimir Kondratyev [Sat, 14 Nov 2020 11:48:28 +0000 (11:48 +0000)]
MFC r367230:

ig4(4): Add PCI IDs for Intel Comet Lake I2C controllers.

3 years agoMFC r366770: libc: typo fix (s/involes/involves)
Kyle Evans [Sat, 14 Nov 2020 02:11:56 +0000 (02:11 +0000)]
MFC r366770: libc: typo fix (s/involes/involves)

3 years agoMFC r366435: lualoader: improve the design of the brand-/logo- mechanism
Kyle Evans [Sat, 14 Nov 2020 02:11:04 +0000 (02:11 +0000)]
MFC r366435: lualoader: improve the design of the brand-/logo- mechanism

In the previous world order, any brand/logo was forced to pull in the
drawer and call drawer.add{Brand,Logo} with the name their brand/logo is
taking and a table describing it.

In the new world order, these files just need to return a table that maps
out graphics types to a table of the exact same format as what was
previously being passed back into the drawer. The appeal here is not needing
to grab a reference back to the drawer module and having a cleaner
data-driven looking format for these. The format has been renamed to 'gfx-*'
prefixes and each one can provide a logo and a brand.

drawer.addBrand/drawer.addLogo will remain in place until FreeBSD 13, as
there's no overhead to them and it's not yet worth the break in
compatibility with any pre-existing brands and logos.

3 years agoMFC r366275: Makefile.inc1: sysent: parallel subordinate sysent targets
Kyle Evans [Sat, 14 Nov 2020 02:03:34 +0000 (02:03 +0000)]
MFC r366275: Makefile.inc1: sysent: parallel subordinate sysent targets

makesyscalls.lua (and indeed makesyscalls.sh) are both safe to be run in
parallel, so let's do it.

This is a trivial difference because runtime per-target is pretty small, but
I like seeing it run in parallel when my muscle memory types `make -sj4`.