Commit graph

275446 commits

Author SHA1 Message Date
Tom Hukins 3fb913e58d camcontrol(8): Add manual page cross references
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702

(cherry picked from commit 2675b8bd3d)
2023-08-06 19:38:31 +02:00
Wolfram Schneider a38661a36b update external URL
(cherry picked from commit c918f50f8b)
2023-08-06 19:38:04 +02:00
Tom Hukins e8d85eaf1c cam(3): Add a manual page cross reference
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702

(cherry picked from commit 3e1af044c9)
2023-08-06 19:36:50 +02:00
Tom Hukins 7bf80c94f7 gpart(8): Refer to a related manual page
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702

(cherry picked from commit d275d2e3d3)
2023-08-06 19:28:30 +02:00
Jens Schweikhardt 20972319d2 Fix dead reference to boot0(8) to point to boot0cfg(8).
(cherry picked from commit cf13e67730)
2023-08-06 19:26:38 +02:00
Marius Strobl 0dac0289c7 ofw(4): Add my copyright and additional history for ofw_reg_to_paddr()
The ofw_reg_to_paddr() in this file is the powerpc OF_decode_addr()
formerly added in 812403402e. However,
the latter function in turn was based on the sparc64 counterpart I
previously added in 2b2250b149.

(cherry picked from commit 29fe5efc8a)
2023-08-06 19:21:40 +02:00
Marius Strobl b59b3443f3 gif(4): Assert that gif_output() isn't called for EtherIP
With the current implementation of if_bridge(4), bridge_enqueue()
calls gif_transmit() only. Ensure it stays that way so that the
expectations in both drivers are either met or changed accordingly.

PR:		227450
(cherry picked from commit 8a03087223)
2023-08-06 19:17:30 +02:00
Marius Strobl 3b0d328a2d gif(4): Revert in{,6}_gif_output() misalignment handling
The code added in c89c8a1029 in order
to compensate possible misalignment caused by prepending the IP4/6
header with an EtherIP one got broken at some point by a rewrite of
gif(4). For better or worse, 8018ac153f
relaxed the alignment of struct ip from 32 bit to 16 bit, though. As
a result, a 16 bit offset of the IPv4 header induced by the addition
of the 16 bit EtherIP one no longer is a problem in the first place.
The alignment of struct ip6_hdr currently is even only 8 bit, making
it even less problematic with regards to possible misalignment.
Thus, remove the code for handling misalignment in in{,6}_gif_output()
altogether again.
While at it, replace the 3 bcopy(9) calls in gif(4) with memcpy(9) as
there's no need to handle overlap here.

(cherry picked from commit e82d7b2952)
2023-08-06 19:16:57 +02:00
Marius Strobl 6063ec2f42 xhci(4): Describe AMD 400 Series USB 3.1 controllers
While at it, correct the string for 300 series ones, these also are
already xHCI 3.1.

Fixes:	d171d2f2 Add AHCI/XHCI device IDs found on AMD Ryzen+B350 system
(cherry picked from commit 83e67a9d14)
2023-08-06 19:16:30 +02:00
Marius Strobl 36670fa153 test: remove remainder of testfloat
These bits are unused since the sparc64-specific glue has been deleted
in f33b14f0.

(cherry picked from commit eb33b693b3)
2023-08-06 19:11:42 +02:00
Marius Strobl 2dd8070638 cas.4: Remove remaining sparc64-specific bit
This was missed in 702547720c.

(cherry picked from commit a12d60b99e)
2023-08-06 19:10:49 +02:00
Marius Strobl 4ebb0ab535 gem(4): Remove onboard-only Sun ERI and remnants of SBus support
These bits are obsolete since 58aa35d429.
This change reverts part of 9ba2b298df as
well as effectively bd3d9826d7, i. e. the
SBus-related modifications. This also gets rid of a nasty hack required
as bus_{read,write}_N(9) doesn't really fit bus_space_subregion(9).

(cherry picked from commit 8defc88c13)
2023-08-06 19:10:18 +02:00
Marius Strobl a6222e182c mmc(4): Don't call bridge driver for timings not requiring tuning
The original idea behind calling into the bridge driver was to have the
logic deciding whether tuning is actually required for a particular bus
timing in a given slot as well as doing the sanity checking only on the
controller layer which also generally is better suited for these due to
say SDHCI_SDR50_NEEDS_TUNING. On another thought, not every such driver
should need to check whether tuning is required at all, though, and not
everything is SDHCI in the first place.
Adjust sdhci(4) accordingly keeping sdhci_generic_tune() a bit cautious
still.

(cherry picked from commit bd15d31cef)
2023-08-06 19:03:45 +02:00
Marius Strobl 5fb88aba6c man: Remove obsolete meteor.4
The corresponding interface has been deorbited as part of
daba5ace03.

(cherry picked from commit 7ed5694dd9)
2023-08-06 18:54:29 +02:00
Cy Schubert a00be5afa7 Remove bt.4 man page.
r339568 (a1db7455b7) removed bt(4).
This revision removes the man page

(cherry picked from commit e2b247fac2)
2023-08-06 18:47:10 +02:00
Kirk McKusick d69d55f78b UFS/FFS: Migrate to modern uintXX_t from u_intXX_t.
As per https://lists.freebsd.org/archives/freebsd-scsi/2023-July/000257.html
move to the modern uintXX_t. While here also migrate u_char to uint8_t.
Where other kernel interfaces allow, migrate u_long to uint64_t.

No functional changes intended.

Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 831b1ff791)
2023-08-05 21:28:53 -07:00
Kirk McKusick 44e4279e56 Add diagnostics to fsck_ffs(8) for journaled soft-updates debugging.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 6f0ca273a3)
2023-08-04 23:22:19 -07:00
Kirk McKusick 98b660abff Add quitclean command to fsdb(8) to request a filesystem not be marked dirty.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit d059e44b80)
2023-08-04 23:20:25 -07:00
Kirk McKusick bcbb927b97 Have fsdb(8) only mark a filesystem dirty when it is modified.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit d51bdf327d)
2023-08-04 23:17:30 -07:00
Kirk McKusick 080ebe84fb Comment cleanup.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 4a3444428d)
2023-08-04 23:15:32 -07:00
Kirk McKusick f40d616aec Debugging output additions. No functional changes intended.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 4d512b0735)
2023-08-04 23:13:25 -07:00
Kirk McKusick 1cd2b2f96f Text format cleanups. No functional changes intended.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 239597e030)
2023-08-04 23:11:08 -07:00
Gordon Bergling 2e0e659b18 nfsserver: Fix a typo in a source code comment
- s/restared/restarted/

(cherry picked from commit 11892bc710)
2023-08-05 06:41:23 +02:00
Gordon Bergling fd46c830fd netpfil: Fix a typo in a source code comment
- s/interprted/interpreted/

(cherry picked from commit cfd05de194)
2023-08-05 06:41:00 +02:00
Gordon Bergling 9d9da1c5d0 aic7xxx: Fix two typos in source code comments
- s/reslection/reselection/

(cherry picked from commit 3514686b34)
2023-08-05 06:40:46 +02:00
Gordon Bergling 68edbc8a90 isp(4): Fix a typo in a source code comment
- s/Constatns/Constants/

Obtained from:	NetBSD

(cherry picked from commit d3367c35cb)
2023-08-05 06:40:32 +02:00
Gordon Bergling 8229a3a2ae cam(4): Fix a typo in a source code comment
- s/uppper/upper/

(cherry picked from commit 586eda6b24)
2023-08-05 06:40:19 +02:00
Gordon Bergling 50ba320afc elf(3): Fix a typo in a source code comment
- s/speciaal/special/

(cherry picked from commit 2f0e0bd506)
2023-08-05 06:40:06 +02:00
Gordon Bergling 4b5826ca9d linux(4): Fix two typos in source code comments
- s/decriptors/descriptors/

(cherry picked from commit 29eab3e4e0)
2023-08-05 06:39:53 +02:00
Gordon Bergling a806c88b69 psm(4): Fix a typo in a source code comment
- s/diable/disable/

(cherry picked from commit 7eb8fbfb04)
2023-08-05 06:39:37 +02:00
Gordon Bergling fdb4c37667 vnic: Fix a typo in a source code comment
- s/Enabele/Enable/

(cherry picked from commit b73763fc10)
2023-08-05 06:39:22 +02:00
Gordon Bergling 1531b7a09b usb(4): Fix a typo in a source code comment
- s/determin/determine/

(cherry picked from commit a924b48579)
2023-08-05 06:39:06 +02:00
Gordon Bergling ede5eb7e4a et(4): Fix a typo in a source code comment
- s/diabled/disabled/

(cherry picked from commit 734c9698d9)
2023-08-05 06:38:45 +02:00
Kristof Provost 0607df0595 pf: test rules evaluation in the face of multiple IPv6 fragment headers
Send an ICMPv6 echo request packet with multiple IPv6 fragment headers.
Set rules to pass all packets, except for ICMPv6 echo requests.

pf ought to drop the echo request, but doesn't because it reassembles
the packet, and then doesn't handle the second fragment header. In other
words: it fails to detect the ICMPv6 echo header.

Reported by:	Enrico Bassetti bassetti@di.uniroma1.it (NetSecurityLab @ Sapienza University of Rome)
MFC after:	instant
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit b23dbabb7f)
2023-08-04 16:08:05 +02:00
Kristof Provost 3a0461f23a pf: handle multiple IPv6 fragment headers
With 'scrub fragment reassemble' if a packet contains multiple IPv6
fragment headers we would reassemble the packet and immediately
continue processing it.

That is, we'd remove the first fragment header and expect the next
header to be a final header (i.e. TCP, UDP, ICMPv6, ...). However, if
it's another fragment header we'd not treat the packet correctly.
That is, we'd fail to recognise the payload and treat it as if it were
an IPv6 fragment rather than as its actual payload.

Fix this by restarting the normalisation on the reassembled packet.
If there are multiple fragment headers drop the packet.

Reported by:	Enrico Bassetti bassetti@di.uniroma1.it (NetSecurityLab @ Sapienza University of Rome)
MFC after:	instant
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 76afcbb524)
2023-08-04 16:08:05 +02:00
Kristof Provost 06185987d3 atf_pytest_wrapper: fix use with pytest-7.4
As of pytest 7.4 it no longer walks all the way to the root directory
of the file system to find conftest files. As a result we don't find /
usr/tests/conftest.py, and don't load atf_python. That in turn causes
atf_python tests to fail.

Explicitly set the confcutdir, as advised by the pytest changelog.

See also:	https://github.com/pytest-dev/pytest/pull/11043
MFC after:	3 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D41064

(cherry picked from commit 9f23cbd6ca)
2023-08-04 16:08:05 +02:00
Gordon Bergling b26e36c34e sk(4): Fix a typo in a source code comment
- s/nomral/normal/

(cherry picked from commit 135c2b7156)
2023-08-04 08:02:26 +02:00
Kevin Bowling a24e9d8512 e1000: HWCSUM excemption fixes
Also disable IPV6 checksum offload.

Spell hw->mac.type < e1000_82543 as e1000_82542.  Confusingly, chips
like 82540 and 82541 come later and do not have these issues.  There
is no functional change here, as the enum was defined in such a way
it worked correctly.  But this reads literally.

(cherry picked from commit 38588749af)
2023-08-03 18:22:59 -07:00
Kevin Bowling b71d11ba94 e1000: Corrections for lem(4)/em(4) txcsum offload
Explicitly set ipcss/ipcse/ipcso for IPv6 per intel SDM as indicated in
inline comments.

Fix and consolidate 82543/82547 hwcsum exemption.

While here rearrange and expand some commentary.

(cherry picked from commit cbcab907f8)
2023-08-03 18:22:34 -07:00
Kevin Bowling 41e440c381 e1000: add missing parens in csum setup
Reported by:	rscheff
Fixes:	4f9a44a215 e1000: Fix/enable IPv6 transmit checksum offload

(cherry picked from commit 92fd2f39e5)
2023-08-03 18:22:14 -07:00
Kevin Bowling 17b587e0ba e1000: Fix/enable IPv6 transmit checksum offload
Fixes and enables txcsum6 offload for lem(4) and em(4).

MFC after:	2 weeks

(cherry picked from commit 4f9a44a215)
2023-08-03 18:21:41 -07:00
Kevin Bowling d483953e99 e1000: lem(4)/em(4) ifcaps, TSO and hwcsum fixes
* em(4) obey administrative ifcaps for using hwcsum offload
* em(4) obey administrative ifcaps for hw vlan receive tagging
* em(4) add additional TSO6 ifcap, but disabled by default as is TSO4
* lem(4) obey administrative ifcaps for using hwcsum offload
* lem(4) add support for hw vlan receive tagging
* lem(4) Add ifcaps for TSO offload experimentation, but disabled by
  default due to errata and possibly missing txrx code.
* lem(4) disable HWCSUM ifcaps by default on 82547 due to errata around
  full duplex links.  It may still be administratively enabled.

Reviewed by:	markj (previous version)
Differential Revision:	https://reviews.freebsd.org/D30072

(cherry picked from commit 918c25677d)
2023-08-03 18:21:23 -07:00
Kevin Bowling d7dd3b5630 Revert "e1000: lem(4)/em(4) ifcaps, TSO and hwcsum fixes"
This reverts commit bd07d5c451.
2023-08-03 18:21:00 -07:00
Kevin Bowling bd07d5c451 e1000: lem(4)/em(4) ifcaps, TSO and hwcsum fixes
* em(4) obey administrative ifcaps for using hwcsum offload
* em(4) obey administrative ifcaps for hw vlan receive tagging
* em(4) add additional TSO6 ifcap, but disabled by default as is TSO4
* lem(4) obey administrative ifcaps for using hwcsum offload
* lem(4) add support for hw vlan receive tagging
* lem(4) Add ifcaps for TSO offload experimentation, but disabled by
  default due to errata and possibly missing txrx code.
* lem(4) disable HWCSUM ifcaps by default on 82547 due to errata around
  full duplex links.  It may still be administratively enabled.

Reviewed by:	markj (previous version)
Differential Revision:	https://reviews.freebsd.org/D30072

(cherry picked from commit 95f7b36e8f)
2023-08-03 18:11:30 -07:00
Kevin Bowling c45dba3890 e1000: Some fixes for em(4) TSO setup
Always set TXD_CMD_IP for 82544
Otherwise set TXD_CMD_IP for IPv4, not IPv6

Reviewed by:	markj (previous version)
Differential Revision:	https://reviews.freebsd.org/D30072

(cherry picked from commit 201c4b7c29)
2023-08-03 18:11:07 -07:00
Kevin Bowling e8a5d94a09 em(4): remove reference to CNVi
I misread the newer PCH datasheet, these are still refered to as PCH.

(cherry picked from commit 1b01772f01)
2023-08-03 13:28:49 -07:00
Kevin Bowling a4a78efcd6 em(4): Update and expand on hardware support
(cherry picked from commit 42ce724d80)
2023-08-03 13:11:53 -07:00
Kevin Bowling 78a7882cb1 em(4): add link to lem(4)
(cherry picked from commit 7bcdbacf84)
2023-08-03 13:10:20 -07:00
Mike Karels b9da47180f netstat -i: compute most field widths dynamically
The network and address fields were sometimes truncated for netstat -i
without -W, and often much too wide for netstat -i with the -W option.
Fields such as normal packet counts often overflowed.  As a result,
columns didn't line up, and large white spaces made it harder to
follow a line across the display.  Change the code to compute the
required field sizes for network, address, and various packet counts.
Hoist the code to format network and address into a subroutine that
can be called twice, once to measure the required field widths,
and once to emit the values.  Use separate field widths for input
and output packets, byte counts, and error and drop counters.
These are left at defaults (the preceding values) with the -h
option, in which case the fields have a limited total width.
An extra space is included between the Network and Address, which
otherwise seemed too close.

Change the mention of -W with -i in the man page to say that most
field widths are computed dynamically in this case.

Reviewed by:	sjg, glebius
Differential Revision:	https://reviews.freebsd.org/D41160

(cherry picked from commit 372e3d561d)
2023-08-02 11:17:31 -05:00
Kristof Provost fec383bb53 libpfct: ensure the initial allocation is large enough
Ensure that we allocate enough memory for the packed nvlist, no matter
what size hint was provided.

MFC after:	1 week
Reported by:	R. Christian McDonald <rcm@rcm.sh>
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 6422599e74)
2023-08-02 10:41:55 +02:00