Commit Graph

21741 Commits

Author SHA1 Message Date
Alexander Motin
a58536b91a pci: Disable Electromechanical Interlock.
Add sysctl/tunable to control Electromechanical Interlock support.
Disable it by default since Linux does not do it either and it seems
the number of systems having it broken is higher than having working.

This fixes NVMe backplane operation on ASUS RS500A-E11-RS12U server
with AMD EPYC 7402 CPU, where attempts to control reported interlock
for some reason end up in PCIe link loss, while interlock status does
not change (it is not really there).

MFC after:	2 weeks
2022-10-04 10:34:15 -04:00
John Baldwin
67b0751249 bsd.sys.mk: Add NO_WUSE_AFTER_FREE helper variable.
This variable expands to -Wno-use-after-free on GCC 12+.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D36817
2022-10-03 16:10:42 -07:00
Richard Scheffenegger
0924ae8f47 tcp: allow window scale and timestamps to be toggled individually
Simple change to allow for the individual toggling of
RFC7323 window scaling and timestamp option.

Reviewed By:    	rrs, tuexen, glebius, guest-ccui, #transport
Sponsored by:   	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D36863
2022-10-03 19:21:46 +02:00
Doug Moore
368ee2f86a rb_tree: let insert search start from next node
When the node to insert in the rb_tree is known to precede or follow a
particular node, new methods RB_INSERT_PREV and RB_INSERT_NEXT,
defined here, allow the search for where to insert the new node begin
with that particular node, rather than at the root, to save a bit of
time.

Using those methods, instead of RB_INSERT, in managing a tree in
iommu_gas.c, saves a little time.

Reviewed by:	kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D35516
2022-10-02 22:27:21 -05:00
Dag-Erling Smørgrav
0aa2700123 Put OPIE to rest.
Differential Revision: https://reviews.freebsd.org/D36592
2022-10-02 03:37:29 +02:00
Rene Ladan
83578bd40f organization.dot: add pizzamig to portmgr 2022-10-01 18:18:31 +02:00
Brooks Davis
b4cfdbfed2 manpages: Remove telnetd references
Mostly remove from the SEE ALSO section, adding a mention of the port
where not removed. Elsewhere, remove as appropriate and change from .Xr
to .Nm where a mention of telnetd continues to make sense (or removing
it would require significant reworking of the surrounding text).

Reviewed by:	imp, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D36785
2022-09-29 17:56:41 +01:00
John Baldwin
409dae262f bsd.sys.mk: Add NO_WARRAY_PARAMETER helper variable.
This variable expands to -Wno-array-parameter on GCC 11+.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D36756
2022-09-28 14:01:04 -07:00
Goran Mekic
f092c21bf6 snd_uaudio(4): Add some examples accessing USB MIDI devices.
Differential Revision:	https://reviews.freebsd.org/D36195
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-09-27 20:04:14 +02:00
Randall Stewart
08af8aac2a Tcp progress timeout
Rack has had the ability to timeout connections that just sit idle automatically. This
feature of course is off by default and requires the user set it on (though the socket option
has been missing in tcp_usrreq.c). Lets get the progress timeout fully supported in
the base stack as well as rack.

Reviewed by: tuexen
Sponsored by: Netflix Inc
Differential Revision: https://reviews.freebsd.org/D36716
2022-09-27 13:38:20 -04:00
Mark Johnston
b3ab58bd43 man9: Add MLINKs for bus_space_{peek,poke}
MFC after:	1 week
2022-09-26 09:28:57 -04:00
Konstantin Belousov
550e01c552 snp(4): implement detach
PR:	257964
Reported by:	Bertrand Petit <bsdpr@phoe.frmug.org>
Reviewed by:	imp, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D36690
2022-09-25 23:36:16 +03:00
Konstantin Belousov
bb4be76cf3 snp(4): properly report detached/revoked ttys
PR:	257964
Reported by:	Bertrand Petit <bsdpr@phoe.frmug.org>
Reviewed by:	imp, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D36690
2022-09-25 23:36:16 +03:00
Philip Paeps
da038df8c9 share/zoneinfo: don't build obsolete SystemV zones
The /usr/share/zoneinfo/SystemV directory has been empty on FreeBSD
since 2006.  The upstream source file was removed in 2020.  Also stop
passing yearisdate to zic(8).  This has not been necessary for years.
The script has been removed upstream since 2020.

MFC after:	3 days
2022-09-25 13:54:20 +08:00
Brooks Davis
8232a1edda cpuset(9): Refer to CPU_SETSIZE not MAXCPU
The maximum CPU number of a cpuset_t is determined by CPU_SETSIZE. In
the kernel this is MAXCPU, but in userspace it is CPU_MAXSIZE unless
CPU_SETSIZE is defined before including sys/_cpuset.h. CPU_MAXSIZE is
256 and in userspace MAXCPU is generally 1 because it being set to a
larger MD value is gated on SMP being defined (not generally the case in
userspace).

Reported by:	Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Reviewed by:	cem, jhb
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D36679
2022-09-23 21:20:52 +01:00
Maxim Konovalov
7e58c8aa82 iwlwifi.4: typo fixed
PR:	266554
2022-09-22 22:35:16 +00:00
Doug Moore
b16f993ec2 rb_tree: augmentation shortcut
RB-tree augmentation maintains data in each node of the tree that
represents the product of some associative operator applied to all the
nodes of the subtree rooted at that node. If a node in the tree
changes, augmentation data for the node is updated for that node and
all nodes on the path from that node to the tree root. However,
sometimes, augmenting a node changes no data in that node,
particularly if the associated operation is something involving 'max'
or 'min'. If augmentation changes nothing in a node, then the work of
walking to the tree root from that point is pointless, because
augmentation will change nothing in those nodes either. This change
makes it possible to avoid that wasted work.

Define RB_AUGMENT_CHECK as a macro much like RB_AUGMENT, but which
returns a value 'true' when augmentation changes the augmentation data
of a node, and false otherwise. Change code that unconditionally walks
and augments to the top of tree to code that stops once an
augmentation has no effect. In the case of rebalancing the tree after
insertion or deletion, where previously a node rotated into the path
was inevitably augmented on the march to the tree root, now check to
see if it needs augmentation because the march to the tree root
stopped before reaching it.

Change the augmentation function in iommu_gas.c so that it returns
true/false to indicate whether the augmentation had any effect.

Reviewed by:	alc, kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D36509
2022-09-20 23:21:14 -05:00
Jake Freeland
f697b9432d linuxkpi: drm-kmod debugfs support
This diff extends LinuxKPI to support simple attribute files in debugfs.
These simple attributes are an essential component for compiling drm-kmod
with CONFIG_DEBUG_FS enabled.
This will allow for easier graphics driver debugging using
Intel's igt-gpu-tools.

Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D35883
Sponsored by:	Google, Inc. (GSoC 2022)
2022-09-20 19:41:10 +02:00
Jens Schweikhardt
e9e615c88a Fix dead references (wrong section) to sysctl(8). 2022-09-16 20:00:49 +02:00
Kristof Provost
b417407957 bridge.4: describe new MTU behaviour
1865ebfb12 changed if_bridge to have it change the MTU on newly added
interfaces to match the if_bridge MTU, rather than rejecting them for
having an incorrect MTU.

Update the man page to reflect this, as pointed out by woodsb02.

Reviewed by:	woodsb02
Differential Revision:	https://reviews.freebsd.org/D36481
2022-09-16 12:49:16 +02:00
Warner Losh
c9baa97471 arch: armv4 isn't supported either on aarch64 running in aarch32 mode
FreeBSD used to support both armv4 and armv5 binaries. All of that
support has been removed from the tree. We have only ever supported
armv6 and armv7 binaries in that mode. Note armv4 here too for
completeness since it flowed better than 'armv5 and earlier' and means
the same thing (FreeBSD never ran on an armv3 or earlier CPU).

Sponsored by:		Netflix
2022-09-15 11:20:01 -06:00
Gordon Bergling
0090d18235 Update SEE ALSO sections for resolver.{3,5} and hosts.5
The mentioned document "Name Server Operations Guide for BIND" is
outdated, so remove it from the SEE ALSO section of hosts.5
and resolver.{3,5}.

PR:		266360
Reported by:	Graham Perrin <grahamperrin at FreeBSD dot org>
Reviewed by:	karels
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36557
2022-09-15 15:24:28 +02:00
Mateusz Guzik
145a50dcda Unbreak the build after b3ee318b79 2022-09-14 23:52:05 +00:00
Gleb Smirnoff
b3ee318b79 domains: rewrite documentation to describe present state
Reviewed by:		debdrup, pauamma
Differential revision:	https://reviews.freebsd.org/D36513
2022-09-14 14:12:24 -07:00
Jens Schweikhardt
e3d5f18e56 Correct typos: s/mit Aksenten/mit Akzenten 2022-09-14 11:53:44 +02:00
Maxim Sobolev
3078531de1 Fix mergemaster(8) breakage in the 6ad780caa.
Split out termcap.small generation into its own Makefile under
etc/termcap, so it's properly executed by the underlying command:

  make 'SUBDIR_OVERRIDE=etc' everything

Reported by:	gbe
MFC after:	1 month
2022-09-13 13:36:22 -07:00
Richard Scheffenegger
bb1d472d79 tcp: make CUBIC the default congestion control mechanism.
This changes the default TCP Congestion Control (CC) to CUBIC.
For small, transactional exchanges (e.g. web objects <15kB), this
will not have a material effect. However, for long duration data
transfers, CUBIC allocates a slightly higher fraction of the
available bandwidth, when competing against NewReno CC.

Reviewed By: tuexen, mav, #transport, guest-ccui, emaste
Relnotes: Yes
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D36537
2022-09-13 12:09:21 +02:00
Navdeep Parhar
df275ae509 cxgbe(4): Add another setting to the knob that controls congestion.
hw.cxgbe.cong_drop=2 will generate backpressure *and* drop frames for
queues that are congested.

MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2022-09-12 11:40:29 -07:00
Warner Losh
e66c6b993e da.4: Don't document softtimeout
kern.cam.da.default_softtimeout currently does nothing. It sets a value
in the CCB that SIMs could look at, only none do. Leave it undocumented
until it actually does something. It was introduced to allow a 'soft
recovery' to be started when things were taking too long in the SIM by
not scheduling new I/O, or other measures the SIM knew would help when
it seemed like things were getting 'backed up'. No SIM in the FreeBSD
tree implements this and scsi_da doesn't use it other than to pass it
down, so best remove it from the documentation until it does something.

Sponsored by:		Netflix
Fixes:			53af9c235f
Reviewed by:		gbe
Differential Review:	https://reviews.freebsd.org/D36518
2022-09-10 13:51:37 -06:00
Gordon Bergling
8dcfb0282d mk: Remove a double word in a comment
- s/to to/to/

MFC after:	3 days
2022-09-10 12:57:55 +02:00
Gordon Bergling
11bc6be152 ipf-howto: Remove a double word
- s/to to/to/

MFC after:	3 days
2022-09-10 12:56:48 +02:00
Felix Johnson
53af9c235f da.4: Add some sysctl descriptions
Add descriptions for the following sysctl's:

- kern.cam.da.default_softtimeout
- kern.cam.da.disable_wp_protection
- kern.cam.da.enable_biospeedup
- kern.cam.da.enable_uma_ccbs
- kern.cam.da.poll_period
- kern.cam.da.send_ordered

While here, fix some mandocs warnings.

PR:		258727
Reported by:	Felix Johnson <felix dot the dot red at gmail dot com>
Reviewed by:	debdrup, pauamma, gbe
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D32278
2022-09-10 09:44:08 +02:00
Maxim Konovalov
1b7f08b917 ifnet(9): Duplicates for IFCAP_TOE flags removed.
PR:	266330
2022-09-10 01:35:34 +00:00
Gleb Popov
dcdf4c1acd src.conf.5: Regenerate.
Approved by:	imp
Fixes:	20adba8bc1
2022-09-09 11:07:33 +03:00
Gleb Popov
20adba8bc1 src.conf: Introduce WITHOUT_MACHDEP knob.
Summary:
This knob can be used to make buildsystem prefer generic C implentations of
various functions, instead of machine-specific assembler ones.

Test Plan: `make buildworld` on amd64

Reviewed by: imp, emaste

Differential Revision: https://reviews.freebsd.org/D36076

MFC after:	3 days
2022-09-09 09:54:28 +03:00
Gleb Smirnoff
1494f4776a ip_reass: add loader tunable to tune the reassembly hash size 2022-09-08 13:49:58 -07:00
Gleb Smirnoff
a30cb31589 ip_reass: retire ipreass_slowtimo() in favor of per-slot callout
o Retire global always running ipreass_slowtimo().
o Instead use one callout entry per hash slot.  The per-slot callout
  would be scheduled only if a slot has entries, and would be driven
  by TTL of the very last entry.
o Make net.inet.ip.fragttl read/write and document it.
o Retire IPFRAGTTL, which used to be meaningful only with PR_SLOWTIMO.

Differential revision:	https://reviews.freebsd.org/D36275
2022-09-08 13:49:58 -07:00
Maxim Sobolev
6ad780caa2 Generate termcap.small automatically. This eliminates the
need to do synchronization by hand when termcap is updated.

Reviewed by:	uqs, bapt, imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36333
2022-09-08 04:22:37 -07:00
Xin LI
4385a9f851 Fix build.
Pointy hat to:	delphij
MFC after:	2 weeks
X-MFC-with:	c65e42dbde
2022-09-06 23:41:10 -07:00
Xin LI
c65e42dbde libc: add test case for qsort_b(3)
Reviewed by: 	markj
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D36463
2022-09-06 23:11:46 -07:00
Cy Schubert
27b9777c28 libexec/rc: Add var_run rc script
Users with a tmpfs /var/run will lose the directory tree state of
/var/run at reboot. This rc script will optionally (by default)
capture the state of the directory structure in /var/run prior to
shutdown and recreate it at system boot.

Alternatively a user can save the state of the /var/run directories
manually using service var_run save and disable the autosaving of
/var/run state using the var_run_autosave variable, for those
paranoid SSD users.

PR:			259585, 259699
Reported by:		freebsd@walstatt-de.de,
Reviewed by:		philip, gbe (previous version)
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D36386
2022-09-05 06:19:42 -07:00
Gordon Bergling
1e289a1255 ipfilter: Grammar fix for the ipfilter howto
- s/that that/that the/

MFC after:	3 days
2022-09-04 17:37:28 +02:00
Gordon Bergling
8eadfdd99e ip6.4: Correct a typo in the manual page
- s/the the/the/

MFC after:	3 days
2022-09-04 13:03:44 +02:00
Richard Scheffenegger
4012ef7754 tcp: Functional implementation of Accurate ECN
The AccECN handshake and TCP header flags are supported,
no support yet for the AccECN option. This minimalistic
implementation is sufficient to support DCTCP while
dramatically cutting the number of ACKs, and provide ECN
response from the receiver to the CC modules.

Reviewed By:		#transport, #manpages, rrs, pauamma
Sponsored by:		NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D21011
2022-08-31 15:05:53 +02:00
Gleb Smirnoff
f1fb051716 divert(4): maintain own cb database and stop using inpcb KPI
Here go cons of using inpcb for divert:
- divert(4) uses only 16 bits (local port) out of struct inpcb,
  which is 424 bytes today.
- The inpcb KPI isn't able to provide hashing for divert(4),
  thus it uses global inpcb list for lookups.
- divert(4) uses INET-specific part of the KPI, making INET
  a requirement for IPDIVERT.

Maintain our own very simple hash lookup database instead.  It
has mutex protection for write and epoch protection for lookups.
Since now so->so_pcb no longer points to struct inpcb, don't
initialize protosw methods to methods that belong to PF_INET.
Also, drop support for setting options on a divert socket.  My
review of software in base and ports confirms that this has no
use and unlikely worked before.

Differential revision:	https://reviews.freebsd.org/D36382
2022-08-30 15:09:21 -07:00
Gleb Smirnoff
8624f4347e divert: declare PF_DIVERT domain and stop abusing PF_INET
The divert(4) is not a protocol of IPv4.  It is a socket to
intercept packets from ipfw(4) to userland and re-inject them
back.  It can divert and re-inject IPv4 and IPv6 packets today,
but potentially it is not limited to these two protocols.  The
IPPROTO_DIVERT does not belong to known IP protocols, it
doesn't even fit into u_char.  I guess, the implementation of
divert(4) was done the way it is done basically because it was
easier to do it this way, back when protocols for sockets were
intertwined with IP protocols and domains were statically
compiled in.

Moving divert(4) out of inetsw accomplished two important things:

1) IPDIVERT is getting much closer to be not dependent on INET.
   This will be finalized in following changes.
2) Now divert socket no longer aliases with raw IPv4 socket.
   Domain/proto selection code won't need a hack for SOCK_RAW and
   multiple entries in inetsw implementing different flavors of
   raw socket can merge into one without requirement of raw IPv4
   being the last member of dom_protosw.

Differential revision:	https://reviews.freebsd.org/D36379
2022-08-30 15:09:21 -07:00
Eugene Grosbein
160a2f2cdd rc.conf(5): add <service>_umask to run the service using this value
None of tools working with login classes change umask(1)
and we had no ways to specify non-default umask for a service
not touching its startup script. This change makes in possible.

Some file-sharing services that create new files may benefit from it.

Differential:	https://reviews.freebsd.org/D36309
MFC-after:	3 days
2022-08-28 12:48:58 +07:00
Brooks Davis
c2e1544f59 m_get3: add an MLINK for the manpage
Reviewed by:	kp
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D36319
2022-08-23 22:34:07 +01:00
Mateusz Guzik
4c9c0b640b vfs: fix vaccess prototype in the manpage
Reported by:	des
2022-08-23 21:01:55 +00:00
Mateusz Guzik
96d1fbf367 vfs: fix VOP_UNLOCK prototype in the manpage
Note the manpage is woefully outdated, taking about "simple lock".

Reported by:	des
2022-08-23 20:55:20 +00:00