Commit graph

10605 commits

Author SHA1 Message Date
John Baldwin 1058c12197 nvmecontrol: New commands to support Fabrics hosts
- discover: Connects to a remote Discovery controller, fetches its
  Discovery Log Page, and enumerates the remote controllers described
  in the log page.

  The -v option can be used to display the Identify Controller data
  structure for the Discovery controller.  This is only really useful
  for debugging.

- connect: Connects to a remote I/O controller and establishes an
  association of an admin queue and a single I/O queue.  The
  association is handed off to the in-kernel host to create a new
  nvmeX device.

- connect-all: Connects to a Discovery controller and attempts to
  create an association with each I/O controller enumerated in the
  Discovery controller's Discovery Log Page.

- reconnect: Establishes a new association with a remote I/O
  controller for an existing nvmeX device.  This can be used to
  restore access to a remote I/O controller after the loss of a prior
  association due to a transport error, controller reboot, etc.

- disconnect: Deletes one or more nvmeX devices after detaching its
  namespaces and terminating any active associations.  The devices to
  delete can be identified by either a nvmeX device name or the NQN of
  the remote controller.

- disconnect-all: Deletes all active associations with remote
  controllers.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44715
2024-05-02 16:30:10 -07:00
John Baldwin 07c6a62bab cam: Add a XPORT_NVMF for NVMe over Fabrics sims
Reviewed by:	ken, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44713
2024-05-02 16:29:26 -07:00
Warner Losh b12cae88cf nvmecontrol: Allow optional /dev/ for device names
nvmecontrol operates on devices. Allow a user to specify the /dev/ if
they want. Any device that starts with / will be treated as if it was a
full path for maximum flexbility.

Sponsored by:		Netflix
2024-05-02 15:52:20 -06:00
Kristof Provost 5824df8d99 pf: convert DIOCGETSTATUS to netlink
Introduce pfctl_get_status_h() because we need the pfctl_handle. In this variant
use netlink to obtain the information.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-04-29 16:32:23 +02:00
Elyes Haouas d94c991f3b setkey: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 22:21:09 -06:00
Elyes Haouas 70fad8acae ipf: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 22:21:09 -06:00
Elyes Haouas 7028e630d6 camcontrol: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 22:21:09 -06:00
Elyes Haouas c3c816173d ipfw: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:30:55 -06:00
Warner Losh ce3b53ffcc nvmecontrol: Flesh out nvmecontrol format information
The format command takes a number of different parameters. Include a
brief summary of what the values mean, though since the driver's support
for metadata is at best weak, 0's are almost always used for values
other than -f format. Add an example that ties it all together.

Sponsored by:		Netflix
Reviewed by:		pauamma@gundo.com, chuck
Differential Revision:	https://reviews.freebsd.org/D44958
2024-04-25 17:47:18 -06:00
Warner Losh feabaf8d53 Revert "swapon: Do not overwrite Linux swap header"
This reverts commit cf04a7775a4e8ff6fd28c768be9daa3d83dd382e.This is
broken on armv7, and closer scrutiny of the reviews shows I was in error
when I thought it was ready.
2024-04-23 21:18:56 -06:00
Ricardo Branco cf04a7775a swapon: Do not overwrite Linux swap header
Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1084
2024-04-23 15:48:01 -06:00
John Baldwin 2d51a9898e nvmecontrol: Always build instead of being conditional on WITH_NVME
This now builds fine on all platforms so always include it similar
to other tools such as camcontrol.

Reviewed by:	imp, emaste
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44842
2024-04-23 11:47:26 -07:00
John Baldwin 2b676a66c0 camcontrol: Enable WITH_NVME unconditionally
MK_NVME is no longer marked broken for any platforms, so just include
support for it always as we do for ATA and SCSI.

Reviewed by:	emaste
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44841
2024-04-23 11:47:12 -07:00
Lexi Winter 74adb39cf2 zfsbootcfg(8), zpool_influxdb(8): move to the zfs package
These tools are only useful on a system running ZFS.

Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1175
2024-04-22 23:04:03 -06:00
Gregory Shapiro f578d01997 ifconfig tunnelfib is implemented in wg(4)
MFC After: 1 week
Reviewed by: imp, zlei, kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/1186
2024-04-22 22:52:14 -06:00
Ricardo Branco e96d0d7468 umount: Support partitions & slices with -d option
Signed-off-by: Ricardo Branco <rbranco@suse.de>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1183
2024-04-22 22:36:35 -06:00
Stefan Eßer 6815606c82 ldconfig: fix man-page - duplicate dot at end of sentence
Reported by:	gbe
2024-04-20 19:49:10 +02:00
Gordon Bergling 68b9eb9185 ifconfig(8): Fix two typos in source code comments
- s/the the/the/

MFC after:	3 days
2024-04-20 14:01:23 +02:00
Gordon Bergling 6573ce292f nvmecontrol(8): Remove a double word in a source code comment
- s/the the/the/

MFC after:	3 days
2024-04-20 11:18:59 +02:00
Stefan Eßer 21ffadb6e6 ldconfig: document changed default byte-order
Document that the hints file is created in little-endian byte-order
by default now. The -B option can be used to create a big-endian hints
file. Currently, both formats are accepted by the run-time linker on
all architectures.

MFC after:	3 days
Relnotes:	yes
2024-04-20 08:34:22 +02:00
Stefan Eßer f221df6597 ldconfig: use little-endian hints file on all architectures
Remove the test for building on a big-endian architecture, which
preserved the previous default of creating the ELF hints file in
native byte-order of the respective architecture.

Support for little-endian hints files has been added to the
run-time linker and the pkg command.

This is a step towards architecture independent little-endian hints
files, but support for big-endian hints files shall only be removed
from the run-time linker (and ldconfig and pkg) when the last release
that defaulted to hints files in host-byte has been declared EOL.

Reviewed by:    kib
Tested by:	tuexen
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D44734
2024-04-19 16:49:57 +02:00
Stefan Eßer 6b13e4cb3d ldconfig: small optimization
Swap which side of a comparison is byte-swapped by be32toh()
on little-endian architectures.

The be32toh() macro just returns the operand and big-endian
architectures and returns it byte-swapped on little-endian
architectures.

When operating on a constant argument, the compiler can perform
the swap operation at build time instead of swapping the data
read from the hints file at run time.

Reviewed by:	kib
Tested by:	tuexen
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D44734
2024-04-19 16:47:19 +02:00
inkeliz 464b1ab216 dumpon: fix set but not used variable
Signed-off-by: inkeliz <inkeliz@inkeliz.com>

Reviewed by:	markj
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1178
2024-04-18 11:39:16 -04:00
Warner Losh 49ea0889f2 nvmecontrol: One file per line
Move to a one file per line setup, and sort the files alphabetically.

Sponsored by:		Netflix
Reviewed by:		chuck, jhb
Differential Revision:	https://reviews.freebsd.org/D44684
2024-04-16 21:30:19 -06:00
Warner Losh 98ab7d0a30 nvmecontrol: Add nvme 2.0 fields to read_logpage
Add the lpo, ot, csi and uuid_index fields to read_logpage. The logpage
command has not been updated to allow these to be specified.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44683
2024-04-16 21:30:19 -06:00
Warner Losh 383a44fc0b nvmecontrol: Preliminary namespace documentation
Provide preliminary namespace subcommand documentation, along with some
basic definitions from the NVM standards relating to namespaces.

Sponsored by:		Netflix
Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D44682
2024-04-16 21:30:19 -06:00
Warner Losh e39873820d nvmecontrol: add newlines where needed for ns command printfs
Sponsored by:		Netflix
Reviewed by:		chuck, jhb
Differential Revision:	https://reviews.freebsd.org/D44681
2024-04-16 21:30:19 -06:00
Warner Losh f0f7e9616d nvmecontrol: Move intel temperature page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44658
2024-04-16 21:30:18 -06:00
Warner Losh 55a1679ece nvmecontrol: Move sanitize status page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44657
2024-04-16 21:30:18 -06:00
Warner Losh 3d28a9c608 nvmecontrol: Move reservation notifcation page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44656
2024-04-16 21:30:18 -06:00
Warner Losh b850caf7b7 nvmecontrol: Move command effeccts page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44655
2024-04-16 21:30:18 -06:00
Warner Losh 98f841efd8 nvmecontrol: Move self test status page printing to little endian orderinng
Also, add printing vnedor_specific field, which doesn't have a valid
bit, so is always valid.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44654
2024-04-16 21:30:18 -06:00
Warner Losh acdf72f7bb nvmecontrol: Move namespace change page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44653
2024-04-16 21:30:18 -06:00
Warner Losh 729ee4c88f nvmecontrol: Move smart/health printing to little endian orderinng
Move health printing to little endian ordering...

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44652
2024-04-16 21:30:18 -06:00
Warner Losh 1c4b7effa7 nvmecontrol: Fix to128 for big endian targets
The source is always 128-bits in little endian format. For big endian
hosts, we have to convert, or we print bogus numbers.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44651
2024-04-16 21:30:18 -06:00
Warner Losh e098d24b52 nvmecontrol: Have to truncate on all 32-bit architectures
armv7, powerpc, powerpcspe and i386 all lack 128-bit integer
types. Adjust the comment and #ifdef. I don't think we support nvme on
any of these other architectures at the moment, but it won't hurt to be
more precise.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44650
2024-04-16 21:30:17 -06:00
Warner Losh 85656a9a01 nvmecontrol: Make the error log page work on native format
As the number of page types proliferates, it becomes untennable to
convert them in read_logpage (especailly since new UUID page types will
need to be supported). Convert the error page printing code to operate
on little endian data.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44680
2024-04-16 21:30:17 -06:00
Warner Losh 67163bc485 nvmecontrol: Create letoh to generically convert to host order
Using _Generic, create letoh which will generically convert uintXX_t
types from little endian to host, regardless of the size. This name has
been floated as a possible addition to endian.h.

Sponsored by:		Netflix
Discussed with:		jhb
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44649
2024-04-16 21:30:17 -06:00
Brooks Davis 6bb132ba1e Reduce reliance on sys/sysproto.h pollution
Add sys/errno.h, sys/malloc.h, sys/queue.h, and vm/uma.h as needed.

sys/sysproto.h currently includes sys/acl.h which currently includes
sys/param.h, sys/queue.h, and vm/uma.h which in turn bring in
sys/errno.h sys/malloc.h.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44465
2024-04-15 21:35:40 +01:00
Elyes Haouas f7cee4fa57 sbin: Remove repeated words
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/887
2024-04-11 11:53:37 -06:00
Elyes Haouas d600ad8101 ipfw: Remove repeated words
Remove repeated words in error message.

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/887
2024-04-11 11:53:26 -06:00
Graham Perrin 20b5e47c93 bectl(8): authors: Kyle Evans: fine-tune
Discussed with Kyle in Discord.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/857
2024-04-09 22:01:03 -06:00
Graham Perrin 984f503749 bectl(8): authors: be more explicit
Cross-reference (name) the manual page that was written by Bryan
Drewery.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/857
2024-04-09 22:00:59 -06:00
Graham Perrin 6e3e24d145 bectl(8): HISTORY, AUTHORS: further attention
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/857
2024-04-09 22:00:56 -06:00
Graham Perrin a27e19a223 bectl(8): corrections, changes
beadm(1) no longer exists.

Cross-reference beadm(8).

Aim to improve the HISTORY and AUTHORS sections, including consistency
with the manual pages for beadm(8) and libbe(3).

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/857
2024-04-09 22:00:48 -06:00
Warner Losh ea002c1017 devmatch: Convert command line flags to bools
These are bools, and should have been bools from the start. Make them
bools.

Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Warner Losh 03cfd91998 devmatch: Make -a work for all devices
devmatch -a should produce output for all attached devices, but doesn't.

Noticed by:		cperciva
Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Warner Losh fe83abacd4 nvme: Add my copyright to logpage.c
Reflect the command line refactoring I did, and other changes. git blame
says I'm to blame for ~1/4 of this file.

Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Yan-Hao Wang c7bdc25d41
savecore(8): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41392
2024-04-04 02:28:30 +08:00
Christopher Davidson 2ebc7806a1 mount_mfs.8: remove self-reference
Change .Xr instances to .Nm, which quiets several mandoc warnings.

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1135
2024-04-03 13:55:55 -03:00