Commit Graph

255726 Commits

Author SHA1 Message Date
Kyle Evans
4832d2e8ae du: tests: fix the H_flag test (primarily grep usage)
This test attempts to use \t (tab intended) in a grep expression.  With the
former /usr/bin/grep (i.e. gnugrep), this was interpreted as a literal 't'.
The expression would work anyways because the tr(1) usage would ultimately
replace all of the spaces with a single newline, and they would match the
paths whether they were correctly fromatted or not.

Current /usr/bin/grep (i.e. bsdgrep) is less-tolerant of ordinary-escapes, a
property of the underlying regex(3) engine, to make it easier to identify
when stuff like this happens. In-fact, this expression broke after the
switch happened.

This revision does the bare basics to fix the usage by using a printf to get
a literal tab character to insert into the expression. It also swaps out the
manual insertion of the line prefix into the grep expression by pulling
that part out of $sep and reusing it for the leading path.

The secondary issue was the tr(1) usage, since tr would only replace the
first character of string1 with the first character of string2.  This has
instead been replaced by a sed expression, which similary understands \n to
be a newline on all supported versions of FreeBSD.  Each path now gets
prefixed with the appropriate context that should be there (i.e. numeric
sequence followed by a tab).

PR:		252446
Reviewed by:	emaste, ngie
Differential Revision:	https://reviews.freebsd.org/D27983
2021-01-07 16:36:31 -06:00
Kyle Evans
27e90f70e0 stand: remove bogus dependency from libsa32
libsa32 is independent of libsa, they can build in parallel if needed.
2021-01-07 16:28:21 -06:00
Kyle Evans
e41367e3ae stand: avoid adding fdt SUBDIR_DEPEND if WITHOUT_FDT is set
This unbreaks the efi build if WITHOUT_FDT is set.

Reported by:	peterj
2021-01-07 16:28:20 -06:00
Kristof Provost
0fcb03fbac pf: Copy kif flags to userspace
This was overlooked in the pfi_kkif/pfi_kif splitup and as a result
userspace could no longer tell which interfaces had the skip flag
applied.

MFC after:	2 weeks
2021-01-07 22:26:05 +01:00
Matt Macy
81be655266 iflib: ensure that tx interrupts enabled and cleanups
Doing a 'dd' over iscsi will reliably cause stalls. Tx
cleaning _should_ reliably happen as data is sent.
However, currently if the transmit queue fills it will
wait until the iflib timer (hz/2) runs.

This change causes the the tx taskq thread to be run
if there are completed descriptors.

While here:

- make timer interrupt delay a sysctl

- simplify txd_db_check handling

- comment on INTR types

Background on the change:

Initially doorbell updates were minimized by only writing to the register
on every fourth packet. If txq_drain would return without writing to the
doorbell it scheduled a callout on the next tick to do the doorbell write
to ensure that the write otherwise happened "soon". At that time a sysctl
was added for users to avoid the potential added latency by simply writing
to the doorbell register on every packet. This worked perfectly well for
e1000 and ixgbe ... and appeared to work well on ixl. However, as it
turned out there was a race to this approach that would lockup the ixl MAC.
It was possible for a lower producer index to be written after a higher one.
On e1000 and ixgbe this was harmless - on ixl it was fatal. My initial
response was to add a lock around doorbell writes - fixing the problem but
adding an unacceptable amount of lock contention.

The next iteration was to use transmit interrupts to drive delayed doorbell
writes. If there were no packets in the queue all doorbell writes would be
immediate as the queue started to fill up we could delay doorbell writes
further and further. At the start of drain if we've cleaned any packets we
know we've moved the state machine along and we write the doorbell (an
obvious missing optimization was to skip that doorbell write if db_pending
is zero). This change required that tx interrupts be scheduled periodically
as opposed to just when the hardware txq was full. However, that just leads
to our next problem.

Initially dedicated msix vectors were used for both tx and rx. However, it
was often possible to use up all available vectors before we set up all the
queues we wanted. By having rx and tx share a vector for a given queue we
could halve the number of vectors used by a given configuration. The problem
here is that with this change only e1000 passed the necessary value to have
the fast interrupt drive tx when appropriate.

Reported by: mav@
Tested by: mav@
Reviewed by:    gallatin@
MFC after:      1 month
Sponsored by:   iXsystems
Differential Revision:  https://reviews.freebsd.org/D27683
2021-01-07 14:07:35 -08:00
Chuck Silvers
11403bdeb4 vfs: fix rangelock range in vn_rdwr() for IO_APPEND
vn_rdwr() must lock the entire file range for IO_APPEND
just like vn_io_fault() does for O_APPEND.

Reviewed by:	kib, imp, mckusick
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D28008
2021-01-07 13:37:35 -08:00
Mateusz Piotrowski
79eca6520e Fix date
It's 2021 already.

Reported by:	delphij
2021-01-07 21:15:26 +01:00
Mitchell Horne
40d0971bbe arm64: enable build of the ipmi module
Only ACPI attachment is supported for now, some others depend on the
presence of smbios(4) support, which we lack on arm64.

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28009
2021-01-07 15:45:25 -04:00
Alexander V. Chernikov
d68cf57b7f Refactor rt_addrmsg() and rt_routemsg().
Summary:
* Refactor rt_addrmsg(): make V_rt_add_addr_allfibs decision locally.
* Fix rt_routemsg() and multipath by accepting nexthop instead of interface pointer.
* Refactor rtsock_routemsg(): avoid accessing rtentry fields directly.
* Simplify in_addprefix() by moving prefix search to a separate  function.

Reviewers: #network

Subscribers: imp, ae, bz

Differential Revision: https://reviews.freebsd.org/D28011
2021-01-07 19:38:19 +00:00
Mitchell Horne
4979620ece armv8crypto: add AES-XTS support
A straightforward(ish) port from aesni(4). This implementation does not
perform loop unrolling on the input blocks, so this is left as a future
performance improvement.

Submitted by:	Greg V <greg AT unrelenting.technology>
Looks good:	jhb, jmg
Tested by:	mhorne
Differential Revision:	https://reviews.freebsd.org/D21017
2021-01-07 15:35:20 -04:00
Toomas Soome
1790f5e654 loader: do not update palette in text mode
Apparently palette update while in text mode, will cause
some adapters to end up with blank display.
2021-01-07 17:07:53 +02:00
Andrew Gallatin
a2fc8ade10 isci: use maxphys rather than 128KB to size s/g list
In the conversion into a tunable, we converted the
size of the s/g list used by the driver to be based
off of a hardcoded size of 128k rather than maxphys,
this caused performance problems for us.  Revert this
to use the maxphys tunable.

Note that this constant is used to size dynamically allocated
things, and not static data structs, so this is safe.

Reviewed By:    imp, kib, mav
Tested By:i     dhw
Differential Revision: https://reviews.freebsd.org/D28023
Sponsored by: Netflix
2021-01-07 12:45:46 -05:00
Neel Chauhan
4d64c7243d Fix the bug in committers-ports.dot with my mentor.
Reviewed by:            0mp
Approved by:            0mp (mentor)
Differential Revision:  https://reviews.freebsd.org/D28022
2021-01-07 08:51:25 -08:00
Alex Richardson
f309bd633b src.conf.5: regenerate after MK_WERROR change
This was missed in 7fa2f2a62f.
2021-01-07 16:15:58 +00:00
Ed Maste
f45f9ef051 arm64 GENERIC: sort to match amd64, to ease comparison
No functional change - only moved lines, changed whitespace, and
updated comments.

Reviewed by:	allanjude
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28001
2021-01-07 10:01:48 -05:00
Hans Petter Selasky
ea0efc3704 Add support for PL2303HXN to uplcom(4).
Code changes in this commit were obtained from straight from OpenBSD's
uplcom.c with almost no modification, the list of chip names and USB
IDs was obtained from Linux.

Differential Revision: https://reviews.freebsd.org/D27952
Submitted by: tomli_tomli.me (Yifeng Li)
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-07 15:35:35 +01:00
Hans Petter Selasky
c834f30a0c Add new PCI ID for XHCI(4).
Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
2021-01-07 15:35:35 +01:00
Mateusz Piotrowski
0199cbf641 Fix a typo
MFC after:	3 days
2021-01-07 15:28:29 +01:00
Baptiste Daroussin
8537f16249 libcompat: remove redundant path for ncurses
Reported by:	kevans
2021-01-07 15:14:52 +01:00
Alex Richardson
d146f83180 prepare-commit-msg: Avoid warning on macOS and shellcheck fixes
The macOS /bin/sh complains about using return outside of functions.
Replace `return 0` with `exit 0` to fix this. While editing this files
I've also fixed all the shellcheck warnings that were displayed by my IDE.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D28016
2021-01-07 14:00:32 +00:00
Alex Richardson
b500c184b6 Drop some unncessary stale code from Makefile.boot
No longer required after 0e1e341b48.
2021-01-07 10:55:21 +00:00
Alex Richardson
d037edf820 tools/build/make.py: Fix macOS build after a920b9817
If we set STRIPBIN, we also have to set XSTRIPBIN since we otherwise
use the host /usr/bin/strip during buildworld. However, this does not
work on macOS since /usr/bin/strip doesn't handle ELF binaries.
2021-01-07 10:55:21 +00:00
Alex Richardson
7fa2f2a62f Rename NO_WERROR -> MK_WERROR=no
As suggested in D27598. This also supports MK_WERROR.clang=no and
MK_WERROR.gcc=no to support the existing NO_WERROR.<compiler> uses.

Reviewed By:	brooks
Differential Revision: https://reviews.freebsd.org/D27601
2021-01-07 09:31:03 +00:00
Alex Richardson
94ffff68c8 Stop passing MK_WARNS=no for bootstrap tools
I got annoyed by the number of warnings that the CheriBSD build was
emitting. It turns out that we are emitting lots of warnings during
bootstrap because bootstrap tools are built with the default compiler
flags and ignore the warnings flags that are set in bsd.sys.mk.

Looking at git blame, it appears that MK_WARNS=no has been passed since
rS112869, replacing the -DNO_WERROR option that was added in rS87775.

This commit changes MK_WARNS=no back to -DNO_WERROR. We need to pass
-DNO_WERROR, since the system compiler might have new warnings that we
don't know about yet, and we shouldn't fail the build in that case.

Reviewed By:	imp, brooks
Differential Revision: https://reviews.freebsd.org/D27598
2021-01-07 09:31:03 +00:00
Alex Richardson
7467c537a5 Fix warnings during bootstrap phase on macOS 2021-01-07 09:31:03 +00:00
Alex Richardson
4e64fb9f49 Fix warnings during bootstrap on Linux systems
Most warnings are currently off for the boostrap phase, but once D27598
lands they will be enabled again.
2021-01-07 09:30:50 +00:00
Alex Richardson
ed8455806e Fix all warnings emitted in make kernel-toolchain
With this change and D27598 make kernel-toolchain no longer emits any
warnings for me.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D27599
2021-01-07 09:26:22 +00:00
Alex Richardson
7b0d3a3ccf include: Use printf(1) instead of shell loops for header symlinks
Using a shell for loop means we have to spawn a separate install(1)
process for each header that is symlinked. This patch uses printf(1) to
generate an argument list that has been prefixed with the correct number
of ../ and then uses a single install(1) invocation.

This reduces the number of execve() calls during make includes from 2442
(with D27622) to 1382. Running `make symlinks` in include/ now spawns 214
processes instead of 1276 without this patch.

Reviewed By:	jhb
Differential Revision: https://reviews.freebsd.org/D27723
2021-01-07 09:26:22 +00:00
Alex Richardson
0cace0bb0a Add mkimg to the list of bootstrap tools
Having this as part of the bootstrap tools is useful to build disk images
to boot in QEMU (especially when building on a Linux/macOS host where
mkimg is not available). We have been bootstrapping mkimg in CheriBSD for
a long time (using LOCAL_XTOOL_DIRS) but I believe this is also useful
upstream.

Reviewed By:	emaste, brooks
Differential Revision: https://reviews.freebsd.org/D27602
2021-01-07 09:26:21 +00:00
Alex Richardson
fe41c64b57 Fix -Wpointer-sign warnings in makefs and mkimg
Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D27175
2021-01-07 09:26:21 +00:00
Alex Richardson
1f6612b444 Install dtrace.h and dependencies
This makes the minimum amount of changes to allow inclusion of dtrace.h
without all the solaris compatibility headers. Installing dtrace.h allows
compiling consumers of libdtrace (e.g. https://github.com/tmetsch/python-dtrace)
without requiring a copy of the source tree.
For python-dtrace I worked around this in 58019c9a12
but being able to build the library without installed sources would be
extremely useful.

Reviewed By:	gnn
Differential Revision: https://reviews.freebsd.org/D27884
2021-01-07 09:26:21 +00:00
Mateusz Piotrowski
74bd207697 Reference newfs_msdos(8) from the newfs(8) manual
PR:		252484
Reported by:	Graham Perrin <grahamperrin@gmail.com>
MFC after:	3 days
2021-01-07 10:24:07 +01:00
Vincenzo Maffione
163f4f1573 netmap: bridge: fix NS_MOREFRAG support
Support for NS_MOREFRAG is broken, as NS_MOREFRAG is copied from
the TX slot to the RX slot rather than the other way around.
Also, the NS_MOREFRAG must be copied also in case of packet
copy (no zerocopy).

Reported by:	rajesh1.kumar_amd.com
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D27980
2021-01-07 07:05:57 +00:00
Neel Chauhan
710dd05c0e Add my name/handle/mentor to committers-ports.dot 2021-01-06 17:30:21 -08:00
Kirk McKusick
c8a7a3ffe1 Fix bug in expanding lost+found direct blocks.
Reported by:  Peter Holm
Sponsored by: Netflix
2021-01-06 16:35:01 -08:00
Mateusz Guzik
f2b794e1e9 cache: unengrish the comment in previous commit
Reported by:	rpokala, brd
2021-01-06 23:46:05 +00:00
Kristof Provost
c38e59ce1b pfctl: Fix NOCLEAN build
We've created a new pf_ruleset.c file for pfctl and no longer use the
kernel vrsion, but the build system doesn't handle this dependency
change correctly. Delete the dependency file if it contains the kernel
version of the file.

MFC after:	2 weeks
2021-01-06 22:07:46 +01:00
Marcin Wojtas
ca71c7e3bb arm64: QorIQ: gpio: return BUS_PROBE_DEFAULT
There is no reason this driver can't return default probe value.

Submitted by: Artur Rojek <ar@semihalf.com>
Reviewed by: emaste, mmel
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D26869
2021-01-06 22:37:38 +01:00
Marcin Wojtas
39c24889b0 arm64: QorIQ: gpio: Cleanup qoriq_gpio_* helpers
Replace various hw reg bit set/clear helpers with a universal
`qoriq_gpio_set` function.

Submitted by: Artur Rojek <ar@semihalf.com>
Reviewed by: mmel
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D26868
2021-01-06 22:37:21 +01:00
Marcin Wojtas
c76c36f95c arm64: QorIQ: gpio: Style cleanups
Make the code more conformant to style(9) and improve the general
readability.

This patch does not alter the driver logic.

Submitted by: Artur Rojek <ar@semihalf.com>
Reviewed by: mmel
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D26867
2021-01-06 22:37:13 +01:00
Robert Wing
b1ea63e2e3 bectl(8): sync man page and help text
Sync man page with behavior of bectl(8).

Sync help text with man page.

PR:             246697
Reported by:	olgeni
Submitted by:   olgeni (with changes)
Reviewed by:    kevans, olgeni
Approved by:    kevans (mentor)
MFC after:      1 week
Differential Revision:	https://reviews.freebsd.org/D27482
2021-01-06 10:38:25 -09:00
Fernando Apesteguía
439862883f gstat(8): Bump .Dd
Forgotten in cfaa2958dc

PR: 251313
Differential Revision: https://reviews.freebsd.org/D27815
2021-01-06 19:04:09 +01:00
Fernando Apesteguía
cfaa2958dc gstat(8): Document interactive keyboard commands
gstat(8) allows for <, >, c, f, F and q while in interactive mode.

PR:	251313
Submitted by:	bojan_petrovic@fastmail.fm
Approved by:	manpages (0mp@)
Differential Revision:	https://reviews.freebsd.org/D27815
2021-01-06 18:55:03 +01:00
Mateusz Piotrowski
3efe9b3e77 Fix a couple of typos and formatting issues 2021-01-06 16:19:15 +01:00
Toomas Soome
f1829643c4 vtfontcvt is part of bootstrap toolset and should always be built
Reported by: Peter Jeremy
2021-01-06 14:52:13 +02:00
Toomas Soome
babda0952f loader: instead of hw.vga.textmode, use screen.textmode
hw.vga.textmode is directing VT VGA backend to use text mode.

The default screen mode for BIOS loader is text, and default
screen mode for VT VGA backend is graphics (unless we are running on
hypervisor or hw.vga.textmode is set to 1). Using hw.vga.textmode
for loader does remove possibility to have graphical mode VT VGA with
text mode loader.

screen.textmode can have possible values "0" to disable text mode,
and "1" to set text mode.
2021-01-06 14:38:55 +02:00
Toomas Soome
31c2bcad7e loader: remove left over call to unsetenv()
We do not touch kern.vt.fb.default_mode.
2021-01-06 14:35:26 +02:00
Baptiste Daroussin
ae994fdc5b pkg(7): rework the arguments handling
Rework the arguments handling around using getopt_long:
* add long option support
* add -4 and -6 support to enforce ipv4 or ipv6

While here fix a regression which occured between FreeBSD 12.1 and
FreeBSD 12.2 where pkg bootstrap -y stopped working

PR:		252270
MFC after:	2 weeks
Submitted by:	evilham <contact@evilham.com>
Differential Revision:	https://reviews.freebsd.org/D27860
2021-01-06 11:47:34 +01:00
Toomas Soome
99870c70ba loader: rewrite vidc_install_font
Instead of trying to set reasonable register values, save significant
register values, then prepare for font upload and then restore
registers from saved data.

This seems to fix text mode for most cases where text mode breakage
was reported.
2021-01-06 10:20:04 +02:00
Mateusz Guzik
deabdc6868 cache: stop pre-checking seqc when starting the lookup
Tested by:	pho
2021-01-06 07:28:07 +00:00