]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 months agouse long manpage URL (broken in last commit)
Wolfram Schneider [Thu, 28 Dec 2023 15:58:56 +0000 (15:58 +0000)]
use long manpage URL (broken in last commit)

Reported by: pstef

6 months agoCONTRIBUTING.md: fix typo from commmit to commit
rilysh [Thu, 28 Dec 2023 07:34:32 +0000 (02:34 -0500)]
CONTRIBUTING.md: fix typo from commmit to commit

Signed-off-by: rilysh <nightquick@proton.me>
Pull-request: https://github.com/freebsd/freebsd-src/pull/960

6 months agoena: Update driver version to v2.7.0
Osama Abboud [Mon, 30 Oct 2023 11:12:24 +0000 (11:12 +0000)]
ena: Update driver version to v2.7.0

Features:
* Introduce customer and SRD metrics through sysctl
* Introduce spreading IRQs to CPUs capability using sysctl
* Upgrade ena-com to v2.7.0

Bug Fixes:
* Remove outdated APIs

Minor Changes:
* Introduce a shared stats sample interval for all stats

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

6 months agoena: Update the license dating to 2023
Osama Abboud [Mon, 23 Oct 2023 17:16:38 +0000 (17:16 +0000)]
ena: Update the license dating to 2023

Some of the files are using outdated linceses.
Update the license to be 2023.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

6 months agoena: Support srd metrics with sysctl
Osama Abboud [Tue, 12 Sep 2023 11:17:45 +0000 (11:17 +0000)]
ena: Support srd metrics with sysctl

This commit introduces SRD metrics through sysctl.
The metrics can be queried using the following sysctl node:
sysctl dev.ena.<device index>.ena_srd_info

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

6 months agoena: Support customer metric with sysctl
Osama Abboud [Tue, 12 Sep 2023 10:17:03 +0000 (10:17 +0000)]
ena: Support customer metric with sysctl

This commit adds sysctl support for customer metrics.
Different customer metrics can be found in the following sysctl node:
sysctl dev.ena.<device index>.customer_metrics

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

6 months agoena: Introduce shared sample interval for all stats
Osama Abboud [Tue, 12 Sep 2023 10:13:48 +0000 (10:13 +0000)]
ena: Introduce shared sample interval for all stats

Rename sample_interval node to stats_sample_interval and move
it up in the sysctl tree to make it clear that it's relevant for
all the stats and not only ENI metrics (Currently, sample interval node
is found under eni_metrics node).

Path to node:
dev.ena.<device_index>.stats_sample_interval

Once this parameter is set it will set the sample interval for all the
stats node including SRD/customer metrics.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

6 months agoena: Remove CQ tail pointer update API
Osama Abboud [Mon, 11 Sep 2023 08:43:08 +0000 (08:43 +0000)]
ena: Remove CQ tail pointer update API

This commit removes the usage of this API from the freebsd driver since
the relevant functionality is not supported by the device.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

6 months agoena: Update ena_com_update_intr_reg API usage
Osama Abboud [Mon, 11 Sep 2023 08:38:39 +0000 (08:38 +0000)]
ena: Update ena_com_update_intr_reg API usage

This commit fixes the usage of this function to be compatible with the
new API introduced by ena-com update to v2.7.0

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

6 months agoena: Change measurement unit of time since last tx cleanup to ms
Arthur Kiyanovski [Wed, 14 Jun 2023 10:12:16 +0000 (10:12 +0000)]
ena: Change measurement unit of time since last tx cleanup to ms

This commit:
1. Sets the time since last cleanup to milliseconds.
2. Fixes incorrect indentations.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

6 months agoena: Add sysctl support for spreading IRQs
Osama Abboud [Mon, 30 Oct 2023 11:27:03 +0000 (11:27 +0000)]
ena: Add sysctl support for spreading IRQs

This commit allows spreading IO IRQs over different CPUs through sysctl.
Two sysctl nodes are introduced:
1- base_cpu: servers as the first CPU to which the first IO IRQ
will be bound.
2- cpu_stride: sets the distance between every two CPUs to which every
two consecutive IO IRQs are bound.

For example for doing the following IO IRQs / CPU binding:

IRQ idx |  CPU
----------------
   1    |   0
   2    |   2
   3    |   4
   4    |   6

Run the following commands:
sysctl dev.ena.<device index>.irq_affinity.base_cpu=0
sysctl dev.ena.<device_index>.irq_affinity.cpu_stride=2

Also introduced rss_enabled field, which is intended to replace
'#ifdef RSS' in multiple places, in order to prevent code duplication.

We want to bind interrupts to CPUs in case of rss set OR in case
the newly defined sysctl paremeter is set. This requires to remove a
couple of '#ifdef RSS' as well in the structs, since we'll be using the
relevant parameters in the CPU binding code.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

6 months agoena: Upgrade ena-com to freebsd v2.7.0
Arthur Kiyanovski [Thu, 28 Dec 2023 13:52:31 +0000 (13:52 +0000)]
ena: Upgrade ena-com to freebsd v2.7.0

Merge commit '04cf7cee5ae0c6bb29eb21ce85bab7ca7386a95f'

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

6 months agoena: Upgrade ena-com to freebsd v2.7.0
Osama Abboud [Thu, 28 Dec 2023 13:25:43 +0000 (13:25 +0000)]
ena: Upgrade ena-com to freebsd v2.7.0

This commit introduces a number of infrastructures in ena-com, some of
which are being used as of ENA v2.7.0 while other certain infrastructure
assets have been made available for potential future application.

Upgrade ena-com to include the following changes:

* Introduce customer metrics infrastructures
* Introduce SRD metrics infrastructures
* Remove unused fields from ena_com_io_cq and ena_com_io_sq structs
* Minor rework of ena_com_fill_hash_function
* Introduce PHC infrastructures
* Update the licenses for ena-com files
* Delete duplicate *_defs.h found in ena-com and ena_defs directories
* Add validation for completion descriptors consistency
* Move ena_fbsd_log.h file to ena_plat.h

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

6 months agoReorganize libclang_rt Makefile and make more lib/arch combos available
Dimitry Andric [Thu, 28 Dec 2023 12:57:41 +0000 (13:57 +0100)]
Reorganize libclang_rt Makefile and make more lib/arch combos available

Upstream has made more clang runtime libraries available for more
architectures, so add them. To make this easier, split up subdir lists
into functional parts (asan, tsan, etc), and put each architecture into
its own .if block.

Effectively, this adds the following libraries for aarch64: asan, cfi,
fuzzer, msan, safestack, stats, tsan, ubsan, xray.

PR: 262706
MFC after: 3 days

6 months agosupport spaces in filenames
Wolfram Schneider [Thu, 28 Dec 2023 10:50:29 +0000 (10:50 +0000)]
support spaces in filenames

PR: 275978
MFC after: 1 week

6 months agoupdate manpage URL
Wolfram Schneider [Thu, 28 Dec 2023 10:48:04 +0000 (10:48 +0000)]
update manpage URL

6 months agoupdate homepage for FreeBSD Manual Pages (again)
Wolfram Schneider [Thu, 28 Dec 2023 07:11:38 +0000 (07:11 +0000)]
update homepage for FreeBSD Manual Pages (again)

6 months agogeom/journal: Fix typos
Alex [Thu, 28 Dec 2023 06:40:33 +0000 (23:40 -0700)]
geom/journal: Fix typos

Fixed a few typos.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/884

6 months agoCONTRIBUTING.md: Fix typos
Warner Losh [Thu, 28 Dec 2023 06:16:44 +0000 (23:16 -0700)]
CONTRIBUTING.md: Fix typos

Fix my own typoes.

Noticed by: kevans, cperciva

Sponsored by: Netflix

6 months agovtnet: Better adjust for ethernet alignment.
Warner Losh [Thu, 21 Dec 2023 20:36:12 +0000 (13:36 -0700)]
vtnet: Better adjust for ethernet alignment.

Move adjustment of the mbuf from where we allocate it to where we are
about to queue it to the device. Do this only on those platforms that
require it. This allows us to receive an entire jumbo frame on other
platforms. It also doesn't make the adjustment on subsequent frames when
we queue mulitple mbufs for LRO operations.

For the normal use case on armv7, there's no difference because we only
ever allocate one mbuf. However, for the LRO cases it increases what's
available in LRO. It also ensure that we get enough mbufs in those cases
as well (though I have no ability to test this on a LRO scenario with
armv7).

This has the side effect of reverting 527b62e37e68.

Fixes: 527b62e37e68
Sponsored by: Netflix

6 months agomtree: Add missing directories to BSD.tests.dist
Jose Luis Duran [Thu, 28 Dec 2023 05:26:23 +0000 (22:26 -0700)]
mtree: Add missing directories to BSD.tests.dist

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912

6 months agomtree: Sort BSD.tests.dist
Jose Luis Duran [Thu, 28 Dec 2023 05:26:23 +0000 (22:26 -0700)]
mtree: Sort BSD.tests.dist

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912

6 months agomtree: Add missing directories to BSD.root.dist
Jose Luis Duran [Thu, 28 Dec 2023 05:26:23 +0000 (22:26 -0700)]
mtree: Add missing directories to BSD.root.dist

While here, align to the output produced by mtree.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912

6 months agomtree: Add missing directories generated by certctl
Jose Luis Duran [Thu, 28 Dec 2023 05:26:23 +0000 (22:26 -0700)]
mtree: Add missing directories generated by certctl

PR: 255639
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912

6 months agomtree: Properly sort entries
Jose Luis Duran [Thu, 28 Dec 2023 05:26:23 +0000 (22:26 -0700)]
mtree: Properly sort entries

Reduce the diff with the output generated by mtree.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912

6 months agomtree: Use spaces not tabs
Jose Luis Duran [Thu, 28 Dec 2023 05:26:23 +0000 (22:26 -0700)]
mtree: Use spaces not tabs

The indentation generated by mtree -j uses spaces, not tabs.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912

6 months agomtree: Update mtree flags in README file
Jose Luis Duran [Thu, 28 Dec 2023 05:26:23 +0000 (22:26 -0700)]
mtree: Update mtree flags in README file

- Add -b (suppress blank lines before directories).
- The equivalent of `-i` in fmtree is `-j` in mtree (nmtree) (indent the
  output 4 spaces).
- Add `-F freebsd9` compatibility flavor (print the closing `..` at the
  end).

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912

6 months agotree: Use 1 semicolon at the end of a statement
Elyes Haouas [Thu, 28 Dec 2023 04:02:07 +0000 (21:02 -0700)]
tree: Use 1 semicolon at the end of a statement

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/889

6 months agotree: Use 1 semicolon at the end of a statement
Elyes Haouas [Thu, 28 Dec 2023 04:02:07 +0000 (21:02 -0700)]
tree: Use 1 semicolon at the end of a statement

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/889

6 months agoCONTRIBUTING.md: add note about upstreams.
Warner Losh [Thu, 28 Dec 2023 03:40:57 +0000 (20:40 -0700)]
CONTRIBUTING.md: add note about upstreams.

Sponsored by: Netflix

6 months agoroute6d: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
route6d: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agobmake: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
bmake: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agosys: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
sys: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agonetpfil: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
netpfil: Fix typo (triple S)

While here, align the comment box.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agonet: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
net: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agofuse: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
fuse: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agoqat: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
qat: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agopms: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
pms: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agopci: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
pci: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agoisci: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
isci: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agonetvsc: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
netvsc: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agoddb: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
ddb: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agoarm: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
arm: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agostand: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
stand: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agosecurity.7: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
security.7: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agonetgdb.4: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
netgdb.4: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agolibdevdctl: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:15 +0000 (20:17 -0700)]
libdevdctl: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

6 months agociss: Fix typo (triple T)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:07 +0000 (20:17 -0700)]
ciss: Fix typo (triple T)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/954

6 months agolibcasper: Fix typo (triple T)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:07 +0000 (20:17 -0700)]
libcasper: Fix typo (triple T)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/954

6 months agosa: Make sa_param_table[] const and static
Mark Johnston [Wed, 27 Dec 2023 21:40:12 +0000 (16:40 -0500)]
sa: Make sa_param_table[] const and static

No functional change intended.

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

6 months agosa: Check for errors from copyout()
Mark Johnston [Wed, 27 Dec 2023 21:28:28 +0000 (16:28 -0500)]
sa: Check for errors from copyout()

This is in preparation for annotating copyin() and related functions
with __result_use_check.

Reviewed by: ken
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43203

6 months agoCONTRIBUTING: class work
Warner Losh [Thu, 28 Dec 2023 00:21:58 +0000 (17:21 -0700)]
CONTRIBUTING: class work

Add note about contacting me for professors including this as part of
their class work.

6 months agocontributing: Add note about static analyzers
Warner Losh [Thu, 28 Dec 2023 00:16:33 +0000 (17:16 -0700)]
contributing: Add note about static analyzers

Please don't submit the raw results of some static analysis. Please do
submit the thoughtful results, though. Please test with kyua and create
test cases for any actual bugs that might be fixed.

6 months ago<bsd.progs.mk>: Allow using SRCS for common sources
VexedUXR [Thu, 28 Dec 2023 00:01:29 +0000 (17:01 -0700)]
<bsd.progs.mk>: Allow using SRCS for common sources

Instead of having to do:

PROGS= program1 program2
SRCS.program1= program1.c common.c
SRCS.program2= program2.c common.c

This can now be done instead:

PROGS= program1 program2
SRCS= common.c
SRCS.program1= program1.c
SRCS.program2= program2.c

This shouldn't effect any existing projects using <bsd.progs.mk>.

Reviewed by: imp, sjg
Pull Request: https://github.com/freebsd/freebsd-src/pull/766

6 months agoauto_master.5: Fix my push
Warner Losh [Wed, 27 Dec 2023 23:59:48 +0000 (16:59 -0700)]
auto_master.5: Fix my push

Forgot the commit --amend before the push to fix the date. My bad.
Fixes: fc8ac5fedf7e
6 months agoauto_master.5: improve description, bump date
concussious [Wed, 27 Dec 2023 23:56:43 +0000 (16:56 -0700)]
auto_master.5: improve description, bump date

Add autofs automounter to description to improve visibility.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/824

6 months agobsd-family-tree: tidiness, width
Graham Perrin [Wed, 27 Dec 2023 23:36:26 +0000 (16:36 -0700)]
bsd-family-tree: tidiness, width

Tidy the raggedness in the section that begins [44B]. As the line that begins
[KB] was previously tidied, now tidy the section to accommodate [BSDI] and
[TUHS]. Rewrap the section to fit the same number of columns.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/812

6 months agobsd-family-tree: QCU: ISBN and EAN numbers
Graham Perrin [Wed, 27 Dec 2023 23:36:25 +0000 (16:36 -0700)]
bsd-family-tree: QCU: ISBN and EAN numbers

ISBN 0201547775 and International Article Number (EAN) 9780201547771 for
'A Quarter Century of UNIX' by Peter H. Salus.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/812

6 months agorc(8): angle brackets to avoid link breakage
Graham Perrin [Wed, 27 Dec 2023 23:26:46 +0000 (16:26 -0700)]
rc(8): angle brackets to avoid link breakage

<https://datatracker.ietf.org/doc/html/rfc3986#appendix-C>

Double-quotes are not suitably effective. Instead, use angle brackets.

Whilst here:
- remove superfluous quotation marks from the %T title.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/811

6 months agozfs: merge openzfs/zfs@233d34e47
Martin Matuska [Wed, 27 Dec 2023 21:51:21 +0000 (22:51 +0100)]
zfs: merge openzfs/zfs@233d34e47

Notable upstream pull request merges:
 #15635 eff77a802 ZIL: Improve next log block size prediction
 #15675 6930ecbb7 spa: make read/write queues configurable
 #15677 5a4915660 Don't panic on unencrypted block in encrypted dataset
 #15716 07e95b467 Fix the FreeBSD userspace build

Obtained from:  OpenZFS
OpenZFS commit: 233d34e47ef88ee9e9a1e1ad02384f2063cd039b

6 months agox86: Adjust base addr for PCI MCFG regions
Colin Percival [Wed, 27 Dec 2023 08:09:08 +0000 (00:09 -0800)]
x86: Adjust base addr for PCI MCFG regions

Each bus gets 1 MB of address space; the actual base address for an
MCFG bus range is the address from the table plus the starting bus
number times 1 MB.

The PCI spec is unclear on this point, but this change matches what
Linux does, which is likely enough of a de facto standard regardless
of what any de jure standard might attempt to say.

Fixes: f54a3890b1f4 ("x86: Support multiple PCI MCFG regions")
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D43206

6 months agoFix the FreeBSD userspace build (#15716)
Mark Johnston [Wed, 27 Dec 2023 20:17:53 +0000 (15:17 -0500)]
Fix the FreeBSD userspace build (#15716)

- Mark some parameters to zpool_power*() as unused.
- Add a stub zpool_disk_wait().

Fixes: a9520e6e5 ("zpool: Add slot power control, print power status")
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
6 months agonvme: Add some bits from NVMe 2.0c spec.
Alexander Motin [Wed, 27 Dec 2023 18:50:54 +0000 (13:50 -0500)]
nvme: Add some bits from NVMe 2.0c spec.

MFC after: 1 week

6 months agoctladm: Only autoload cfiscsi.ko for iSCSI-specific commands
John Baldwin [Wed, 27 Dec 2023 18:11:19 +0000 (10:11 -0800)]
ctladm: Only autoload cfiscsi.ko for iSCSI-specific commands

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42935

6 months agoctladm: Fix a typo and add a FALLTHROUGH annotation
John Baldwin [Wed, 27 Dec 2023 18:10:42 +0000 (10:10 -0800)]
ctladm: Fix a typo and add a FALLTHROUGH annotation

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42934

6 months agocltadm.8: Correct documentation of -r arg to port command
John Baldwin [Wed, 27 Dec 2023 18:10:05 +0000 (10:10 -0800)]
cltadm.8: Correct documentation of -r arg to port command

-r does not take a target port argument

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42932

6 months agoctl: Add missing comma after CTL_FLAG_ALREADY_DONE
John Baldwin [Wed, 27 Dec 2023 18:09:52 +0000 (10:09 -0800)]
ctl: Add missing comma after CTL_FLAG_ALREADY_DONE

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42930

6 months agoctl_frontend.h: Note that ctl_port.frontend is set by the FETD
John Baldwin [Wed, 27 Dec 2023 18:09:40 +0000 (10:09 -0800)]
ctl_frontend.h: Note that ctl_port.frontend is set by the FETD

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42931

6 months agoctl: Always return errno values from ctl_port_register
John Baldwin [Wed, 27 Dec 2023 18:09:24 +0000 (10:09 -0800)]
ctl: Always return errno values from ctl_port_register

Return EBUSY instead of a bare 1 if a port number is already active.

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42929

6 months agonfsstat: update option strings in docs
Lexi Winter [Wed, 27 Dec 2023 17:30:31 +0000 (17:30 +0000)]
nfsstat: update option strings in docs

Add the missing -q option to the nfsstat(1) manpage SYNOPSIS (it is
already documented in DESCRIPTION), and add the missing -E and -q
options to the built-in usage output.

PR: 275912
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/958

6 months agoFix multiple bugs with ctld's UCL parsing
Alan Somers [Mon, 9 Oct 2023 18:26:25 +0000 (12:26 -0600)]
Fix multiple bugs with ctld's UCL parsing

* Don't segfault when parsing a misformatted auth-group section
* If the config file specifies a chap section within a target but no
  auth-group, create a new anonymous auth-group.  That matches the
  behavior with non-UCL config files.
* Protect some potential segfaults with assertions

PR: 274380
MFC after: 1 week
Sponsored by: Axcient
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D43198

6 months agoimprove handling of shell metacharacters in filenames
Wolfram Schneider [Wed, 27 Dec 2023 17:35:08 +0000 (17:35 +0000)]
improve handling of shell metacharacters in filenames

PR: 275967
MFC after: 1 week

6 months agoinpcb: poison several inpcb pointer in in_pcbfree()
Gleb Smirnoff [Wed, 27 Dec 2023 16:34:37 +0000 (08:34 -0800)]
inpcb: poison several inpcb pointer in in_pcbfree()

There are few subsystems that reference inpcb and allow it to outlive
in_pcbfree().  There are no known bugs with them to unreference the
options pointers for a freed inpcb.  Enforce this so that such bugs
don't appear in the future.

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

6 months agoinpcb: reoder inpcb destruction
Gleb Smirnoff [Wed, 27 Dec 2023 16:34:37 +0000 (08:34 -0800)]
inpcb: reoder inpcb destruction

First, merge in_pcbdetach() with in_pcbfree().  The comment for
in_pcbdetach() was no longer correct.  Then, make sure we remove
the inpcb from the hash before we commit any destructive actions
on it.  There are couple functions that rely on the hash lock
skipping SMR + inpcb lock to lookup an inpcb.  Although there are
no known functions that similarly rely on the global inpcb list
lock, also do list removal before destructive actions.

PR: 273890
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D43122

6 months agofortune: update mailing list search url
Christos Margiolis [Wed, 27 Dec 2023 16:28:11 +0000 (18:28 +0200)]
fortune: update mailing list search url

Markmail no longer exists.

Reviewed by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D43209

6 months agodaemon: fix recent style regressions
Kyle Evans [Wed, 27 Dec 2023 16:08:28 +0000 (10:08 -0600)]
daemon: fix recent style regressions

Re-wrap the read(2) line, and make the listen_child loop more explicit
in intent.

Reported by: kib
Fixes: 6ac7c9f06ae9 ("daemon: remove redundant parameter from [...]")

6 months agonetmap: Ignore errors in CSB_WRITE()
Mark Johnston [Wed, 27 Dec 2023 15:13:29 +0000 (10:13 -0500)]
netmap: Ignore errors in CSB_WRITE()

The CSB_WRITE() and _READ() macros respectively write to and read from
userspace memory and so can in principle fault.  However, we do not
check for errors and will proceed blindly if they fail.  Add assertions
to verify that they do not.

This is in preparation for annotating copyin() and related functions
with __result_use_check.

Reviewed by: vmaffione
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43200

6 months agolinux: Check for copyout errors in ioctl handlers
Mark Johnston [Wed, 27 Dec 2023 15:13:15 +0000 (10:13 -0500)]
linux: Check for copyout errors in ioctl handlers

In preparation for annotating copyin() and friends with
__result_use_check.

Reviewed by: dchagin
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43199

6 months agolinuxkpi: Annotate an unused variable as such
Mark Johnston [Wed, 27 Dec 2023 15:11:33 +0000 (10:11 -0500)]
linuxkpi: Annotate an unused variable as such

This addresses a -Wunused-but-set-variable warning in the gcc builds.

No functional change intended.

Reported by: Jenkins

6 months agoConvert fsidcmp(9) from macro to inline function
Konstantin Belousov [Tue, 26 Dec 2023 19:39:33 +0000 (21:39 +0200)]
Convert fsidcmp(9) from macro to inline function

This allows type checking the arguments.

Explicit structure members comparisions are done to avoid introducting
string.h pollution for userspace.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43205

6 months agogpioevents: Fix a typo in a diagnostic output message
Gordon Bergling [Wed, 27 Dec 2023 08:41:48 +0000 (09:41 +0100)]
gpioevents: Fix a typo in a diagnostic output message

- s/recieved/received/

MFC after: 3 days

6 months agoipfw(4): Fix a typo in a source code comment
Gordon Bergling [Wed, 27 Dec 2023 08:38:43 +0000 (09:38 +0100)]
ipfw(4): Fix a typo in a source code comment

- s/preserv/preserve/

MFC after: 3 days

6 months agohvsock: Fix a typo in a source code comment
Gordon Bergling [Wed, 27 Dec 2023 08:37:29 +0000 (09:37 +0100)]
hvsock: Fix a typo in a source code comment

- s/recieved/received/

MFC after: 3 days

6 months agotcp_stacks: Fix two typos in a source code comments
Gordon Bergling [Wed, 27 Dec 2023 08:36:30 +0000 (09:36 +0100)]
tcp_stacks: Fix two typos in a source code comments

- s/recieved/received/

MFC after: 3 days

6 months agotail(1): Fix a typo in a source code comment
Gordon Bergling [Wed, 27 Dec 2023 08:35:38 +0000 (09:35 +0100)]
tail(1): Fix a typo in a source code comment

- s/recieved/received/

MFC after: 3 days

6 months agodaemon: separate pipe_fd[2] into pipe_rd and pipe_wr
Ihor Antonov [Wed, 27 Dec 2023 06:07:26 +0000 (00:07 -0600)]
daemon: separate pipe_fd[2] into pipe_rd and pipe_wr

This improves code readability and prevents mixing up read and write
ends of the pipe.

Reviewed by: cperciva, kevans
Requested by: kevans

6 months agodaemon: replace memchr with memrchr
Ihor Antonov [Wed, 27 Dec 2023 06:07:26 +0000 (00:07 -0600)]
daemon: replace memchr with memrchr

Looping over lines in the buffer is not needed.
Same effect can be achieved by looking for the last new line.
If found the buffer is guaranteed to have one or more complete lines.
All complete lines are flushed at once with no looping.

Reviewed by: cperciva, kevans

6 months agodaemon: move buffer into daemon_state
Ihor Antonov [Wed, 27 Dec 2023 06:07:25 +0000 (00:07 -0600)]
daemon: move buffer into daemon_state

There is no reason for a buffer in listen_child()
to be a static function variable. The buffer and
its position are parts of the daemon state and should
live together with the rest of the state variables.

Reviewed by: cperciva, kevans

6 months agodaemon: remove redundant parameter from listen_child()
Ihor Antonov [Wed, 27 Dec 2023 06:07:25 +0000 (00:07 -0600)]
daemon: remove redundant parameter from listen_child()

state already contains pipe fd

Reviewed by: cperciva, kevans

6 months agodaemon: fix clang-tidy warnings
Ihor Antonov [Wed, 27 Dec 2023 06:07:25 +0000 (00:07 -0600)]
daemon: fix clang-tidy warnings

Fixed narrowing conversions:
- strtol replaced with strtonum with range check
- read returns ssize_t
- kevent.data explicitly cast to int before passing into strerror

While we we're here:
- Defined and documented maximum restart delay.
- Fixed typo in a comment.
- Remove unused includes

Reviewed by: cperciva, kevans

6 months agonetlink: simplify socket destruction
Gleb Smirnoff [Wed, 27 Dec 2023 04:22:12 +0000 (20:22 -0800)]
netlink: simplify socket destruction

Destroy the socket at the file descriptor close(2).  There is no
reason to linger for any longer, there are no external references.
Remove pr_detach method as nothing left to do after pr_close.
Remove pr_abort method as it shall never be executed for this type
of socket.

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D42521

6 months agolinux/netlink: don't override sopt level
Gleb Smirnoff [Wed, 27 Dec 2023 04:21:58 +0000 (20:21 -0800)]
linux/netlink: don't override sopt level

This override effectively prevents correct entering of netlink
protocol specific pr_ctloutput in sosetopt().

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D42520

6 months agonetlink: remove unused structure
Gleb Smirnoff [Wed, 27 Dec 2023 04:21:58 +0000 (20:21 -0800)]
netlink: remove unused structure

6 months agoSchedule fast taskqueue callouts on right CPU.
Alexander Motin [Wed, 27 Dec 2023 03:30:56 +0000 (22:30 -0500)]
Schedule fast taskqueue callouts on right CPU.

With fast taskqueues using direct callouts we can reduce number of
CPU wakeups by scheduling callout on current CPU if taskqueue calls
taskqueue_enqueue_timeout() on itself.  The trick won't work for
regular taskqueues, since the callout thread will occupy the CPU.
It also may not work in case of multiple threads since we do not
know which thread will pick the task, and we do not want excessive
callout migrations.  So we optimize only the other cases we can.

In practice this allows iichid(4) taskqueue to stay on CPU where
underlying ig4(4) interrupts are routed and to not kick CPU 0 with
timer interrupts on each sampling period (every 2nd/3rd sleep).

MFC after: 1 month

6 months agoBlock cloning tests.
Pawel Jakub Dawidek [Tue, 26 Dec 2023 20:01:53 +0000 (12:01 -0800)]
Block cloning tests.

The test mostly focus on testing various corner cases.
The tests take a long time to run, so for the common.run runfile
we randomly select a hundred tests.
To run all the bclone tests, bclone.run runfile should be used.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #15631

6 months agonetpfil: Use accessor functions and named constants for all tcphdr flags
Richard Scheffenegger [Mon, 25 Dec 2023 11:26:25 +0000 (12:26 +0100)]
netpfil: Use accessor functions and named constants for all tcphdr flags

Update all remaining references to the struct tcphdr th_x2 field.
This completes the compatibilty of various aspects with AccECN
(TH_AE), after the internal ipfw "re-checksum required" was moved
to use the TH_RES1 flag.

No functional change.

Reviewed By:           tuexen, #transport, glebius
Sponsored by:          NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43172

6 months agoiichid(4): Switch taskqueue to "fast"
Alexander Motin [Wed, 27 Dec 2023 00:36:34 +0000 (19:36 -0500)]
iichid(4): Switch taskqueue to "fast"

While "fast" taskqueue may be more expensive due to spinlock use,
when used mainly for timeout tasks it allows to avoid extra context
switches to and from callout thread, that is even more expensive.

MFC after: 1 month

6 months agoiichid(4): Unify two taskqueue tasks
Alexander Motin [Wed, 27 Dec 2023 00:28:56 +0000 (19:28 -0500)]
iichid(4): Unify two taskqueue tasks

taskqueue_enqueue_timeout(0) is equivalent to taskqueue_enqueue(),
so no need to create a separate periodic_task and event_task to run
exactly the same handler.

MFC after: 1 month

6 months agofb: Explicitly handle errors when getting or setting a colour palette
Mark Johnston [Wed, 27 Dec 2023 00:00:14 +0000 (19:00 -0500)]
fb: Explicitly handle errors when getting or setting a colour palette

In the VESA driver, simply ignore errors.  It is not clear to me how to
return them to userspace.

This is in preparation for annotating copyin() and related functions
with __result_use_check.

MFC after: 1 week

6 months agohptmv: Handle errors from copyout() in hpt_set_info()
Mark Johnston [Wed, 27 Dec 2023 00:00:01 +0000 (19:00 -0500)]
hptmv: Handle errors from copyout() in hpt_set_info()

This is in preparation for annotating copyin() and related functions
with __result_use_check.

MFC after: 1 week