Commit graph

579 commits

Author SHA1 Message Date
John Baldwin a8089ea5ae nvmfd: A simple userspace daemon for the NVMe over Fabrics controller
This daemon can operate as a purely userspace controller exporting one
or more simulated RAM disks or local block devices as NVMe namespaces
to a remote host.  In this case the daemon provides a discovery
controller with a single entry for an I/O controller.

nvmfd can also offload I/O controller queue pairs to the nvmft.ko
in-kernel Fabrics controller when -K is passed.  In this mode, nvmfd
still accepts connections and performs initial transport-specific
negotitation in userland.  The daemon still provides a userspace-only
discovery controller with a single entry for an I/O controller.
However, queue pairs for the I/O controller are handed off to the CTL
NVMF frontend.

Eventually ctld(8) should be refactored to to provide an abstraction
for the frontend protocol and the discovery and the kernel mode of
this daemon should be merged into ctld(8).  At that point this daemon
can be moved to tools/tools/nvmf as a debugging tool (mostly as sample
code for a userspace controller using libnvmf).

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44731
2024-05-02 16:38:39 -07:00
Warner Losh 8a7b612037 usr.sbin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2023-11-26 22:23:56 -07:00
Baptiste Daroussin 5b9f08dbc7 bsdconfig: always build and install
it does not depend on dialog(1) anymore
2023-10-05 09:51:16 +02:00
Mitchell Horne 773606fcdf ofwdump: install dependent on MK_FDT
The utility depends on the presence of the openfirm(4) pseudo-device,
which is gated by the FDT kernel option. The MK_FDT knob is correctly
set to "yes" for FDT/OFW-enabled platforms (powerpc* included); use it
to install the utility and eliminate the arch-specific Makefile logic.

No functional change intended.

Reviewed by:	emaste, pkubaj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41977
2023-10-02 10:40:18 -03:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Emmanuel Vadot d198b8774d fwget: Introduce new utility
This script's goal is to check the system for peripherals that needs
firmware and install the needed packages for them.
For now it only support pci subsystem and only video classes for AMD
and Intel GPUs.

Reviewed by:	bapt
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39825
2023-05-01 08:32:59 +02:00
Johannes Totz 1808b5577d Add efiwake tool
Reviewed by:	kib
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D36714
2023-04-28 04:28:51 +03:00
Colin Percival df53ae0fdd Remove portsnap(8)
Rather than having a tool in the FreeBSD base system for obtaining
the FreeBSD ports tree, users are encouraged to `pkg install git`
and then `git clone https://git.FreeBSD.org/ports.git /usr/ports`.

The portsnap servers will continue operating until FreeBSD 13 reaches
its End-of-Life, and portsnap is available from the ports tree as
ports-mgmt/portsnap.

Requested by:	portmgr
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D39563
X-MFC:		no
2023-04-22 18:12:37 -07:00
Warner Losh f051d72314 hyperv: Build and install where supported
Remove the hard-coded dependency on HYPERV being only x86. Instead, 100%
rely on MK_HYPERV. It's always right (since it's marked BROKEN (so set
to "no") on architectures we don't support).

Sponsored by:		Netflix
Reviewed by:		bz
Differential Revision:	https://reviews.freebsd.org/D38306
2023-02-01 10:21:57 -07:00
Dag-Erling Smørgrav bc42155199 Bring our tzcode up to date.
* Replay 2010[acflm] which had been merged but not recorded.
* Merge 2010n.
* Reorganize (unsplit) the code to match the upstream layout.
* Merge 2022[cdefg].

MFC after:      1 week
Sponsored by:   Klara, Inc.
2023-01-10 16:14:27 +01:00
Gleb Smirnoff 657729a89d Retire trpt(8).
trpt(8) was utility to pull TCP debugging data from the kernel
originating back from 4.2BSD.  It is not used nowadays by TCP
developers.  We have more powerful debugging facilities, e.g.
the Dtrace probing, the TCP black box logging and siftr.

Discussed with: rscheff, tuexen, rrs, jtl and others
2022-12-02 14:10:55 -08:00
Mitchell Horne 13ec1e3155 boottrace(8): small wrapper utility
This is a small program that when invoked will create start and stop
boottrace entries via sysctl, and execute the desired command. Having
this as an executable -- as opposed to some shell script invoking
sysctl(8) -- allows the total resource usage recorded by the trace
entries to include the child process.

Reviewed by:	0mp, trasz (older version)
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D31929
2022-02-21 20:16:12 -04:00
Michael Tuexen d73d40c17f usr.sbin: add tcpsso to Makefile 2022-02-09 19:22:18 +01:00
Jessica Clarke 8b487b8292 Fix bsd.subdir.mk-related issues after 0a0f748641
Since bsd.prog.mk includes bsd.obj.mk, and thus bsd.subdir.mk, we must
ensure all our bsd.subdir.mk-affecting variables are set before
including bsd.prog.mk. Since sbin's various Makefile.arch files add to
SUBDIR this results in those not taking effect, and presumably we also
end up not having buildworld as parallel as it should be due to the fact
that SUBDIR_PARALLEL was not being set before including bsd.prog.mk.

MFC with:	0a0f748641
Reviewed by:	olivier
Differential Revision:	https://reviews.freebsd.org/D31125
2021-07-12 20:54:01 +01:00
Pavel Balaev 24f398e7a1 Add efitable(8), a userspace tool to fetch and parse EFI tables
Only ESRT and PROP tables are handled at the moment.

Submitted by:	Pavel Balaev <pavel.balaev@3mdeb.com>
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D30104
2021-07-03 20:14:16 +03:00
Fernando Apesteguía 0a0f748641 man: Build manpages for all architectures
Building and installing architecture-specific man pages only raises a number of
problems:

 * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an
   example, it does not show results for pae(4). The reason for this is
   that the cgi interface runs on FreeBSD amd64.

 * In FreeBSD amd64 some manual pages have broken X-refs. See hptrr(4)
   for an example.

 * Also, we have broken links in our Release Notes. This is a
   consequence of the first point. See
   https://www.freebsd.org/releases/13.0R/hardware/#proc-i386.

Make MAN_ARCH default to 'all' so we build all the man pages for all the
architectures. The difference in disk space is negligible. Also link
architecture-specific man pages to their own section while keeping their own
namespace.

PR: 212290
Reported by:	mj@bsdops.com
Approved by:	ceri@, wosch@
MFC after:	4 weeks
2021-06-30 09:57:51 +02:00
Emmanuel Vadot c42e9af5f1 pkgbase: Move ctld/ctladm to iscsi package
While here only compile both of them if WITH_ISCSI is set (this is the default).

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D30755
Sponsored by:	Diablotin Systems
2021-06-19 17:49:57 +02:00
Emmanuel Vadot d865da5edf ancontrol: Remove an(4) utility
Last an(4) devices have been End Of Life and End Of Sale in 2007.
Time to remove this driver.

Differential Revision:	https://reviews.freebsd.org/D30680
Reviewed by:		imp (earlier version), emaste (earlier version)
Sponsored by:		Diablotin Systems
2021-06-11 21:18:21 +02:00
Kyle Evans e4d63c5d5f Remove fmtree(8)
fmtree(8) deprecation was announced on February 12, 2021, and no longer
built by default as of that date.  The deprecation notice was merged
back to stable/12 and stable/13 + releng/13.0.

Continue with the plan by finishing the removal.

Relnotes:	yes
2021-03-02 15:22:05 -06:00
Rick Macklem b9cbc85d72 nfs-over-tls: add user space daemons rpc.tlsclntd and rpc.tlsservd
The kernel changes needed for nfs-over-tls have been committed to main.
However, nfs-over-tls requires user space daemons to handle the
TLS handshake and other non-application data TLS records.
There is one daemon (rpc.tlsclntd) for the client side and one daemon
(rpc.tlsservd) for the server side, although they share a fair amount
of code found in rpc.tlscommon.c and rpc.tlscommon.h.
They use a KTLS enabled OpenSSL to perform the actual work and, as such,
are only built when MK_OPENSSL_KTLS is set.
Communication with the kernel is done via upcall RPCs done on AF_LOCAL
sockets and the custom system call rpctls_syscall.

Reviewed by:	gbe (man pages only), jhb (usr.sbin/Makefile only)
Comments by:	jhb
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D28430
Relnotes:	yes
2021-02-18 14:15:03 -08:00
Kyle Evans 123ae3045d build: remove LIBPTHREAD/LIBTHR build options
WITHOUT_LIBTHR has been broken for a little over five years now, since the
xz 5.2.0 update introduced a hard liblzma dependency on libthr, and building
a useful system without threading support is becoming increasingly more
difficult.

Additionally, in the five plus years that it's been broken more reverse
dependencies have cropped up in libzstd, libsqlite3, and libcrypto (among
others) that make it more and more difficult to reconcile the effort needed
to fix these options.

Remove the broken options.

PR:		252760
Reviewed by:	brooks, emaste, kib
Differential Revision:	https://reviews.freebsd.org/D28263
2021-01-22 12:33:27 -06:00
Alex Richardson db4b5a16a3 Minor simplification of MK_PMC case in usr.sbin/Makefile
MK_PMC is already guarded by MK_CXX in src.opts.mk, so we can actually
merge it with the following SUBDIR statement after c1a3d7f206.

Suggested By:	jrtc27
2021-01-20 09:52:58 +00:00
Alex Richardson c1a3d7f206 Remove remaining uses of ${COMPILER_FEATURES:Mc++11}
All supported compilers have C++11 support so these checks can be replaced
with MK_CXX guards.
See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252759

PR:		252759
Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D28234
2021-01-19 21:37:36 +00:00
Adrian Chadd 420306c3b7 [pmc] whoops, remove spurious #'s
pointed out by gonzo@, thanks!
2020-07-14 05:33:23 +00:00
Adrian Chadd f8e66eb160 [hwpmc] Compile 'pmc' only if we have C++11.
I noticed when compiling with ye olde gcc-6.3.0 on mips that it tripped over
a lack of C++11 bits.  This allows it to compile fine.
2020-07-14 05:10:50 +00:00
Ed Maste 13f7dbe822 retire amd(8)
autofs was introduced with FreeBSD 10.1 and is the supported method for
automounting filesystems.  As of r296194 the amd man page claimed that it
is deprecated.  Remove it from base now; the sysutils/am-utils port is
still available if necessary.

Discussed with:	cy
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2020-03-09 20:46:43 +00:00
Kyle Evans 504613f246 Remove simple_httpd
simple_httpd was granted a reprieve from the picobsd removal based on having
some reported user; it turns out this user isn't actually using the version
in base and merging their changes would be difficult at this point, so the
version in base will simply continue to rot. Retire it now, it may make a
comeback to ports with the improved version.

No notice issued because its current visibility has only been for ~3
months, and a notice has been previously issued about picobsd removal.
2020-02-04 21:27:39 +00:00
Vincenzo Maffione c7c7805531 add valectl to the system commands
The valectl(4) program is used to manage vale(4) switches.
Add it to the system commands so that it can be used right away.
This program was previously called vale-ctl, and stored in
tools/tools/netmap

Reviewed by:	hrs, bcr, lwhsu, kevans
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D22146
2019-10-31 21:01:34 +00:00
Kyle Evans ccdcb388ba [2/3] Add certctl(8)
This is a simple utility to hash all trusted on the system into
/etc/ssl/certs. It also allows the user to blacklist certificates they do
not trust.

This work was done primarily by allanjude@, with minor contributions by
myself.

No objection from:	secteam
Differential Revision:	https://reviews.freebsd.org/D16857
2019-10-02 01:05:53 +00:00
Kyle Evans 546d30b94b Move httpd to simple_httpd...
This avoids PATH conflicts with a real httpd, as a user will likely almost
always prefer the more fully-featured httpd. This also lines up with the
historical name of the program.
2019-10-01 18:14:37 +00:00
Kyle Evans 2d0a92c9ab Move simple_httpd out of picobsd, add HTTPD option (default OFF)
picobsd/tinyware has had this compact HTTPD server for a long time, and some
people do use it. Move it out into usr.sbin well in advance of any action
being taken on picobsd.

This has been gated behind an HTTPD option defaulted to *off*, primarily for
two reasons:
1.) This code likely needs a good audit, as it's been living off in picobsd
    land for a long time, and
2.) We don't currently ship an httpd and this may not be a welcome surprise.

Reviewed by:	eugen
Differential Revision:	https://reviews.freebsd.org/D21724
2019-10-01 14:55:16 +00:00
Kris Moore 59e50df3cd - Retire pc-sysinstall(8)
https://reviews.freebsd.org/D21094

Submitted by: kmoore@FreeBSD.org
Approved by: imp@FreeBSD.org
2019-09-03 19:42:04 +00:00
Warner Losh f5a95d9a07 Remove NAND and NANDFS support
NANDFS has been broken for years. Remove it. The NAND drivers that
remain are for ancient parts that are no longer relevant. They are
polled, have terrible performance and just for ancient arm
hardware. NAND parts have evolved significantly from this early work
and little to none of it would be relevant should someone need to
update to support raw nand. This code has been off by default for
years and has violated the vnode protocol leading to panics since it
was committed.

Numerous posts to arch@ and other locations have found no actual users
for this software.

Relnotes:	Yes
No Objection From: arch@
Differential Revision: https://reviews.freebsd.org/D20745
2019-06-25 04:50:09 +00:00
Eugene Grosbein 2b5691ee44 Re-add new small tool trim(8) to delete contents for blocks
on devices using wear-leveling algorithms as a few weeks passed
after review and discussion of trim(8) ceased and
we still have no utility to perform the job.

Reviewed by:	hackers@
MFC after:	2 weeks
2019-01-17 18:07:59 +00:00
George V. Neville-Neil 53fc043d41 Remove, the now very outdated, timed.
Submitted by:	Kyle Spiers ksspiers at gmail
Reviewed by:	bcr,brooks,bz,sbruno
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D18505
2018-12-15 21:34:40 +00:00
Stefan Eßer 385e98080c Remove CTM from 13-CURRENT after the release of FreeBSD-12.0.
The removal (and creation of a port) has been pre-announced in UPDATING
1 month ago. Packages are available for all supported FreeBSD vesions.

I did not think that another entry in UPDATING is required to note the
actual removal.

No MFC is planned - CTM shall be kept in base for all releases up to 12.x.

Reviewed by:	rgrimes
Approved by:	imp, bcr (manpages)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D17935
2018-12-15 16:53:15 +00:00
Emmanuel Vadot 9312900f6d Add a pwm subsystem so we can configure pwm controller from kernel and userland.
The pwm subsystem consist of API for PWM controllers, pwmbus to register them
and a pwm(8) utility to talk to them from userland.

Reviewed by:	oshgobo (capsicum), bcr (manpage), 0mp (manpage)
Differential Revision:	https://reviews.freebsd.org/D17938
2018-12-12 20:56:56 +00:00
Eugene Grosbein e0d1669595 Remove trim(8) by multiple demands. 2018-12-01 03:20:10 +00:00
Eugene Grosbein fcd7ccb28c Move trim(1) from usr.bin to usr.sbin to become trim(8).
Requested by:	se
MFC after:	1 month
2018-11-29 16:08:16 +00:00
Kyle Evans bc82609ae2 Move pmc* bits behind MK_PMC to fix WITHOUT_PMC build
No objection from:	mmacy
MFC after:	3 days
2018-11-05 00:20:58 +00:00
Matt Macy 3b9156971f re-enable pmcstat, pmccontrol, and pmcannotate for gcc4 builds
I had disabled building of the aforementioned targets due to warnings breaking
tinderbox. This silences the warning and restores them to the build.

Reported by:	jhibbits
Reviewed by:	jhibbits
Approved by:	re (gjb)
2018-09-14 01:11:10 +00:00
Ian Lepore 6666009530 Add spi(8), a utility for communicating with a device on a SPI bus from
userland, conceptually similar to what i2c(8) provides for i2c devices.

Submitted by:	Bob Frazier
Differential Revision:	https://reviews.freebsd.org/D15029
2018-06-22 01:59:19 +00:00
Sean Bruno 01cebb69be MK_EFI - Add uefisign and friends to this knob and ensure that we don't
try to build them if MK_OPENSSL is unset.

Reviewed by:	emaste imp kevans
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D15211
2018-06-19 21:07:25 +00:00
Rick Macklem a520a7cf2f Add a command that copies or migrates a data file from one DS to another.
This command can be used by a sysadmin to either copy or migrate a data
file on one DS to another DS.
Its main use is to recover data files onto a mirrored DS after the DS has
been repaired and brought back online.
2018-06-15 19:45:15 +00:00
Rick Macklem 6cb9ec3cc4 Add a command the displays and modifies the pNFS server's extended attribute.
This command allows a sysadmin to display or modify the pnfsd.dsfile extended
attribute used by the pNFS MDS server in various ways.
Its main use is to set a DS's IP address to 0.0.0.0 when that DS has failed,
so that it will not be used for the file when brought back online after
being repaired.
2018-06-15 19:35:08 +00:00
Rick Macklem 725f388bdc Add an entry into the Makefile for pnfsdskill.
pnfsdskill was added by r335192. This commit adds an entry for it to the
Makefile.
2018-06-15 11:54:55 +00:00
Matt Macy 456eeabebc pmc: fix logic in skipping riscv 2018-06-09 02:25:18 +00:00
Matt Macy 6159b91c1f pmc: don't build on riscv where there's no kmod support 2018-06-09 02:15:45 +00:00
Matt Macy f992dd4b5c pmc: convert native to jsonl and track TSC value of samples
- add '-j' options to filter to enable converting native pmc
  log format to json lines format to enable the use of scripts
  and external tooling

% pmc filter -j pmc.log pmc.jsonl

- Record the tsc value in sampling interrupts as opposed to
  recording nanotime when the sample is copied to a global log
  in hardclock - potentially many milliseconds later.

- At initialize record the tsc_freq and the time of day to give
  us an offset for translating the tsc values in callchain records
2018-06-07 02:03:22 +00:00
Matt Macy ebfaf69cc0 hwpmc: log name->pid, name->tid mappings
By logging all threads and processes 'pmc filter'
can now filter on process or thread name, relieving
the user of the burden of determining which tid or
pid was which when the sample was taken.

% pmc filter -T if_io_tqg -P nginx pmc.log pmc-iflib.log

% pmc filter -x -T idle pmc.log pmc-noidle.log
2018-06-05 04:26:40 +00:00