closefrom_test: Fix the first test
The first test is supposed to close the new fd, but was instead not
closing anything.
Reviewed by: ngie, markj
Fixes: 3cedbec3ee08 ("Integrate tools/regression/fifo into ...")
Differential Revision: https://reviews.freebsd.org/D52799
modules/allwinner: add nvmem_if.h to SRCS
Ensure the header is generated; it is a dependency for these drivers.
This fixes standalone module builds and riscv LINT.
Reported by: zlei
Sponsored by: The FreeBSD Foundation
Fixes: 5522519731b7 ("modules: enable allwinner kmods on riscv")
(cherry picked from commit fe7954d723f85abd6eaf035db92a3a60a7803eb4)
arm: tweak imx module build logic
Add the subdirectory in the Makefile, not the config.
No functional change intended.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 5aefe9f16f240696142894bdeabcebbb057c7053)
modules: enable allwinner kmods on riscv
While here, standardize the place they are enabled in the Makefile. For
armv7 the module subdirectory was added explicitly in the config file,
but this is not idiomatic.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 5522519731b74e7b56c710ec5ea4d34065f3ed32)
modules: fix some riscv module logic
The change which enabled the sdhci_fdt module build on riscv
inadvertently enabled the neta module as well. This driver is not needed
on this platform.
Move each entry to a respective identical conditional blocks.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Fixes: e9dd9f95f82f ("riscv: Add the sdhci_fdt driver to the build")
(cherry picked from commit ddc1d4b0722bd63934f503c43a5ee35d871355ee)
man4: move allwinner pages and logic to a standard place
They are shared by arm, arm64, and now riscv. Note that they are
always installed by default, where MAN_ARCH=all.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52585
(cherry picked from commit 15c79c6fa60809a9dc627e5051704cf2a556c6db)
riscv: build starfive JH7110 DTBs
These are known to work if loaded manually by loader(8) (for VF2 at
least). If nothing else, it is useful to provide a DTB closely tied to
the kernel version.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53117
(cherry picked from commit 96b137c044d8f7266757e95ff134119f3ac51be5)
dtb: sort by vendor on riscv
Just like arm64, our DTS comes from Linux and is correctly sorted into
subdirectories by vendor. Enable the logic to preserve these directories
in the installation, for example:
/boot/dtb/sifive/hifive-unmatched-a00.dtb
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53116
(cherry picked from commit cf202819af2337c0b652ac9290964c2ef7a1ae3c)
riscv: build allwinner DTBs
These are known to work if loaded manually by loader(8) (for the Nezha
board at least). If nothing else, it is useful to provide a DTB closely
tied to the kernel version.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53118
(cherry picked from commit 3ed48eb085f7c4ae5c019ee882e694b432d43911)
fusefs: add a regression test for a cluster_read bug
VOP_BMAP is purely advisory. If VOP_BMAP returns an error during
readahead, cluster_read should still succeed, because the actual data
was still read just fine.
Add a regression test for PR 264196, wherein cluster_read would fail if
VOP_BMAP did.
PR: 264196
MFC with: 62aef3f73f38db9fb68bffc12cc8900fecd58f0e
Reported by: danfe
Reviewed by: arrowd
Differential Revision: https://reviews.freebsd.org/D51316
UDP: let udp_pcblist() support UDP and UDP-Lite
Provide the IPPROTO_UDP in the arg2 parameter of udp_pcblist() and use
this to determine the inpcbinfo. This allows the same function to be
used in an upcoming commit to provide the list of pcbs for UDP-Lite
just by providing IPPROTO_UDPLITE in the arg2 parameter.
Reviewed by: rrs
Differential Revision: https://reviews.freebsd.org/D53218
(cherry picked from commit be3c59ff508204dbab9e3616dc82ed7620f05d0c)
tcp: cleanup of syncache_expand()
* Consistently free the string after unlocking the sch, if possible.
* Remove the failure handling in case of sc != NULL, since this is
not possible anymore.
* Remove the use of goto and instead return 0 in the three cases.
The only change in behavior is that in three out of the four cases,
where 0 is returned, *lsop is not set to NULL anymore. So the behavior
is now consistent and also documented in a comment. The current in
tree callers only look at *lsop, if and only if syncache_expand()
returns 1.
Reviewed by: Peter Lei
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D52948
(cherry picked from commit aafdbf83b926519cb47de8f16a1a40c1ef3c84b5)
UDP: let udp_pcblist() support UDP and UDP-Lite
Provide the IPPROTO_UDP in the arg2 parameter of udp_pcblist() and use
this to determine the inpcbinfo. This allows the same function to be
used in an upcoming commit to provide the list of pcbs for UDP-Lite
just by providing IPPROTO_UDPLITE in the arg2 parameter.
Reviewed by: rrs
Differential Revision: https://reviews.freebsd.org/D53218
(cherry picked from commit be3c59ff508204dbab9e3616dc82ed7620f05d0c)
sockstat: fix column length for PROTO
The computation of the length was not taking into account that IPv6
endpoints, which are not IPv6 only, have a suffix of 46.
For UDP and TCP this bug was not relevant, since tcp46 and udp46
has the same length as PROTO, but sctp46 is longer. Upcoming
udplite support will also be affected.
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D53212
(cherry picked from commit 4ee0ddae1dab05dd8e3f273d861043c3e2919f23)
tcp: cleanup of syncache_expand()
* Consistently free the string after unlocking the sch, if possible.
* Remove the failure handling in case of sc != NULL, since this is
not possible anymore.
* Remove the use of goto and instead return 0 in the three cases.
The only change in behavior is that in three out of the four cases,
where 0 is returned, *lsop is not set to NULL anymore. So the behavior
is now consistent and also documented in a comment. The current in
tree callers only look at *lsop, if and only if syncache_expand()
returns 1.
Reviewed by: Peter Lei
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D52948
(cherry picked from commit aafdbf83b926519cb47de8f16a1a40c1ef3c84b5)
share/mk: Add opencsd to the list of private libs
Reported by: Sarah Walker <Sarah.Walker2 at arm.com>
Reviewed by: emaste
Fixes: 1c52229528e7 ("lib: Move libopencsd to /usr/lib and make private")
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D53217
modules/dtb: Add the ARM dtb module
fvp-base-revc.dtb works with the kernel now interrupt-maps are
supported in more cases.
Reviewed by: mhorne
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D51258
w: Trim whitespace and commas from time and uptime
When producing formatted output, trim leading whitespace and trailing
commas from the human-readable time and uptime before emitting them.
The text output remains unchanged.
PR: 290089
Fixes: 6e6febb54da9 ("w: Fix idle time in json output, add login/idle times to json output")
Reviewed by: marius.h_lden.org
Differential Revision: https://reviews.freebsd.org/D53167
tcp over udp: don't copy more bytes than avaiable
When copying the data in the first mbuf to get rid of the UDP
header, use the correct length. It was copying too much (8 bytes,
the length of the UDP header).
This only applies to handling TCP over UDP packets. The support for
TCP over UDP is disabled by default.
Reported by: jtl
Reviewed by: Peter Lei
MFC after: 3 days
Sponsored by: Netflix, Inc.
netstat: add support for UDP-Lite endpoints
With this patch UDP-Lite endpoints are also shown per default.
Reviewed by: Nick Banks
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53252
sockstat: add support for UDP-Lite endpoints
With this patch UDP-Lite endpoints are also show per default.
Reviewed by: Peter Lei, Nick Banks
MFC after: 3 days
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D53230
UDP-Lite: export pcblist via sysctl interface
Export the list of pcbs for UDP-Lite to be consumed by sockstat and
netstat.
Reviewed by: Peter Lei, Nick Banks
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53229