btrfs-ioctl

package: btrfs-progs

title: btrfs-ioctl(2)

summary: documentation about btrfs ioctls

text:
# btrfs-ioctl(2)

## NAME
btrfs-ioctl - documentation about btrfs ioctls

## NAME
btrfs-ioctl - documentation for the ioctl interface to btrfs

## DESCRIPTION
The ioctl() system call is a way how to request custom actions performed on a filesystem beyond the standard interfaces (like syscalls). An ioctl is specified by a number and an associated data structure that implement a feature, usually not available in other filesystems. The number of ioctls grows over time and in some cases get promoted to a VFS-level ioctl once other filesystems adopt the functionality. Backward compatibility is maintained and a formerly private ioctl number could become available on the VFS level.

## DATA STRUCTURES AND DEFINITIONS

```
struct btrfs_ioctl_vol_args {

        __s64 fd;

        char name[BTRFS_PATH_NAME_MAX + 1];
};
```

```
#define BTRFS_SUBVOL_RDONLY                  (1ULL << 1)
#define BTRFS_SUBVOL_QGROUP_INHERIT          (1ULL << 2)
#define BTRFS_DEVICE_SPEC_BY_ID              (1ULL << 3)
#define BTRFS_SUBVOL_SPEC_BY_ID              (1ULL << 4)
struct btrfs_ioctl_vol_args_v2 {

        __s64 fd;

        __u64 transid;

        __u64 flags;

        union {

                struct {

                        __u64 size;

                        struct btrfs_qgroup_inherit __user *qgroup_inherit;

                };

                __u64 unused[4];

        };

        union {

                char name[BTRFS_SUBVOL_NAME_MAX + 1];

                __u64 devid;

                __u64 subvolid;

        };
};
```

```
struct btrfs_ioctl_get_subvol_info_args {

        /* Id of this subvolume */

        __u64 treeid;

        /* Name of this subvolume, used to get the real name at mount point */

        char name[BTRFS_VOL_NAME_MAX + 1];

        /*

         * Id of the subvolume which contains this subvolume.

         * Zero for top-level subvolume or a deleted subvolume.

         */

        __u64 parent_id;

        /*

         * Inode number of the directory which contains this subvolume.

         * Zero for top-level subvolume or a deleted subvolume

         */

        __u64 dirid;

        /* Latest transaction id of this subvolume */

        __u64 generation;

        /* Flags of this subvolume */

        __u64 flags;

        /* UUID of this subvolume */

        __u8 uuid[BTRFS_UUID_SIZE];

        /*

         * UUID of the subvolume of which this subvolume is a snapshot.

         * All zero for a non-snapshot subvolume.

         */

        __u8 parent_uuid[BTRFS_UUID_SIZE];

        /*

         * UUID of the subvolume from which this subvolume was received.

         * All zero for non-received subvolume.

         */

        __u8 received_uuid[BTRFS_UUID_SIZE];

        /* Transaction id indicating when change/create/send/receive happened */

        __u64 ctransid;

        __u64 otransid;

        __u64 stransid;

        __u64 rtransid;

        /* Time corresponding to c/o/s/rtransid */

        struct btrfs_ioctl_timespec ctime;

        struct btrfs_ioctl_timespec otime;

        struct btrfs_ioctl_timespec stime;

        struct btrfs_ioctl_timespec rtime;

        /* Must be zero */

        __u64 reserved[8];
};
```

```
#define BTRFS_QGROUP_INHERIT_SET_LIMITS         (1ULL << 0)
struct btrfs_qgroup_inherit {

        __u64 flags;

        __u64 num_qgroups;

        __u64 num_ref_copies;

        __u64 num_excl_copies;

        struct btrfs_qgroup_limit lim;

        __u64 qgroups[];
};
```

```
#define BTRFS_QGROUP_LIMIT_MAX_RFER             (1ULL << 0)
#define BTRFS_QGROUP_LIMIT_MAX_EXCL             (1ULL << 1)
#define BTRFS_QGROUP_LIMIT_RSV_RFER             (1ULL << 2)
#define BTRFS_QGROUP_LIMIT_RSV_EXCL             (1ULL << 3)
#define BTRFS_QGROUP_LIMIT_RFER_CMPR            (1ULL << 4)
#define BTRFS_QGROUP_LIMIT_EXCL_CMPR            (1ULL << 5)
struct btrfs_qgroup_limit {

        __u64 flags;

        __u64 max_rfer;

        __u64 max_excl;

        __u64 rsv_rfer;

        __u64 rsv_excl;
};
```

```
/* Request information about checksum type and size */
#define BTRFS_FS_INFO_FLAG_CSUM_INFO                    (1U << 0)
/* Request information about filesystem generation */
#define BTRFS_FS_INFO_FLAG_GENERATION                   (1U << 1)
/* Request information about filesystem metadata UUID */
#define BTRFS_FS_INFO_FLAG_METADATA_UUID                (1U << 2)
struct btrfs_ioctl_fs_info_args {

        __u64 max_id;                           /* out */

        __u64 num_devices;                      /* out */

        __u8 fsid[BTRFS_FSID_SIZE];             /* out */

        __u32 nodesize;                         /* out */

        __u32 sectorsize;                       /* out */

        __u32 clone_alignment;                  /* out */

        /* See BTRFS_FS_INFO_FLAG_* */

        __u16 csum_type;                        /* out */

        __u16 csum_size;                        /* out */

        __u64 flags;                            /* in/out */

        __u64 generation;                       /* out */

        __u8 metadata_uuid[BTRFS_FSID_SIZE];    /* out */

        __u8 reserved[944];                     /* pad to 1k */
};
```

```
#define BTRFS_INO_LOOKUP_PATH_MAX               4080
struct btrfs_ioctl_ino_lookup_args {

        __u64 treeid;

        __u64 objectid;

        char name[BTRFS_INO_LOOKUP_PATH_MAX];
};
```

```
/* Specify the subvolid. */
#define BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE         (0)
/* Wait for all currently queued. */
#define BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED      (1)
/* Count number of queued subvolumes. */
#define BTRFS_SUBVOL_SYNC_COUNT                (2)
/*

 * Read which is the first in the queue (to be cleaned or being cleaned already),

 * or 0 if the queue is empty.

 */
#define BTRFS_SUBVOL_SYNC_PEEK_FIRST           (3)
/* Read the last subvolid in the queue, or 0 if the queue is empty. */
#define BTRFS_SUBVOL_SYNC_PEEK_LAST            (4)
struct btrfs_ioctl_subvol_wait {

       __u64 subvolid;

       __u32 mode;

       __u32 count;
};
```

Constant name

Value

BTRFS_UUID_SIZE

16

BTRFS_FSID_SIZE

16

BTRFS_SUBVOL_NAME_MAX

4039

BTRFS_PATH_NAME_MAX

4087

BTRFS_VOL_NAME_MAX

255

BTRFS_LABEL_SIZE

256

BTRFS_FIRST_FREE_OBJECTID

256

## OVERVIEW
The ioctls are defined by a number and associated with a data structure that contains further information. All ioctls use file descriptor (fd) as a reference point, it could be the filesystem or a directory inside the filesystem.

An ioctl can be used in the following schematic way:

```
struct btrfs_ioctl_args args;
memset(&args, 0, sizeof(args));
args.key = value;
ret = ioctl(fd, BTRFS_IOC_NUMBER, &args);
```

The 'fd' is the entry point to the filesystem and for most ioctls it does not matter which file or directory is that. Where it matters it's explicitly mentioned. The 'args' is the associated data structure for the request. It's strongly recommended to initialize the whole structure to zeros as this is future-proof when the ioctl gets further extensions. Not doing that could lead to mismatch of old userspace and new kernel versions, or vice versa. The 'BTRFS_IOC_NUMBER' is says which operation should be done on the given arguments. Some ioctls take a specific data structure, some of them share a common one, no argument structure ioctls exist too.

The library libbtrfsutil wraps a few ioctls for convenience. Using raw ioctls is not discouraged but may be cumbersome though it does not need additional library dependency. Backward compatibility is guaranteed and incompatible changes usually lead to a new version of the ioctl. Enhancements of existing ioctls can happen and depend on additional flags to be set. Zeroed unused space is commonly understood as a mechanism to communicate the compatibility between kernel and userspace and thus zeroing is really important. In exceptional cases this is not enough and further flags need to be passed to distinguish between zero as implicit unused initialization and a valid zero value. Such cases are documented.

File descriptors of regular files are obtained by int fd = open(), directories opened as DIR *dir = opendir() can be converted to the corresponding file descriptor by fd = dirfd(dir).

## LIST OF IOCTLS
Name

Description

Data

BTRFS_IOC_SNAP_CREATE

(obsolete) create a snapshot of a subvolume

struct btrfs_ioctl_vol_args

BTRFS_IOC_DEFRAG

BTRFS_IOC_RESIZE

BTRFS_IOC_SCAN_DEV

scan and register a given device path with filesystem module

struct btrfs_ioctl_vol_args

BTRFS_IOC_SYNC

Sync the filesystem, possibly process queued up work

NULL

BTRFS_IOC_CLONE

BTRFS_IOC_ADD_DEV

add a device to the filesystem by path

struct btrfs_ioctl_vol_args

BTRFS_IOC_RM_DEV

delete a device from the filesystem by path

struct btrfs_ioctl_vol_args

BTRFS_IOC_BALANCE

BTRFS_IOC_CLONE_RANGE

BTRFS_IOC_SUBVOL_CREATE

(obsolete) create a subvolume

struct btrfs_ioctl_vol_args

BTRFS_IOC_SNAP_DESTROY

(obsolete) delete a subvolume

struct btrfs_ioctl_vol_args

BTRFS_IOC_DEFRAG_RANGE

BTRFS_IOC_TREE_SEARCH

BTRFS_IOC_TREE_SEARCH_V2

BTRFS_IOC_INO_LOOKUP

resolve inode number to path, or lookup containing subvolume id

struct btrfs_ioctl_ino_lookup_args

BTRFS_IOC_DEFAULT_SUBVOL

set the default subvolume id

uint64_t

BTRFS_IOC_SPACE_INFO

BTRFS_IOC_START_SYNC

BTRFS_IOC_WAIT_SYNC

BTRFS_IOC_SNAP_CREATE_V2

create a snapshot of a subvolume

struct btrfs_ioctl_vol_args_v2

BTRFS_IOC_SUBVOL_CREATE_V2

create a subvolume

struct btrfs_ioctl_vol_args_v2

BTRFS_IOC_SUBVOL_GETFLAGS

get flags of a subvolume

uint64_t

BTRFS_IOC_SUBVOL_SETFLAGS

set flags of a subvolume

uint64_t

BTRFS_IOC_SCRUB

BTRFS_IOC_SCRUB_CANCEL

BTRFS_IOC_SCRUB_PROGRESS

BTRFS_IOC_DEV_INFO

BTRFS_IOC_FS_INFO

get information about filesystem (device count, fsid, ...)

struct btrfs_ioctl_fs_info_args

BTRFS_IOC_BALANCE_V2

BTRFS_IOC_BALANCE_CTL

BTRFS_IOC_BALANCE_PROGRESS

BTRFS_IOC_INO_PATHS

BTRFS_IOC_LOGICAL_INO

BTRFS_IOC_SET_RECEIVED_SUBVOL

BTRFS_IOC_SEND

BTRFS_IOC_DEVICES_READY

BTRFS_IOC_QUOTA_CTL

BTRFS_IOC_QGROUP_ASSIGN

BTRFS_IOC_QGROUP_CREATE

BTRFS_IOC_QGROUP_LIMIT

BTRFS_IOC_QUOTA_RESCAN

BTRFS_IOC_QUOTA_RESCAN_STATUS

BTRFS_IOC_QUOTA_RESCAN_WAIT

BTRFS_IOC_GET_FSLABEL

read filesystem label

char buffer[BTRFS_LABEL_SIZE]

BTRFS_IOC_SET_FSLABEL

set the filesystem label

char buffer[BTRFS_LABEL_SIZE]

BTRFS_IOC_GET_DEV_STATS

BTRFS_IOC_DEV_REPLACE

BTRFS_IOC_FILE_EXTENT_SAME

BTRFS_IOC_GET_FEATURES

BTRFS_IOC_SET_FEATURES

BTRFS_IOC_GET_SUPPORTED_FEATURES

BTRFS_IOC_RM_DEV_V2

BTRFS_IOC_LOGICAL_INO_V2

BTRFS_IOC_GET_SUBVOL_INFO

get information about a subvolume

struct btrfs_ioctl_get_subvol_info_args

BTRFS_IOC_GET_SUBVOL_ROOTREF

BTRFS_IOC_INO_LOOKUP_USER

BTRFS_IOC_SNAP_DESTROY_V2

destroy a (snapshot or regular) subvolume

struct btrfs_ioctl_vol_args_v2

BTRFS_IOC_ENCODED_READ

BTRFS_IOC_ENCODED_WRITE

BTRFS_IOC_SUBVOL_SYNC_WAIT

Wait until a deleted subvolume is cleaned or query the state.

struct btrfs_ioctl_subvol_wait

## DETAILED DESCRIPTION

### BTRFS_IOC_SNAP_CREATE
NOTE:

obsoleted by BTRFS_IOC_SNAP_CREATE_V2

(since: 3.0, obsoleted: 4.0) Create a snapshot of a subvolume.

Field

Description

ioctl fd

file descriptor of the parent directory of the new subvolume

ioctl args

struct btrfs_ioctl_vol_args

args.fd

file descriptor of any directory inside the subvolume to snapshot, must be on the same filesystem

args.name

name of the subvolume, although the buffer can be almost 4KiB, the file size is limited by Linux VFS to 255 characters and must not contain a slash ('/')

### BTRFS_IOC_SCAN_DEV
Scan and register a given device in the filesystem module, which can be later used for automatic device and filesystem association at mount time. This operates on the control device, not files from a mounted filesystem. Can be safely called repeatedly with same device path.

Field

Description

ioctl fd

file descriptor of the control device /dev/btrfs-control

ioctl args

struct btrfs_ioctl_vol_args

args.fd

ignored

args.name

full path of the device

### BTRFS_IOC_SYNC
Sync the filesystem data as would sync() syscall do, additionally wake up the internal transaction thread that may trigger actions like subvolume cleaning or queued defragmentation.

Field

Description

ioctl fd

file descriptor of any file or directory in the filesystem

ioctl args

NULL

### BTRFS_IOC_ADD_DEV
Add a given block device to the filesystem. Unlike the command btrfs device add there's are no safety checks (like existence of another filesystem on the device), device preparation (like TRIM or zone reset), so use it with care.

This is a filesystem-exclusive operation and it will fail if there's another one already running, with one exception, when there's a paused balance.

Required permissions: CAP_SYS_ADMIN

Field

Description

ioctl fd

file descriptor of any file or directory in the filesystem

ioctl args

struct btrfs_ioctl_vol_args

args.fd

ignored

args.name

full path of the block device to be added

### BTRFS_IOC_RM_DEV
Remove a device from the filesystem specified by it's path, or cancel a running device deletion by special path cancel.

This is a filesystem-exclusive operation and it will fail if there's another one already running.

Required permissions: CAP_SYS_ADMIN

Field

Description

ioctl fd

file descriptor of any file or directory in the filesystem

ioctl args

struct btrfs_ioctl_vol_args

args.fd

ignored

args.name

full path of the block device to be deleted or string "cancel"

### BTRFS_IOC_SUBVOL_CREATE
NOTE:

obsoleted by BTRFS_IOC_SUBVOL_CREATE_V2

(since: 3.0, obsoleted: 4.0) Create a subvolume.

Field

Description

ioctl fd

file descriptor of the parent directory of the new subvolume

ioctl args

struct btrfs_ioctl_vol_args

args.fd

ignored

args.name

name of the subvolume, although the buffer can be almost 4KiB, the file size is limited by Linux VFS to 255 characters and must not contain a slash ('/')

### BTRFS_IOC_SNAP_DESTROY
NOTE:

obsoleted by BTRFS_IOC_SNAP_DESTROY_V2

(since: 2.6.33, obsoleted: 5.7) Delete a subvolume.

Field

Description

ioctl fd

file descriptor of the parent directory of the new subvolume

ioctl args

struct btrfs_ioctl_vol_args

args.fd

ignored

args.name

name of the subvolume, although the buffer can be almost 4KiB, the file size is limited by Linux VFS to 255 characters and must not contain a slash ('/')

### BTRFS_IOC_INO_LOOKUP
Resolve inode number to a path (requires CAP_SYS_ADMIN), or read a containing subvolume id of the given file (unrestricted, special case). The size of the path name buffer is shorter than PATH_MAX (4096), it's possible that the path is trimmed due to that. Also implemented by btrfs inspect-internal rootid.

The general case needs CAP_SYS_ADMIN and can resolve any file to its path. The special case for reading the containing subvolume is not restricted:

```
struct btrfs_ioctl_ino_lookup_args args;
fd = open("file", ...);
args.treeid = 0;
args.objectid = BTRFS_FIRST_FREE_OBJECTID;
ioctl(fd, BTRFS_IOC_INO_LOOKUP, &args);
/* args.treeid now contains the subvolume id */
```

Field

Description

ioctl fd

file descriptor of the file or directory to lookup the subvolumeid

ioctl args

struct btrfs_ioctl_ino_lookup_args

args.treeid

subvolume id against which the path should be resolved (needs CAP_SYS_ADMIN), or 0 so the subvolume containing fd will be used

args.objectid

inode number to lookup, INODE_REF_KEY with that key.objectid, or BTRFS_FIRST_FREE_OBJECTID as special case to read only the tree id and clear the args.name buffer

args.name

path relative to the toplevel subvolume, or empty string

### BTRFS_IOC_DEFAULT_SUBVOL
Set the given subvolume id as the default one when mounting the filesystem without subvol=path or subvolid=id options.

Field

Description

ioctl fd

file descriptor of the directory inside which to create the new snapshot

ioctl args

numeric value of subvolume to become default (uint64_t)

### BTRFS_IOC_SNAP_CREATE_V2
Create a snapshot of a subvolume.

Field

Description

ioctl fd

file descriptor of the directory inside which to create the new snapshot

ioctl args

struct btrfs_ioctl_vol_args_v2

args.fd

file descriptor of any directory inside the subvolume to snapshot, must be on the filesystem

args.transid

ignored

args.flags

any subset of BTRFS_SUBVOL_RDONLY to make the new snapshot read-only, or BTRFS_SUBVOL_QGROUP_INHERIT to apply the qgroup_inherit field

args.name

the name, under the ioctl fd, for the new subvolume

### BTRFS_IOC_SUBVOL_CREATE_V2
(since: 3.6) Create a subvolume, qgroup inheritance and limits can be specified.

Field

Description

ioctl fd

file descriptor of the parent directory of the new subvolume

ioctl args

struct btrfs_ioctl_vol_args_v2

args.fd

ignored

args.transid

ignored

args.flags

flags to set on the subvolume, BTRFS_SUBVOL_RDONLY for readonly, BTRFS_SUBVOL_QGROUP_INHERIT if the qgroup related fields should be processed

args.size

number of entries in args.qgroup_inherit

args.qgroup_inherit

inherit the given qgroups (struct btrfs_qgroup_inherit) and limits (struct btrfs_qgroup_limit)

name

name of the subvolume, although the buffer can be almost 4KiB, the file size is limited by Linux VFS to 255 characters and must not contain a slash ('/')

### BTRFS_IOC_SUBVOL_GETFLAGS
Read the flags of a subvolume. The returned flags are either 0 or BTRFS_SUBVOL_RDONLY.

Field

Description

ioctl fd

file descriptor of the subvolume to examine

ioctl args

uint64_t

### BTRFS_IOC_SUBVOL_SETFLAGS
Change the flags of a subvolume.

Field

Description

ioctl fd

file descriptor of the subvolume to modify

ioctl args

uint64_t, either 0 or BTRFS_SUBVOL_RDONLY

### BTRFS_IOC_GET_FSLABEL
Read the label of the filesystem into a given buffer. Alternatively it can be read from /sys/fs/btrfs/FSID/label though it requires to know the FSID of the filesystem.

Field

Description

ioctl fd

file descriptor of any file/directory in the filesystem

ioctl args

char buffer[BTRFS_LABEL_SIZE]

### BTRFS_IOC_SET_FSLABEL
Set the label of filesystem from given buffer. The maximum length also accounts for terminating NUL character. Alternatively it can be also set by writing to /sys/fs/btrfs/FSID/label though it requires to know the FSID of the filesystem (and an explicit commit before the change is permanent).

Required permissions: CAP_SYS_ADMIN

Field

Description

ioctl fd

file descriptor of any file/directory in the filesystem

ioctl args

char buffer[BTRFS_LABEL_SIZE]

### BTRFS_IOC_FS_INFO
Read internal information about the filesystem. The data can be exchanged both ways and part of the structure could be optionally filled. The reserved bytes can be used to get new kind of information in the future, always depending on the flags set.

Field

Description

ioctl fd

file descriptor of any file/directory in the filesystem

ioctl args

struct btrfs_ioctl_fs_info_args

### BTRFS_IOC_GET_SUBVOL_INFO
Get information about a subvolume.

Field

Description

ioctl fd

file descriptor of the subvolume to examine

ioctl args

struct btrfs_ioctl_get_subvol_info_args

### BTRFS_IOC_SNAP_DESTROY_V2
Destroy a subvolume, which may or may not be a snapshot.

Field

Description

ioctl fd

if flags does not include BTRFS_SUBVOL_SPEC_BY_ID, or if executing in a non-root user namespace, file descriptor of the parent directory containing the subvolume to delete; otherwise, file descriptor of any directory on the same filesystem as the subvolume to delete, but not within the same subvolume

ioctl args

struct btrfs_ioctl_vol_args_v2

args.fd

ignored

args.transid

ignored

args.flags

0 if the name field identifies the subvolume by name in the specified directory, or BTRFS_SUBVOL_SPEC_BY_ID if the subvolid field specifies the ID of the subvolume

args.name

only if flags does not contain BTRFS_SUBVOL_SPEC_BY_ID, the name (within the directory identified by fd) of the subvolume to delete

args.subvolid

only if flags contains BTRFS_SUBVOL_SPEC_BY_ID, the subvolume ID of the subvolume to delete

### BTRFS_IOC_SUBVOL_SYNC_WAIT
(since: 6.13) Wait until a deleted subvolume is cleaned or query the state.

There are several modes of operation, where the most common ones are to wait on a specific subvolume or all currently queued for cleaning. This is utilized e.g. in backup applications that delete subvolumes and wait until they're cleaned to check for remaining space.

The other modes are for flexibility, e.g. for monitoring or checkpoints in the queue of deleted subvolumes, again without the need to use SEARCH_TREE.

Notes:

- waiting is interruptible, the timeout is set to 1 second and is not configurable

- repeated calls to the ioctl see a different state, so this is inherently racy when using e.g. the count or peek next/last

Use cases (definition of constants):

- a subvolume A was deleted, wait for cleaning (WAIT_FOR_ONE)

- a bunch of subvolumes were deleted, wait for all (WAIT_FOR_QUEUED or PEEK_LAST + WAIT_FOR_ONE)

- count how many are queued (not blocking), for monitoring purposes

- report progress (PEEK_NEXT), may miss some if cleaning is quick

- own waiting in user space (PEEK_LAST until it's 0)

Field

Description

ioctl fd

file descriptor of any file or directory in the filesystem

ioctl args

struct btrfs_ioctl_subvol_wait

args.subvolid

Depending on the mode, the numeric id of subvolume to wait for, or the one queried by PEEK modes

args.mode

mode of operation described above

args.count

if mode is set to COUNT the number of subvolumes queued for cleaning

## AVAILABILITY
btrfs is part of btrfs-progs. Please refer to the documentation at https://btrfs.readthedocs.io.

## SEE ALSO
ioctl(2)


kqueue

package: libkqueue-devel

title: kqueue(2)

summary: kernel event notification mechanism

text:
# kqueue(2)

## NAME
kqueue, kevent — kernel event notification mechanism

## SYNOPSIS
\#include <sys/types.h>

\#include <sys/event.h>

\#include <sys/time.h>

int

kqueue(void);

int

kevent(int kq, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout);

EV_SET(&kev, ident, filter, flags, fflags, data, udata);

## DESCRIPTION
The kqueue() system call provides a generic method of notifying the user when an event happens or a condition holds, based on the results of small pieces of kernel code termed filters. A kevent is identified by the (ident, filter) pair; there may only be one unique kevent per kqueue.

The filter is executed upon the initial registration of a kevent in order to detect whether a preexisting condition is present, and is also executed whenever an event is passed to the filter for evaluation. If the filter determines that the condition should be reported, then the kevent is placed on the kqueue for the user to retrieve.

The filter is also run when the user attempts to retrieve the kevent from the kqueue. If the filter indicates that the condition that triggered the event no longer holds, the kevent is removed from the kqueue and is not returned.

Multiple events which trigger the filter do not result in multiple kevents being placed on the kqueue; instead, the filter will aggregate the events into a single struct kevent. Calling close() on a file descriptor will remove any kevents that reference the descriptor.

The kqueue() system call creates a new kernel event queue and returns a descriptor. The queue is not inherited by a child created with fork(2). However, if rfork(2) is called without the RFFDG flag, then the descriptor table is shared, which will allow sharing of the kqueue between two processes.

The kevent() system call is used to register events with the queue, and return any pending events to the user. The changelist argument is a pointer to an array of kevent structures, as defined in <sys/event.h>. All changes contained in the changelist are applied before any pending events are read from the queue. The nchanges argument gives the size of changelist. The eventlist argument is a pointer to an array of kevent structures. The nevents argument determines the size of eventlist. When nevents is zero, kevent() will return immediately even if there is a timeout specified unlike select(2). If timeout is a non-NULL pointer, it specifies a maximum interval to wait for an event, which will be interpreted as a struct timespec. If timeout is a NULL pointer, kevent() waits indefinitely. To effect a poll, the timeout argument should be non-NULL, pointing to a zero-valued timespec structure. The same array may be used for the changelist and eventlist.

The EV_SET() macro is provided for ease of initializing a kevent structure.

The kevent structure is defined as:

```
struct kevent {
	uintptr_t ident;	/* identifier for this event */
	short	  filter;	/* filter for event */
	u_short	  flags;	/* action flags for kqueue */
	u_int	  fflags;	/* filter flag value */
	intptr_t  data;		/* filter data value */
	void	  *udata;	/* opaque user data identifier */
};
```

The fields of struct kevent are:

ident

Value used to identify this event. The exact interpretation is determined by the attached filter, but often is a file descriptor.

filter

Identifies the kernel filter used to process this event. The pre-defined system filters are described below.

flags

Actions to perform on the event.

fflags

Filter-specific flags.

data

Filter-specific data value.

udata

Opaque user-defined value passed through the kernel unchanged.

The flags field can contain the following values:

EV_ADD

Adds the event to the kqueue. Re-adding an existing event will modify the parameters of the original event, and not result in a duplicate entry. Adding an event automatically enables it, unless overridden by the EV_DISABLE flag.

EV_ENABLE

Permit kevent() to return the event if it is triggered.

EV_DISABLE

Disable the event so kevent() will not return it. The filter itself is not disabled.

EV_DISPATCH

Disable the event source immediately after delivery of an event. See EV_DISABLE above.

EV_DELETE

Removes the event from the kqueue. Events which are attached to file descriptors are automatically deleted on the last close of the descriptor.

EV_RECEIPT

This flag is useful for making bulk changes to a kqueue without draining any pending events. When passed as input, it forces EV_ERROR to always be returned. When a filter is successfully added the data field will be zero.

EV_ONESHOT

Causes the event to return only the first occurrence of the filter being triggered. After the user retrieves the event from the kqueue, it is deleted.

EV_CLEAR

After the event is retrieved by the user, its state is reset. This is useful for filters which report state transitions instead of the current state. Note that some filters may automatically set this flag internally.

EV_EOF

Filters may set this flag to indicate filter-specific EOF condition.

EV_ERROR

See RETURN VALUES below.

The predefined system filters are listed below. Arguments may be passed to and from the filter via the fflags and data fields in the kevent structure.

EVFILT_READ

Takes a descriptor as the identifier, and returns whenever there is data available to read. The behavior of the filter is slightly different depending on the descriptor type. Sockets

Sockets which have previously been passed to listen() return when there is an incoming connection pending. data contains the size of the listen backlog. Other socket descriptors return when there is data to be read, subject to the SO_RCVLOWAT value of the socket buffer. This may be overridden with a per-filter low water mark at the time the filter is added by setting the NOTE_LOWAT flag in fflags, and specifying the new low water mark in data. On return, data contains the number of bytes of protocol data available to read.

If the read direction of the socket has shutdown, then the filter also sets EV_EOF in flags, and returns the socket error (if any) in fflags. It is possible for EOF to be returned (indicating the connection is gone) while there is still data pending in the socket buffer.

Vnodes

Returns when the file pointer is not at the end of file. data contains the offset from current position to end of file, and may be negative.

Fifos, Pipes

Returns when the there is data to read; data contains the number of bytes available. When the last writer disconnects, the filter will set EV_EOF in flags. This may be cleared by passing in EV_CLEAR, at which point the filter will resume waiting for data to become available before returning.

BPF devices

Returns when the BPF buffer is full, the BPF timeout has expired, or when the BPF has “immediate mode” enabled and there is any data to read; data contains the number of bytes available.

EVFILT_WRITE

Takes a descriptor as the identifier, and returns whenever it is possible to write to the descriptor. For sockets, pipes and fifos, data will contain the amount of space remaining in the write buffer. The filter will set EV_EOF when the reader disconnects, and for the fifo case, this may be cleared by use of EV_CLEAR. Note that this filter is not supported for vnodes or BPF devices. For sockets, the low water mark and socket error handling is identical to the EVFILT_READ case.

EVFILT_VNODE

Takes a file descriptor as the identifier and the events to watch for in fflags, and returns when one or more of the requested events occurs on the descriptor. The events to monitor are: NOTE_DELETE

The unlink() system call was called on the file referenced by the descriptor.

NOTE_WRITE

A write occurred on the file referenced by the descriptor.

NOTE_EXTEND

The file referenced by the descriptor was extended.

NOTE_ATTRIB

The file referenced by the descriptor had its attributes changed.

NOTE_LINK

The link count on the file changed.

NOTE_RENAME

The file referenced by the descriptor was renamed.

On return, fflags contains the events which triggered the filter.

EVFILT_SIGNAL

Takes the signal number to monitor as the identifier and returns when the given signal is delivered to the process. This overrides the signal() and sigaction() facilities, and has a higher precedence. The filter will record all attempts to deliver a signal to a process, even if the signal has been marked as SIG_IGN. data returns the number of times the signal has occurred since the last call to kevent(). This filter automatically sets the EV_CLEAR flag internally.

EVFILT_TIMER

Establishes an arbitrary timer identified by ident. When adding a timer, data specifies the timeout period in milliseconds. The timer will be periodic unless EV_ONESHOT is specified. On return, data contains the number of times the timeout has expired since the last call to kevent(). This filter automatically sets the EV_CLEAR flag internally. There is a system wide limit on the number of timers which is controlled by the kern.kq_calloutmax sysctl.

EVFILT_USER

Establishes a user event identified by ident which is not assosicated with any kernel mechanism but is triggered by user level code. The lower 24 bits of the fflags may be used for user defined flags and manipulated using the following: NOTE_FFNOP

Ignore the input fflags.

NOTE_FFAND

Bitwise AND fflags.

NOTE_FFOR

Bitwise OR fflags.

NOTE_COPY

Copy fflags.

NOTE_FFCTRLMASK

Control mask for fflags.

NOTE_FFLAGSMASK

User defined flag mask for fflags.

A user event is triggered for output with the following:

NOTE_TRIGGER

Cause the event to be triggered.

On return, fflags contains the users defined flags in the lower 24 bits.

## RETURN VALUES
The kqueue() system call creates a new kernel event queue and returns a file descriptor. If there was an error creating the kernel event queue, a value of -1 is returned and errno set.

The kevent() system call returns the number of events placed in the eventlist, up to the value given by nevents. If an error occurs while processing an element of the changelist and there is enough room in the eventlist, then the event will be placed in the eventlist with EV_ERROR set in flags and the system error in data. Otherwise, -1 will be returned, and errno will be set to indicate the error condition. If the time limit expires, then kevent() returns 0.

## ERRORS
The kqueue() system call fails if:

[ENOMEM]

The kernel failed to allocate enough memory for the kernel queue.

[EMFILE]

The per-process descriptor table is full.

[ENFILE]

The system file table is full.

The kevent() system call fails if:

[EACCES]

The process does not have permission to register a filter.

[EFAULT]

There was an error reading or writing the kevent structure.

[EBADF]

The specified descriptor is invalid.

[EINTR]

A signal was delivered before the timeout expired and before any events were placed on the kqueue for return.

[EINVAL]

The specified time limit or filter is invalid.

[ENOENT]

The event could not be found to be modified or deleted.

[ENOMEM]

No memory was available to register the event or, in the special case of a timer, the maximum number of timers has been exceeded. This maximum is configurable via the kern.kq_calloutmax sysctl.

[ESRCH]

The specified process to attach to does not exist.

## SEE ALSO
aio_error(2), aio_read(2), aio_return(2), poll(2), read(2), select(2), sigaction(2), write(2), signal(3)

## HISTORY
The kqueue() and kevent() system calls first appeared in FreeBSD 4.1.

## AUTHORS
The kqueue() system and this manual page were written by Jonathan Lemon ⟨jlemon@FreeBSD.org⟩.


package: libnvme-devel

title: nbft_control(2)

text:
# nbft_control(2)

## NAME
struct nbft_control - NBFT Table - Control Descriptor (Figure 8)

## SYNOPSIS
struct nbft_control {

__u8 structure_id;

__u8 major_revision;

__u8 minor_revision;

__u8 reserved1;

__le16 csl;

__u8 flags;

__u8 reserved2;

struct nbft_heap_obj hdesc;

__u8 hsv;

__u8 reserved3;

__le32 hfio;

__le16 hfil;

__u8 hfiv;

__u8 num_hfi;

__le32 ssnso;

__le16 ssnsl;

__u8 ssnsv;

__u8 num_ssns;

__le32 seco;

__le16 secl;

__u8 secv;

__u8 num_sec;

__le32 disco;

__le16 discl;

__u8 discv;

__u8 num_disc;

__u8 reserved4[16];

};

## Members
structure_id

Structure ID: This field specifies the element (refer to enum nbft_desc_type). This field shall be set to 1h (i.e., Control, #NBFT_DESC_CONTROL).

major_revision

Major Revision: The major revision of the structure corresponding to the Signature field. Larger major revision numbers should not be assumed backward compatible to lower major revision numbers with the same signature.

minor_revision

Minor Revision: The minor revision of the structure corresponding to the signature field. If the major revision numbers are the same, any minor revision number differences shall be backwards compatible with the same signature.

reserved1

Reserved.

csl

Control Structure Length (CSL): This field indicates the length in bytes of the Control Descriptor.

flags

Flags, see enum nbft_control_flags.

reserved2

Reserved.

hdesc

Host Descriptor (HDESC): This field indicates the location and length of the Host Descriptor (see struct nbft_host).

hsv

Host Descriptor Version (HSV): This field indicates the version of the Host Descriptor.

reserved3

Reserved.

hfio

HFI Descriptor List Offset (HFIO): If this field is set to a non-zero value, then this field indicates the offset in bytes of the HFI Descriptor List, if any, from byte offset 0h of the NBFT Table Header. If the num_hfi field is cleared to 0h, then this field is reserved.

hfil

HFI Descriptor Length (HFIL): This field indicates the length in bytes of each HFI Descriptor, if any. If the num_hfi field is cleared to 0h, then this field is reserved.

hfiv

HFI Descriptor Version (HFIV): This field indicates the version of each HFI Descriptor.

num_hfi

Number of Host Fabric Interface Descriptors (NumHFI): This field indicates the number of HFI Descriptors (see struct nbft_hfi) in the HFI Descriptor List, if any. If no interfaces have been configured, then this field shall be cleared to 0h.

ssnso

SSNS Descriptor List Offset (SSNSO):: This field indicates the offset in bytes of the SSNS Descriptor List, if any, from byte offset 0h of the NBFT Table Header. If the num_ssns field is cleared to 0h, then this field is reserved.

ssnsl

SSNS Descriptor Length (SSNSL): This field indicates the length in bytes of each SSNS Descriptor, if any. If the num_ssns field is cleared to 0h, then this field is reserved.

ssnsv

SSNS Descriptor Version (SSNSV): This field indicates the version of the SSNS Descriptor.

num_ssns

Number of Subsystem and Namespace Descriptors (NumSSNS): This field indicates the number of Subsystem Namespace (SSNS) Descriptors (see struct nbft_ssns) in the SSNS Descriptor List, if any.

seco

Security Profile Descriptor List Offset (SECO): This field indicates the offset in bytes of the Security Profile Descriptor List, if any, from byte offset 0h of the NBFT Table Header. If the num_sec field is cleared to 0h, then this field is reserved.

secl

Security Profile Descriptor Length (SECL): This field indicates the length in bytes of each Security Profile Descriptor, if any. If the num_sec field is cleared to 0h, then this field is reserved.

secv

Security Profile Descriptor Version (SECV): This field indicates the version of the Security Profile Descriptor.

num_sec

Number of Security Profile Descriptors (NumSec): This field indicates the number of Security Profile Descriptors (see struct nbft_security), if any, in the Security Profile Descriptor List.

disco

Discovery Descriptor Offset (DISCO): This field indicates the offset in bytes of the Discovery Descriptor List, if any, from byte offset 0h of the NBFT Table Header. If the num_disc field is cleared to 0h, then this field is reserved.

discl

Discovery Descriptor Length (DISCL): This field indicates the length in bytes of each Discovery Descriptor, if any. If the num_disc field is cleared to 0h, then this field is reserved.

discv

Discovery Descriptor Version (DISCV): This field indicates the version of the Discovery Descriptor.

num_disc

Number of Discovery Descriptors (NumDisc): This field indicates the number of Discovery Descriptors (see struct nbft_discovery), if any, in the Discovery Descriptor List, if any.

reserved4

Reserved.


title: nbft_control_flags(2)

summary: Control Descriptor Flags

text:
# nbft_control_flags(2)

## NAME
enum nbft_control_flags - Control Descriptor Flags

## SYNOPSIS
enum nbft_control_flags {

NBFT_CONTROL_VALID

};

## Constants
NBFT_CONTROL_VALID

Block Valid: indicates that the structure is valid.


title: nbft_desc_type(2)

text:
# nbft_desc_type(2)

## NAME
enum nbft_desc_type - NBFT Elements - Descriptor Types (Figure 5)

## SYNOPSIS
enum nbft_desc_type {

NBFT_DESC_HEADER ,

NBFT_DESC_CONTROL ,

NBFT_DESC_HOST ,

NBFT_DESC_HFI ,

NBFT_DESC_SSNS ,

NBFT_DESC_SECURITY ,

NBFT_DESC_DISCOVERY ,

NBFT_DESC_HFI_TRINFO ,

NBFT_DESC_RESERVED_8 ,

NBFT_DESC_SSNS_EXT_INFO

};

## Constants
NBFT_DESC_HEADER

Header: an ACPI structure header with some additional NBFT specific info.

NBFT_DESC_CONTROL

Control Descriptor: indicates the location of host, HFI, SSNS, security, and discovery descriptors.

NBFT_DESC_HOST

Host Descriptor: host information.

NBFT_DESC_HFI

HFI Descriptor: an indexable table of HFI Descriptors, one for each fabric interface on the host.

NBFT_DESC_SSNS

Subsystem Namespace Descriptor: an indexable table of SSNS Descriptors.

NBFT_DESC_SECURITY

Security Descriptor: an indexable table of Security descriptors.

NBFT_DESC_DISCOVERY

Discovery Descriptor: an indexable table of Discovery Descriptors.

NBFT_DESC_HFI_TRINFO

HFI Transport Descriptor: indicated by an HFI Descriptor, corresponds to a specific transport for a single HFI.

NBFT_DESC_RESERVED_8

Reserved.

NBFT_DESC_SSNS_EXT_INFO

SSNS Extended Info Descriptor: indicated by an SSNS Descriptor if required.


title: nbft_discovery(2)

summary: Discovery Descriptor (Figure 24)

text:
# nbft_discovery(2)

## NAME
struct nbft_discovery - Discovery Descriptor (Figure 24)

## SYNOPSIS
struct nbft_discovery {

__u8 structure_id;

__u8 flags;

__u8 index;

__u8 hfi_index;

__u8 sec_index;

__u8 reserved1;

struct nbft_heap_obj discovery_ctrl_addr_obj;

struct nbft_heap_obj discovery_ctrl_nqn_obj;

__u8 reserved2[14];

};

## Members
structure_id

Structure ID: This field shall be set to 6h (i.e., Discovery Descriptor; #NBFT_DESC_DISCOVERY).

flags

Discovery Descriptor Flags, see enum nbft_discovery_flags.

index

Discovery Descriptor Index: This field indicates the number of this Discovery Descriptor in the Discovery Descriptor List.

hfi_index

HFI Descriptor Index: This field indicates the value of the HFI Descriptor Index field of the HFI Descriptor associated with this Discovery Descriptor. If multiple HFIs share a common Discovery controller, there shall be multiple Discovery Descriptor entries with one per HFI.

sec_index

Security Profile Descriptor Index: This field indicates the value of the Security Profile Descriptor Index field of the Security Descriptor associated with this Discovery Descriptor.

reserved1

Reserved.

discovery_ctrl_addr_obj

Discovery Controller Address Heap Object Reference: This field indicates the location and size of a heap object containing a URI which indicates an NVMe Discovery controller associated with this Discovery Descriptor. If this field is cleared to 0h, then no URI is specified.

discovery_ctrl_nqn_obj

Discovery Controller NQN Heap Object Reference: If set to a non-zero value, this field indicates the location and size of a heap object containing an NVMe Discovery controller NQN. If the NVMe Discovery controller referenced by this record requires secure authentication with a well known Subsystem NQN, this field indicates the unique NQN for that NVMe Discovery controller. This record is involved formatted as an NQN string. If this field is cleared to 0h, then this field is reserved and the OS shall use the well known discovery NQN for this record.

reserved2

Reserved.


title: nbft_discovery_flags(2)

summary: Discovery Descriptor Flags

text:
# nbft_discovery_flags(2)

## NAME
enum nbft_discovery_flags - Discovery Descriptor Flags

## SYNOPSIS
enum nbft_discovery_flags {

NBFT_DISCOVERY_VALID

};

## Constants
NBFT_DISCOVERY_VALID

Descriptor Valid: if set to 1h, then this descriptor is valid. If cleared to 0h, then this descriptor is reserved.


title: nbft_header(2)

summary: NBFT Table - Header (Figure 8)

text:
# nbft_header(2)

## NAME
struct nbft_header - NBFT Table - Header (Figure 8)

## SYNOPSIS
struct nbft_header {

char signature[4];

__le32 length;

__u8 major_revision;

__u8 checksum;

char oem_id[6];

char oem_table_id[8];

__le32 oem_revision;

__le32 creator_id;

__le32 creator_revision;

__le32 heap_offset;

__le32 heap_length;

struct nbft_heap_obj driver_dev_path_sig;

__u8 minor_revision;

__u8 reserved[13];

};

## Members
signature

Signature: An ASCII string representation of the table identifier. This field shall be set to the value 4E424654h (i.e. "NBFT", see #NBFT_HEADER_SIG).

length

Length: The length of the table, in bytes, including the header, starting from offset 0h. This field is used to record the size of the entire table.

major_revision

Major Revision: The major revision of the structure corresponding to the Signature field. Larger major revision numbers should not be assumed backward compatible to lower major revision numbers with the same signature.

checksum

Checksum: The entire table, including the Checksum field, shall sum to 0h to be considered valid.

oem_id

OEMID shall be populated by the NBFT driver writer by an OEM-supplied string that identifies the OEM. All trailing bytes shall be NULL.

oem_table_id

OEM Table ID: This field shall be populated by the NBFT driver writer with an OEM-supplied string that the OEM uses to identify the particular data table. This field is particularly useful when defining a definition block to distinguish definition block functions. The OEM assigns each dissimilar table a new OEM Table ID.

oem_revision

OEM Revision: An OEM-supplied revision number. Larger numbers are assumed to be newer revisions.

creator_id

Creator ID: Vendor ID of utility that created the table. For instance, this may be the ID for the ASL Compiler.

creator_revision

Creator Revision: Revision of utility that created the table. For instance, this may be the ID for the ASL Compiler.

heap_offset

Heap Offset (HO): This field indicates the offset in bytes of the heap, if any, from byte offset 0h of the NBFT Table Header.

heap_length

Heap Length (HL): The length of the heap, if any.

driver_dev_path_sig

Driver Signature Heap Object Reference: This field indicates the offset in bytes of a heap object containing the Driver Signature, if any, from byte offset 0h of the NBFT Table Header.

minor_revision

Minor Revision: The minor revision of the structure corresponding to the Signature field. If the major revision numbers are the same, any minor revision number differences shall be backwards compatible with the same signature.

reserved

Reserved.


title: nbft_heap_obj(2)

summary: NBFT Header Driver Signature

text:
# nbft_heap_obj(2)

## NAME
struct nbft_heap_obj - NBFT Header Driver Signature

## SYNOPSIS
struct nbft_heap_obj {

__le32 offset;

__le16 length;

};

## Members
offset

Offset in bytes of the heap object, if any, from byte offset 0h of the NBFT Table Header.

length

Length in bytes of the heap object, if any.


title: nbft_hfi(2)

text:
# nbft_hfi(2)

## NAME
struct nbft_hfi - Host Fabric Interface (HFI) Descriptor (Figure 11)

## SYNOPSIS
struct nbft_hfi {

__u8 structure_id;

__u8 index;

__u8 flags;

__u8 trtype;

__u8 reserved1[12];

struct nbft_heap_obj trinfo_obj;

__u8 reserved2[10];

};

## Members
structure_id

Structure ID: This field shall be set to 3h (i.e., Host Fabric Interface Descriptor; #NBFT_DESC_HFI).

index

HFI Descriptor Index: This field indicates the number of this HFI Descriptor in the Host Fabric Interface Descriptor List.

flags

HFI Descriptor Flags, see enum nbft_hfi_flags.

trtype

HFI Transport Type, see enum nbft_trtype.

reserved1

Reserved.

trinfo_obj

HFI Transport Info Descriptor Heap Object Reference: If this field is set to a non-zero value, then this field indicates the location and size of a heap object containing a HFI Transport Info.

reserved2

Reserved.


title: nbft_hfi_flags(2)

summary: HFI Descriptor Flags

text:
# nbft_hfi_flags(2)

## NAME
enum nbft_hfi_flags - HFI Descriptor Flags

## SYNOPSIS
enum nbft_hfi_flags {

NBFT_HFI_VALID

};

## Constants
NBFT_HFI_VALID

Descriptor Valid: If set to 1h, then this descriptor is valid. If cleared to 0h, then this descriptor is reserved.


title: nbft_hfi_info_tcp(2)

text:
# nbft_hfi_info_tcp(2)

## NAME
struct nbft_hfi_info_tcp - HFI Transport Info Descriptor - NVMe/TCP (Figure 13)

## SYNOPSIS
struct nbft_hfi_info_tcp {

__u8 structure_id;

__u8 version;

__u8 trtype;

__u8 trinfo_version;

__le16 hfi_index;

__u8 flags;

__le32 pci_sbdf;

__u8 mac_addr[6];

__le16 vlan;

__u8 ip_origin;

__u8 ip_address[16];

__u8 subnet_mask_prefix;

__u8 ip_gateway[16];

__u8 reserved1;

__le16 route_metric;

__u8 primary_dns[16];

__u8 secondary_dns[16];

__u8 dhcp_server[16];

struct nbft_heap_obj host_name_obj;

__u8 reserved2[18];

};

## Members
structure_id

Structure ID: This field shall be set to 7h (i.e., HFI Transport Info; #NBFT_DESC_HFI_TRINFO).

version

Version: This field shall be set to 1h.

trtype

HFI Transport Type, see enum nbft_trtype: This field shall be set to 03h (i.e., NVMe/TCP; #NBFT_TRTYPE_TCP).

trinfo_version

Transport Info Version: Implementations compliant to this specification shall set this field to 1h.

hfi_index

HFI Descriptor Index: The value of the HFI Descriptor Index field of the HFI Descriptor (see struct nbft_hfi.index) whose HFI Transport Info Descriptor Heap Object Reference field indicates this HFI Transport Info Descriptor.

flags

HFI Transport Flags, see enum nbft_hfi_info_tcp_flags.

pci_sbdf

PCI Express Routing ID for the HFI Transport Function: This field indicates the PCI Express Routing ID as specified in the PCI Express Base Specification.

mac_addr

MAC Address: The MAC address of this HFI, in EUI-48TM format, as defined in the IEEE Guidelines for Use of Extended Unique Identifiers. This field shall be set to a non-zero value.

vlan

VLAN: If this field is set to a non-zero value, then this field contains the VLAN identifier if the VLAN associated with this HFI, as defined in IEEE 802.1q-2018. If no VLAN is associated with this HFI, then this field shall be cleared to 0h.

ip_origin

IP Origin: If this field is set to a non-zero value, then this field indicates the source of Ethernet L3 configuration information used by the driver for this interface. Valid values are defined in the Win 32 API: NL_PREFIX_ORIGIN enumeration specification. This field should be cleared to 0h if the IP Origin field is unused by driver.

ip_address

IP Address: This field indicates the IPv4 or IPv6 address of this HFI. This field shall be set to a non-zero value.

subnet_mask_prefix

Subnet Mask Prefix: This field indicates the IPv4 or IPv6 subnet mask in CIDR routing prefix notation.

ip_gateway

IP Gateway: If this field is set to a non-zero value, this field indicates the IPv4 or IPv6 address of the IP gateway for this HFI. If this field is cleared to 0h, then no IP gateway is specified.

reserved1

Reserved.

route_metric

Route Metric: If this field is set to a non-zero value, this field indicates the cost value for the route indicated by this HF. This field contains the value utilized by the pre-OS driver when chosing among all available routes. Lower values relate to higher priority. Refer to IETF RFC 4249. If the pre-OS driver supports routing and did not configure a specific route metric for this interface, then the pre-OS driver should set this value to 500. If the pre-OS driver does not support routing, then this field should be cleared to 0h.

primary_dns

Primary DNS: If this field is set to a non-zero value, this field indicates the IPv4 or IPv6 address of the Primary DNS server for this HFI, if any, from byte offset 0h of the NBFT Table Header. If this field is cleared to 0h, then no Primary DNS is specified.

secondary_dns

Secondary DNS: If this field is set to a non-zero value, this field indicates the IPv4 or IPv6 address of the Secondary DNS server for this HFI, if any, from byte offset 0h of the NBFT Table Header. If this field is cleared to 0h, then no Secondary DNS is specified.

dhcp_server

DHCP Server: If the DHCP Override bit is set to 1h, then this field indicates the IPv4 or IPv6 address of the DHCP server used to assign this HFI address. If that bit is cleared to 0h, then this field is reserved.

host_name_obj

Host Name Heap Object Reference: If this field is set to a non-zero value, then this field indicates the location and size of a heap object containing a Host Name string.

reserved2

Reserved.


title: nbft_hfi_info_tcp_flags(2)

summary: HFI Transport Flags

text:
# nbft_hfi_info_tcp_flags(2)

## NAME
enum nbft_hfi_info_tcp_flags - HFI Transport Flags

## SYNOPSIS
enum nbft_hfi_info_tcp_flags {

NBFT_HFI_INFO_TCP_VALID ,

NBFT_HFI_INFO_TCP_GLOBAL_ROUTE ,

NBFT_HFI_INFO_TCP_DHCP_OVERRIDE

};

## Constants
NBFT_HFI_INFO_TCP_VALID

Descriptor Valid: if set to 1h, then this descriptor is valid. If cleared to 0h, then this descriptor is reserved.

NBFT_HFI_INFO_TCP_GLOBAL_ROUTE

Global Route vs. Link Local Override Flag: if set to 1h, then the BIOS utilized this interface described by HFI to be the default route with highest priority. If cleared to 0h, then routes are local to their own scope.

NBFT_HFI_INFO_TCP_DHCP_OVERRIDE

DHCP Override: if set to 1, then HFI information was populated by consuming the DHCP on this interface. If cleared to 0h, then the HFI information was set administratively by a configuration interface to the driver and pre-OS envrionment.


title: nbft_host(2)

summary: Host Descriptor (Figure 9)

text:
# nbft_host(2)

## NAME
struct nbft_host - Host Descriptor (Figure 9)

## SYNOPSIS
struct nbft_host {

__u8 structure_id;

__u8 flags;

__u8 host_id[16];

struct nbft_heap_obj host_nqn_obj;

__u8 reserved[8];

};

## Members
structure_id

Structure ID: This field shall be set to 2h (i.e., Host Descriptor; #NBFT_DESC_HOST).

flags

Host Flags, see enum nbft_host_flags.

host_id

Host ID: This field shall be set to the Host Identifier. This field shall not be empty if the NBFT and NVMe Boot are supported by the Platform.

host_nqn_obj

Host NQN Heap Object Reference: this field indicates a heap object containing a Host NQN. This object shall not be empty if the NBFT and NVMe Boot are supported by the Platform.

reserved

Reserved.


title: nbft_host_flags(2)

summary: Host Flags

text:
# nbft_host_flags(2)

## NAME
enum nbft_host_flags - Host Flags

## SYNOPSIS
enum nbft_host_flags {

NBFT_HOST_VALID ,

NBFT_HOST_HOSTID_CONFIGURED ,

NBFT_HOST_HOSTNQN_CONFIGURED ,

NBFT_HOST_PRIMARY_ADMIN_MASK ,

NBFT_HOST_PRIMARY_ADMIN_NOT_INDICATED ,

NBFT_HOST_PRIMARY_ADMIN_UNSELECTED ,

NBFT_HOST_PRIMARY_ADMIN_SELECTED

};

## Constants
NBFT_HOST_VALID

Descriptor Valid: If set to 1h, then this descriptor is valid. If cleared to 0h, then this descriptor is reserved.

NBFT_HOST_HOSTID_CONFIGURED

HostID Configured: If set to 1h, then the Host ID field contains an administratively-configured value. If cleared to 0h, then the Host ID field contains a driver default value.

NBFT_HOST_HOSTNQN_CONFIGURED

Host NQN Configured: If set to 1h, then the Host NQN indicated by the Host NQN Heap Object Reference field (struct nbft_host.host_nqn) contains an administratively-configured value. If cleared to 0h, then the Host NQN indicated by the Host NQN Offset field contains a driver default value.

NBFT_HOST_PRIMARY_ADMIN_MASK

Mask to get Primary Administrative Host Descriptor: indicates whether the Host Descriptor in this NBFT was selected as the primary NBFT for administrative purposes of platform identity as a hint to the OS. If multiple NBFT tables are present, only one NBFT should be administratively selected. There is no enforcement mechanism for this to be coordinated between multiple NBFT tables, but this field should be set to Selected (#NBFT_HOST_PRIMARY_ADMIN_SELECTED) if more than one NBFT is present.

NBFT_HOST_PRIMARY_ADMIN_NOT_INDICATED

Not Indicated by Driver: The driver that created this NBFT provided no administrative priority hint for this NBFT.

NBFT_HOST_PRIMARY_ADMIN_UNSELECTED

Unselected: The driver that created this NBFT explicitly indicated that this NBFT should not be prioritized over any other NBFT.

NBFT_HOST_PRIMARY_ADMIN_SELECTED

Selected: The driver that created this NBFT explicitly indicated that this NBFT should be prioritized over any other NBFT.


title: nbft_info(2)

summary: The parsed NBFT table data.

text:
# nbft_info(2)

## NAME
struct nbft_info - The parsed NBFT table data.

## SYNOPSIS
struct nbft_info {

char *filename;

__u8 *raw_nbft;

ssize_t raw_nbft_size;

struct nbft_info_host host;

struct nbft_info_hfi **hfi_list;

struct nbft_info_security **security_list;

struct nbft_info_discovery **discovery_list;

struct nbft_info_subsystem_ns **subsystem_ns_list;

};

## Members
filename

Path to the NBFT table.

raw_nbft

The original NBFT table contents.

raw_nbft_size

Size of raw_nbft.

host

The Host Descriptor (should match other NBFTs).

hfi_list

The HFI Descriptor List (null-terminated array).

security_list

The Security Profile Descriptor List (null-terminated array).

discovery_list

The Discovery Descriptor List (null-terminated array).

subsystem_ns_list

The SSNS Descriptor List (null-terminated array).


title: nbft_info_discovery(2)

summary: Discovery Descriptor

text:
# nbft_info_discovery(2)

## NAME
struct nbft_info_discovery - Discovery Descriptor

## SYNOPSIS
struct nbft_info_discovery {

int index;

struct nbft_info_security *security;

struct nbft_info_hfi *hfi;

char *uri;

char *nqn;

};

## Members
index

The number of this Discovery Descriptor in the Discovery Descriptor List.

security

The Security Profile Descriptor, see struct nbft_info_security.

hfi

The HFI Descriptor associated with this Discovery Descriptor. See struct nbft_info_hfi.

uri

A URI which indicates an NVMe Discovery controller associated with this Discovery Descriptor.

nqn

An NVMe Discovery controller NQN.


title: nbft_info_hfi(2)

summary: Host Fabric Interface (HFI) Descriptor

text:
# nbft_info_hfi(2)

## NAME
struct nbft_info_hfi - Host Fabric Interface (HFI) Descriptor

## SYNOPSIS
struct nbft_info_hfi {

int index;

char transport[8];

struct nbft_info_hfi_info_tcp tcp_info;

};

## Members
index

HFI Descriptor Index: indicates the number of this HFI Descriptor in the Host Fabric Interface Descriptor List.

transport

Transport Type string (e.g. 'tcp').

tcp_info

The HFI Transport Info Descriptor, see struct nbft_info_hfi_info_tcp.


title: nbft_info_hfi_info_tcp(2)

text:
# nbft_info_hfi_info_tcp(2)

## NAME
struct nbft_info_hfi_info_tcp - HFI Transport Info Descriptor - NVMe/TCP

## SYNOPSIS
struct nbft_info_hfi_info_tcp {

__u32 pci_sbdf;

__u8 mac_addr[6];

__u16 vlan;

__u8 ip_origin;

char ipaddr[40];

__u8 subnet_mask_prefix;

char gateway_ipaddr[40];

__u16 route_metric;

char primary_dns_ipaddr[40];

char secondary_dns_ipaddr[40];

char dhcp_server_ipaddr[40];

char *host_name;

bool this_hfi_is_default_route;

bool dhcp_override;

};

## Members
pci_sbdf

PCI Express Routing ID for the HFI Transport Function.

mac_addr

MAC Address: The MAC address of this HFI, in EUI-48TM format.

vlan

The VLAN identifier if the VLAN is associated with this HFI, as defined in IEEE 802.1q-2018 or zeroes if no VLAN is associated with this HFI.

ip_origin

The source of Ethernet L3 configuration information used by the driver or 0 if not used.

ipaddr

The IPv4 or IPv6 address of this HFI.

subnet_mask_prefix

The IPv4 or IPv6 subnet mask in CIDR routing prefix notation.

gateway_ipaddr

The IPv4 or IPv6 address of the IP gateway for this HFI or zeroes if no IP gateway is specified.

route_metric

The cost value for the route indicated by this HFI.

primary_dns_ipaddr

The IPv4 or IPv6 address of the Primary DNS server for this HFI.

secondary_dns_ipaddr

The IPv4 or IPv6 address of the Secondary DNS server for this HFI.

dhcp_server_ipaddr

The IPv4 or IPv6 address of the DHCP server used to assign this HFI address.

host_name

The Host Name string.

this_hfi_is_default_route

If True, then the BIOS utilized this interface described by HFI to be the default route with highest priority. If False, then routes are local to their own scope.

dhcp_override

If True, then HFI information was populated by consuming the DHCP on this interface. If False, then the HFI information was set administratively by a configuration interface to the driver and pre-OS envrionment.


title: nbft_info_host(2)

summary: Host Descriptor

text:
# nbft_info_host(2)

## NAME
struct nbft_info_host - Host Descriptor

## SYNOPSIS
struct nbft_info_host {

unsigned char *id;

char *nqn;

bool host_id_configured;

bool host_nqn_configured;

enum nbft_info_primary_admin_host_flag primary;

};

## Members
id

Host ID (raw UUID, length = 16 bytes).

nqn

Host NQN.

host_id_configured

HostID Configured Flag: value of True indicates that id contains administratively-configured value, or driver default value if False.

host_nqn_configured

Host NQN Configured Flag: value of True indicates that nqn contains administratively-configured value, or driver default value if False.

primary

Primary Administrative Host Descriptor, see enum nbft_info_primary_admin_host_flag.


title: nbft_info_nid_type(2)

summary: Namespace Identifier Type (NIDT)

text:
# nbft_info_nid_type(2)

## NAME
enum nbft_info_nid_type - Namespace Identifier Type (NIDT)

## SYNOPSIS
enum nbft_info_nid_type {

NBFT_INFO_NID_TYPE_NONE ,

NBFT_INFO_NID_TYPE_EUI64 ,

NBFT_INFO_NID_TYPE_NGUID ,

NBFT_INFO_NID_TYPE_NS_UUID

};

## Constants
NBFT_INFO_NID_TYPE_NONE

No identifier available.

NBFT_INFO_NID_TYPE_EUI64

The EUI-64 identifier.

NBFT_INFO_NID_TYPE_NGUID

The NSGUID identifier.

NBFT_INFO_NID_TYPE_NS_UUID

The UUID identifier.


title: nbft_info_primary_admin_host_flag(2)

text:
# nbft_info_primary_admin_host_flag(2)

## NAME
enum nbft_info_primary_admin_host_flag - Primary Administrative Host Descriptor Flags

## SYNOPSIS
enum nbft_info_primary_admin_host_flag {

NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_NOT_INDICATED ,

NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_UNSELECTED ,

NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_SELECTED ,

NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_RESERVED

};

## Constants
NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_NOT_INDICATED

Not Indicated by Driver: The driver that created this NBFT provided no administrative priority hint for this NBFT.

NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_UNSELECTED

Unselected: The driver that created this NBFT explicitly indicated that this NBFT should not be prioritized over any other NBFT.

NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_SELECTED

Selected: The driver that created this NBFT explicitly indicated that this NBFT should be prioritized over any other NBFT.

NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_RESERVED

Reserved.


title: nbft_info_security(2)

summary: Security Profile Descriptor

text:
# nbft_info_security(2)

## NAME
struct nbft_info_security - Security Profile Descriptor

## SYNOPSIS
struct nbft_info_security {

int index;

};

## Members
index

The number of this Security Profile Descriptor in the Security Profile Descriptor List.


title: nbft_info_subsystem_ns(2)

summary: Subsystem Namespace (SSNS) info

text:
# nbft_info_subsystem_ns(2)

## NAME
struct nbft_info_subsystem_ns - Subsystem Namespace (SSNS) info

## SYNOPSIS
struct nbft_info_subsystem_ns {

int index;

struct nbft_info_discovery *discovery;

struct nbft_info_security *security;

int num_hfis;

struct nbft_info_hfi **hfis;

char transport[8];

char traddr[40];

char *trsvcid;

__u16 subsys_port_id;

__u32 nsid;

enum nbft_info_nid_type nid_type;

__u8 *nid;

char *subsys_nqn;

bool pdu_header_digest_required;

bool data_digest_required;

int controller_id;

int asqsz;

char *dhcp_root_path_string;

bool discovered;

bool unavailable;

};

## Members
index

SSNS Descriptor Index in the descriptor list.

discovery

Primary Discovery Controller associated with this SSNS Descriptor.

security

Security Profile Descriptor associated with this namespace.

num_hfis

Number of HFIs.

hfis

List of HFIs associated with this namespace. Includes the primary HFI at the first position and all secondary HFIs. This array is null-terminated.

transport

Transport Type string (e.g. 'tcp').

traddr

Subsystem Transport Address.

trsvcid

Subsystem Transport Service Identifier.

subsys_port_id

The Subsystem Port ID.

nsid

The Namespace ID of this descriptor or when nid should be used instead.

nid_type

Namespace Identifier Type, see enum nbft_info_nid_type.

nid

The Namespace Identifier value.

subsys_nqn

Subsystem and Namespace NQN.

pdu_header_digest_required

PDU Header Digest (HDGST) Flag: the use of NVM Header Digest Enabled is required.

data_digest_required

Data Digest (DDGST) Flag: the use of NVM Data Digest Enabled is required.

controller_id

Controller ID (SSNS Extended Information Descriptor): The controller ID associated with the Admin Queue or 0 if not supported.

asqsz

Admin Submission Queue Size (SSNS Extended Information Descriptor) or 0 if not supported.

dhcp_root_path_string

DHCP Root Path Override string (SSNS Extended Information Descriptor).

discovered

Indicates that this namespace was acquired through discovery.

unavailable

Namespace is unavailable as indicated by the pre-OS driver.


title: nbft_security(2)

summary: Security Profile Descriptor (Figure 21)

text:
# nbft_security(2)

## NAME
struct nbft_security - Security Profile Descriptor (Figure 21)

## SYNOPSIS
struct nbft_security {

__u8 structure_id;

__u8 index;

__le16 flags;

__u8 secret_type;

__u8 reserved1;

struct nbft_heap_obj sec_chan_alg_obj;

struct nbft_heap_obj auth_proto_obj;

struct nbft_heap_obj cipher_suite_obj;

struct nbft_heap_obj dh_grp_obj;

struct nbft_heap_obj sec_hash_func_obj;

struct nbft_heap_obj sec_keypath_obj;

__u8 reserved2[22];

};

## Members
structure_id

Structure ID: This field shall be set to 5h (i.e., Security; #NBFT_DESC_SECURITY).

index

Security Profile Descriptor Index: This field indicates the number of this Security Profile Descriptor in the Security Profile Descriptor List.

flags

Security Profile Descriptor Flags, see enum nbft_security_flags.

secret_type

Secret Type, see enum nbft_security_secret_type.

reserved1

Reserved.

sec_chan_alg_obj

Secure Channel Algorithm Heap Object Reference: If the Security Policy List field is set to 1h, then this field indicates the location and size of a heap object containing a list of secure channel algorithms. The list is an array of bytes and the values are defined in the Security Type (SECTYPE) field in the Transport Specific Address Subtype Definition in the NVMe TCP Transport Specification. If the Security Policy List field is cleared to 0h, then this field is reserved.

auth_proto_obj

Authentication Protocols Heap Object Reference: If the Authentication Policy List field is set to 1h, then this field indicates the location and size of a heap object containing a list of authentication protocol identifiers. If the Authentication Policy List field is cleared to 0h, then this field is reserved.

cipher_suite_obj

Cipher Suite Offset Heap Object Reference: If the Cipher Suites Restricted by Policy bit is set to 1h, then this field indicates the location and size of a heap object containing a list of cipher suite identifiers. The list, if any, is an array of bytes and the values are defined in the IANA TLS Parameters Registry. If the Cipher Suites Restricted by Policy bit is cleared to 0h, then this field is reserved.

dh_grp_obj

DH Groups Heap Object Reference: If the Authentication DH Groups Restricted by Policy List bit is set to 1h, then this field indicates the location and size of a heap object containing a list of DH-HMAC-CHAP Diffie-Hellman (DH) group identifiers. If the Authentication DH Groups Restricted by Policy List bit is cleared to 0h, then this field is reserved.

sec_hash_func_obj

Secure Hash Functions Offset Heap Object Reference: If the Secure Hash Functions Policy List bit is set to 1h, then this field indicates the offset in bytes of a heap object containing a list of DH-HMAC-CHAP hash function identifiers. The list is an array of bytes and the values are defined in the NVM Express Base Specification. If the Secure Hash Functions Policy List bit is cleared to 0h, then this field is reserved.

sec_keypath_obj

Secret Keypath Offset Heap Object Reference: if this field is set to a non-zero value, then this field indicates the location and size of a heap object containing a URI. The type of the URI is specified in the Secret Type field. If this field is cleared to 0h, then this field is reserved.

reserved2

Reserved.


title: nbft_security_flags(2)

text:
# nbft_security_flags(2)

## NAME
enum nbft_security_flags - Security Profile Descriptor Flags (Figure 22)

## SYNOPSIS
enum nbft_security_flags {

NBFT_SECURITY_VALID ,

NBFT_SECURITY_IN_BAND_AUTH_MASK ,

NBFT_SECURITY_IN_BAND_AUTH_NOT_SUPPORTED ,

NBFT_SECURITY_IN_BAND_AUTH_NOT_REQUIRED ,

NBFT_SECURITY_IN_BAND_AUTH_REQUIRED ,

NBFT_SECURITY_AUTH_POLICY_LIST_MASK ,

NBFT_SECURITY_AUTH_POLICY_LIST_NOT_SUPPORTED ,

NBFT_SECURITY_AUTH_POLICY_LIST_DRIVER ,

NBFT_SECURITY_AUTH_POLICY_LIST_ADMIN ,

NBFT_SECURITY_SEC_CHAN_NEG_MASK ,

NBFT_SECURITY_SEC_CHAN_NEG_NOT_SUPPORTED ,

NBFT_SECURITY_SEC_CHAN_NEG_NOT_REQUIRED ,

NBFT_SECURITY_SEC_CHAN_NEG_REQUIRED ,

NBFT_SECURITY_SEC_POLICY_LIST_MASK ,

NBFT_SECURITY_SEC_POLICY_LIST_NOT_SUPPORTED ,

NBFT_SECURITY_SEC_POLICY_LIST_DRIVER ,

NBFT_SECURITY_SEC_POLICY_LIST_ADMIN ,

NBFT_SECURITY_CIPHER_RESTRICTED ,

NBFT_SECURITY_AUTH_DH_GROUPS_RESTRICTED ,

NBFT_SECURITY_SEC_HASH_FUNC_POLICY_LIST

};

## Constants
NBFT_SECURITY_VALID

Descriptor Valid: If set to 1h, then this descriptor is valid. If cleared to 0h, then this descriptor is not valid.

NBFT_SECURITY_IN_BAND_AUTH_MASK

Mask to get the In-Band Authentication Required field.

NBFT_SECURITY_IN_BAND_AUTH_NOT_SUPPORTED

In-band authentication is not supported by the NVM subsystem.

NBFT_SECURITY_IN_BAND_AUTH_NOT_REQUIRED

In-band authentication is supported by the NVM subsystem and is not required.

NBFT_SECURITY_IN_BAND_AUTH_REQUIRED

In-band authentication is supported by the NVM subsystem and is required.

NBFT_SECURITY_AUTH_POLICY_LIST_MASK

Mask to get the Authentication Policy List flag: This field indicates whether authentication protocols were indicated by policy from driver defaults or administrative configuration.

NBFT_SECURITY_AUTH_POLICY_LIST_NOT_SUPPORTED

Authentication Protocols Heap Object Reference field Offset and Length are reserved.

NBFT_SECURITY_AUTH_POLICY_LIST_DRIVER

Authentication Protocols Offset field and the Authentication Protocols Length field indicate a list of authentication protocols used by the driver.

NBFT_SECURITY_AUTH_POLICY_LIST_ADMIN

Authentication Protocols Offset field and the Authentication Protocols Length field indicate a list of authentication protocols that were administratively set and used by the driver.

NBFT_SECURITY_SEC_CHAN_NEG_MASK

Mask to get the Secure Channel Negotiation Required flag: This field indicates whether secure channel negotiation (e.g. TLS) is required.

NBFT_SECURITY_SEC_CHAN_NEG_NOT_SUPPORTED

Secure channel negotiation is not supported by the NVM subsystem.

NBFT_SECURITY_SEC_CHAN_NEG_NOT_REQUIRED

Secure channel negotiation is supported by the NVM subsystem and is not required.

NBFT_SECURITY_SEC_CHAN_NEG_REQUIRED

Secure channel negotiation is supported by the NVM subsystem and is required.

NBFT_SECURITY_SEC_POLICY_LIST_MASK

Mask to get the Security Policy List flag: This field indicates whether secure channel protocols were indicated by policy from driver defaults or administrative configuration.

NBFT_SECURITY_SEC_POLICY_LIST_NOT_SUPPORTED

The Offset field and Length field in the Secure Channel Algorithm Heap Object Reference field are reserved.

NBFT_SECURITY_SEC_POLICY_LIST_DRIVER

The Heap Object specified by the Secure Channel Algorithm Heap Object Reference field indicates a list of authentication protocols used by the driver.

NBFT_SECURITY_SEC_POLICY_LIST_ADMIN

The Heap Object specified by the Secure Channel Algorithm Heap Object Reference field indicates a list of authentication protocols that were administratively set and used by the driver.

NBFT_SECURITY_CIPHER_RESTRICTED

Cipher Suites Restricted by Policy: If set to 1h, then the Cipher Suite Offset field and the Ciper Suite Length field indicate a list of supported cipher suites by the driver. If cleared to 0h, then the Cipher Suite Offset field and the Cipher Suite Length field are reserved.

NBFT_SECURITY_AUTH_DH_GROUPS_RESTRICTED

Authentication DH Groups Restricted by Policy List: If set to 1h, then connections shall use one of the authentication DH groups in the Authentication DH Groups List is required. If cleared to 0h, then no Authentication DH Groups List is indicated and use of an authentication DH Group is not required.

NBFT_SECURITY_SEC_HASH_FUNC_POLICY_LIST

Secure Hash Functions Policy List: If set to 1h, then connections shall use one of the secure hash functions in the Secure Hash Functions Policy List is required. If cleared to 0h, then no Secure Hash Functions Policy List is indicated and use of a secure hash function is not required.


title: nbft_security_secret_type(2)

summary: Security Profile Descriptor Secret Type

text:
# nbft_security_secret_type(2)

## NAME
enum nbft_security_secret_type - Security Profile Descriptor Secret Type

## SYNOPSIS
enum nbft_security_secret_type {

NBFT_SECURITY_SECRET_REDFISH_HOST_IFACE_URI

};

## Constants
NBFT_SECURITY_SECRET_REDFISH_HOST_IFACE_URI

Redfish Host Interface URI: If set to 1h, then the Secret Keypath Object Reference is a URI pointing to a Redfish Key Collection Object that contains the PSK.


title: nbft_ssns(2)

text:
# nbft_ssns(2)

## NAME
struct nbft_ssns - Subsystem Namespace (SSNS) Descriptor (Figure 15)

## SYNOPSIS
struct nbft_ssns {

__u8 structure_id;

__le16 index;

__le16 flags;

__u8 trtype;

__le16 trflags;

__u8 primary_discovery_ctrl_index;

__u8 reserved1;

struct nbft_heap_obj subsys_traddr_obj;

struct nbft_heap_obj subsys_trsvcid_obj;

__le16 subsys_port_id;

__le32 nsid;

__u8 nidt;

__u8 nid[16];

__u8 security_desc_index;

__u8 primary_hfi_desc_index;

__u8 reserved2;

struct nbft_heap_obj secondary_hfi_assoc_obj;

struct nbft_heap_obj subsys_ns_nqn_obj;

struct nbft_heap_obj ssns_extended_info_desc_obj;

__u8 reserved3[62];

};

## Members
structure_id

Structure ID: This field shall be set to 4h (i.e., SSNS; #NBFT_DESC_SSNS).

index

SSNS Descriptor Index: This field indicates the number of this Subsystem Namespace Descriptor in the Subsystem Namespace Descriptor List.

flags

SSNS Flags, see enum nbft_ssns_flags.

trtype

Transport Type, see enum nbft_trtype.

trflags

Transport Specific Flags, see enum nbft_ssns_trflags.

primary_discovery_ctrl_index

Primary Discovery Controller Index: The Discovery Descriptor Index field of the Discovery Descriptor (see struct nbft_discovery) that is associated with this SSNS Descriptor. If a Discovery controller was used to establish this record this value shall be set to a non-zero value. If this namespace was associated with multiple Discovery controllers, those Discovery controllers shall have records in the Discovery Descriptor to facilitate multi-path rediscovery as required. If no Discovery controller was utilized to inform this namespace record, this field shall be cleared to 0h.

reserved1

Reserved.

subsys_traddr_obj

Subsystem Transport Address Heap Object Reference: This field indicates the location and size of a heap object containing the Subsystem Transport Address. For IP based transports types, shall be an IP Address.

subsys_trsvcid_obj

Subsystem Transport Service Identifier Heap Object Reference: This field indicates the location and size of a heap object containing an array of bytes indicating the Subsystem Transport Service Identifier. See enum nbft_trtype.

subsys_port_id

Subsystem Port ID: Port in the NVM subsystem associated with this transport address used by the pre-OS driver.

nsid

Namespace ID: This field indicates the namespace identifier (NSID) of the namespace indicated by this descriptor. This field shall be cleared to 0h if not specified by the user. If this value is cleared to 0h, then consumers of the NBFT shall rely on the NID.

nidt

Namespace Identifier Type (NIDT): This field contains the value of the Namespace Identifier Type (NIDT) field in the Namespace Identification Descriptor for the namespace indicated by this descriptor. If a namespace supports multiple NIDT entries for uniqueness, the order of preference is NIDT field value of 3h (i.e., UUID) before 2h (i.e., NSGUID), and 2h before 1h (i.e., EUI-64).

nid

Namespace Identifier (NID): This field contains the value of the Namespace Identifier (NID) field in the Namespace Identification Descriptor for the namespace indicated by this descriptor.

security_desc_index

Security Profile Descriptor Index: If the Use Security Flag bit in the SSNS Flags field is set to 1h, then this field indicates the value of the Security Profile Descriptor Index field of the Security Profile Descriptor (see struct nbft_security) associated with this namespace. If the Use Security Flag bit is cleared to 0h, then no Security Profile Descriptor is associated with this namespace and this field is reserved.

primary_hfi_desc_index

Primary HFI Descriptor Index: This field indicates the value of the HFI Descriptor Index field of the HFI Descriptor (see struct nbft_hfi) for the interface associated with this namespace. If multiple HFIs are associated with this record, subsequent interfaces should be populated in the Secondary HFI Associations field.

reserved2

Reserved.

secondary_hfi_assoc_obj

Secondary HFI Associations Heap Object Reference: If this field is set to a non-zero value, then this field indicates an array of bytes, in which each byte contains the value of the HFI Descriptor Index field of an HFI Descriptor in the HFI Descriptor List. If this field is cleared to 0h, then no secondary HFI associations are specified.

subsys_ns_nqn_obj

Subsystem and Namespace NQN Heap Object Reference: This field indicates the location and size of a heap object containing the Subsystem and Namespace NQN.

ssns_extended_info_desc_obj

SSNS Extended Information Descriptor Heap Object Reference: If the SSNS Extended Info In-use Flag bit is set to 1h, then this field indicates the offset in bytes of a heap object containing an SSNS Extended Information Descriptor (see struct nbft_ssns_ext_info) heap object from byte offset 0h of the NBFT Table Header. If the SSNS Extended Info In-use Flag bit is cleared to 0h, then this field is reserved.

reserved3

Reserved.


title: nbft_ssns_ext_info(2)

text:
# nbft_ssns_ext_info(2)

## NAME
struct nbft_ssns_ext_info - Subsystem and Namespace Extended Information Descriptor (Figure 19)

## SYNOPSIS
struct nbft_ssns_ext_info {

__u8 structure_id;

__u8 version;

__le16 ssns_index;

__le32 flags;

__le16 cntlid;

__le16 asqsz;

struct nbft_heap_obj dhcp_root_path_str_obj;

};

## Members
structure_id

Structure ID: This field shall be set to 9h (i.e., SSNS Extended Info; #NBFT_DESC_SSNS_EXT_INFO).

version

Version: This field shall be set to 1h.

ssns_index

SSNS Descriptor Index: This field indicates the value of the SSNS Descriptor Index field of the Subsystem and Namespace Descriptor (see struct nbft_ssns) whose SSNS Extended Information Descriptor Heap Object Reference field indicates this descriptor.

flags

Flags, see enum nbft_ssns_ext_info_flags.

cntlid

Controller ID: The controller identifier of the first controller associated with the Admin Queue by the driver. If a controller identifier is not administratively specified or direct configuration is not supported by the driver, then this field shall be cleared to 0h.

asqsz

Admin Submission Queue Size (ASQSZ): The Admin Submission Queue Size utilized for the respective SSNS by the driver.

dhcp_root_path_str_obj

DHCP Root Path String Heap Object Reference: If the SSNS DHCP Root Path Override (#NBFT_SSNS_DHCP_ROOT_PATH_OVERRIDE) flag bit is set to 1h, then this field indicates the offset in bytes of a heap object containing an DHCP Root Path String used by the driver. If the SNSS DHCP Root Path Override flag bit is cleared to 0h, then this field is reserved.


title: nbft_ssns_ext_info_flags(2)

text:
# nbft_ssns_ext_info_flags(2)

## NAME
enum nbft_ssns_ext_info_flags - Subsystem and Namespace Extended Information Descriptor Flags

## SYNOPSIS
enum nbft_ssns_ext_info_flags {

NBFT_SSNS_EXT_INFO_VALID ,

NBFT_SSNS_EXT_INFO_ADMIN_ASQSZ

};

## Constants
NBFT_SSNS_EXT_INFO_VALID

Descriptor Valid: If set to 1h, then this descriptor is valid. If cleared to 0h, then this descriptor is reserved.

NBFT_SSNS_EXT_INFO_ADMIN_ASQSZ

Administrative ASQSZ: If set to 1h, then the value of the ASQSZ field was provided by administrative configuration for this SSNS record. If cleared to 0h, then the value of the ASQSZ field was either obtained by discovery or assumed by the driver.


title: nbft_ssns_flags(2)

text:
# nbft_ssns_flags(2)

## NAME
enum nbft_ssns_flags - Subsystem and Namespace Specific Flags Field (Figure 16)

## SYNOPSIS
enum nbft_ssns_flags {

NBFT_SSNS_VALID ,

NBFT_SSNS_NON_BOOTABLE_ENTRY ,

NBFT_SSNS_USE_SECURITY_FIELD ,

NBFT_SSNS_DHCP_ROOT_PATH_OVERRIDE ,

NBFT_SSNS_EXTENDED_INFO_IN_USE ,

NBFT_SSNS_SEPARATE_DISCOVERY_CTRL ,

NBFT_SSNS_DISCOVERED_NAMESPACE ,

NBFT_SSNS_UNAVAIL_NAMESPACE_MASK ,

NBFT_SSNS_UNAVAIL_NAMESPACE_NOTIND ,

NBFT_SSNS_UNAVAIL_NAMESPACE_AVAIL ,

NBFT_SSNS_UNAVAIL_NAMESPACE_UNAVAIL

};

## Constants
NBFT_SSNS_VALID

Descriptor Valid: If set to 1h, then this descriptor is valid. If cleared to 0h, then this descriptor is not valid. A host that supports NVMe-oF Boot, but does not currently have a remote Subsystem and Namespace assigned may clear this bit to 0h.

NBFT_SSNS_NON_BOOTABLE_ENTRY

Non-bootable Entry Flag: If set to 1h, this flag indicates that this SSNS Descriptor contains a namespace of administrative purpose to the boot process, but the pre-OS may not have established connectivity to or evaluated the contents of this Descriptor. Such namespaces may contain supplemental data deemed relevant by the Administrator as part of the pre-OS to OS hand off. This may include properties such as a UEFI device path that may not have been created for this namespace. This means an OS runtime may still require the contents of such a namespace to complete later stages of boot. If cleared to 0h, then this namespace did not have any special administrative intent.

NBFT_SSNS_USE_SECURITY_FIELD

Use Security Flag: If set to 1h, then there is a Security Profile Descriptor associated with this SSNS record and the Security Profile Descriptor Index field is valid. If cleared to 0h, then there is no Security Profile Descriptor associated with this SSNS record and the Security Profile Descriptor Index field is not valid.

NBFT_SSNS_DHCP_ROOT_PATH_OVERRIDE

DHCP Root-Path Override Flag: If set to 1h, then this SSNS descriptor was populated by consuming the DHCP Root-Path on this interface. If cleared to 0h, then the DHCP Root-Path was not used in populating the SSNS descriptor.

NBFT_SSNS_EXTENDED_INFO_IN_USE

SSNS Extended Info In-use Flag: If set to 1h, then the SSNS Extended Information Offset field and the SSNS Extended Information Length field are valid. This flag, if set to 1h, indicates that a Subsystem and Namespace Extended Information Descriptor corresponding to this descriptor is present.

NBFT_SSNS_SEPARATE_DISCOVERY_CTRL

Separate Discovery Controller Flag: If set to 1h, then the Discovery controller associated with this volume is on a different transport address than the specified in the Subsystem Transport Address Heap Object Reference. If cleared to 0h, then the Discovery controller is the same as the Subsystem Transport Address Heap Object Reference.

NBFT_SSNS_DISCOVERED_NAMESPACE

Discovered Namespace Flag: If set to 1h, then this namespace was acquired through discovery. If cleared to 0h, then this namespace was explicitly configured in the system.

NBFT_SSNS_UNAVAIL_NAMESPACE_MASK

Mask to get Unavailable Namespace Flag: This field indicates the availability of the namespace at a specific point in time. Such use is only a hint and its use does not guarantee the availability of that referenced namespace at any future point in time.

NBFT_SSNS_UNAVAIL_NAMESPACE_NOTIND

Not Indicated by Driver: No information is provided.

NBFT_SSNS_UNAVAIL_NAMESPACE_AVAIL

Available: A referenced namespace described by this flag was previously accessible by the pre-OS driver.

NBFT_SSNS_UNAVAIL_NAMESPACE_UNAVAIL

Unavailable: This namespace was administratively configured but unattempted, unavailable or inaccessible when establishing connectivity by the pre-OS driver.


title: nbft_ssns_trflags(2)

text:
# nbft_ssns_trflags(2)

## NAME
enum nbft_ssns_trflags - SSNS Transport Specific Flags Field (Figure 17)

## SYNOPSIS
enum nbft_ssns_trflags {

NBFT_SSNS_TRFLAG_VALID ,

NBFT_SSNS_PDU_HEADER_DIGEST ,

NBFT_SSNS_DATA_DIGEST

};

## Constants
NBFT_SSNS_TRFLAG_VALID

Transport Specific Flags in Use: If set to 1h, then this descriptor is valid. If cleared to 0h, then this descriptor is not valid.

NBFT_SSNS_PDU_HEADER_DIGEST

PDU Header Digest (HDGST) Flag: If set to 1h, then the host or administrator required the connection described by this Subsystem and Namespace Descriptor to use the NVM Header Digest Enabled. A consumer of this information should attempt to use NVM Header Digest when recreating this connection if enabled. If cleared to 0h, then the host or administrator did not require the connection described by this Subsystem and Namespace Descriptor to use the NVM Header Digest Enabled.

NBFT_SSNS_DATA_DIGEST

Data Digest (DDGST) Flag: If set to 1h, then the host or administrator required the connection described by this Subsystem and Namespace Descriptor to use the NVM Data Digest Enabled. If cleared to 0h, then the host or administrator did not require the connection described by this Subsystem and Namespace Descriptor to use the NVM Data Digest Enabled. A consumer of this field should attempt to use NVM Data Digest when recreating this connection if enabled.


title: nbft_trtype(2)

text:
# nbft_trtype(2)

## NAME
enum nbft_trtype - NBFT Interface Transport Types (Figure 7)

## SYNOPSIS
enum nbft_trtype {

NBFT_TRTYPE_TCP

};

## Constants
NBFT_TRTYPE_TCP

NVMe/TCP (802.3 + TCP/IP). String Designator "tcp".


title: nvme_acq(2)

text:
# nvme_acq(2)

## NAME
enum nvme_acq - This field indicates the admin completion queue base address

## SYNOPSIS
enum nvme_acq {

NVME_ACQ_ACQB_SHIFT

};

## Constants
NVME_ACQ_ACQB_SHIFT

Shift amount to get the admin completion queue base


title: nvme_admin_opcode(2)

summary: Known NVMe admin opcodes

text:
# nvme_admin_opcode(2)

## NAME
enum nvme_admin_opcode - Known NVMe admin opcodes

## SYNOPSIS
enum nvme_admin_opcode {

nvme_admin_delete_sq ,

nvme_admin_create_sq ,

nvme_admin_get_log_page ,

nvme_admin_delete_cq ,

nvme_admin_create_cq ,

nvme_admin_identify ,

nvme_admin_abort_cmd ,

nvme_admin_set_features ,

nvme_admin_get_features ,

nvme_admin_async_event ,

nvme_admin_ns_mgmt ,

nvme_admin_fw_commit ,

nvme_admin_fw_activate ,

nvme_admin_fw_download ,

nvme_admin_dev_self_test ,

nvme_admin_ns_attach ,

nvme_admin_keep_alive ,

nvme_admin_directive_send ,

nvme_admin_directive_recv ,

nvme_admin_virtual_mgmt ,

nvme_admin_nvme_mi_send ,

nvme_admin_nvme_mi_recv ,

nvme_admin_capacity_mgmt ,

nvme_admin_discovery_info_mgmt ,

nvme_admin_fabric_zoning_recv ,

nvme_admin_lockdown ,

nvme_admin_fabric_zoning_lookup ,

nvme_admin_clear_export_nvm_res ,

nvme_admin_fabric_zoning_send ,

nvme_admin_create_export_nvms ,

nvme_admin_manage_export_nvms ,

nvme_admin_manage_export_ns ,

nvme_admin_manage_export_port ,

nvme_admin_send_disc_log_page ,

nvme_admin_track_send ,

nvme_admin_track_receive ,

nvme_admin_migration_send ,

nvme_admin_migration_receive ,

nvme_admin_ctrl_data_queue ,

nvme_admin_dbbuf ,

nvme_admin_fabrics ,

nvme_admin_format_nvm ,

nvme_admin_security_send ,

nvme_admin_security_recv ,

nvme_admin_sanitize_nvm ,

nvme_admin_load_program ,

nvme_admin_get_lba_status ,

nvme_admin_program_act_mgmt ,

nvme_admin_mem_range_set_mgmt

};

## Constants
nvme_admin_delete_sq

Delete I/O Submission Queue

nvme_admin_create_sq

Create I/O Submission Queue

nvme_admin_get_log_page

Get Log Page

nvme_admin_delete_cq

Delete I/O Completion Queue

nvme_admin_create_cq

Create I/O Completion Queue

nvme_admin_identify

Identify

nvme_admin_abort_cmd

Abort

nvme_admin_set_features

Set Features

nvme_admin_get_features

Get Features

nvme_admin_async_event

Asynchronous Event Request

nvme_admin_ns_mgmt

Namespace Management

nvme_admin_fw_commit

Firmware Commit

nvme_admin_fw_activate

Firmware Commit

nvme_admin_fw_download

Firmware Image Download

nvme_admin_dev_self_test

Device Self-test

nvme_admin_ns_attach

Namespace Attachment

nvme_admin_keep_alive

Keep Alive

nvme_admin_directive_send

Directive Send

nvme_admin_directive_recv

Directive Receive

nvme_admin_virtual_mgmt

Virtualization Management

nvme_admin_nvme_mi_send

NVMe-MI Send

nvme_admin_nvme_mi_recv

NVMe-MI Receive

nvme_admin_capacity_mgmt

Capacity Management

nvme_admin_discovery_info_mgmt

Discovery Information Management (DIM)

nvme_admin_fabric_zoning_recv

Fabric Zoning Receive

nvme_admin_lockdown

Lockdown

nvme_admin_fabric_zoning_lookup

Fabric Zoning Lookup

nvme_admin_clear_export_nvm_res

Clear Exported NVM Resource Configuration

nvme_admin_fabric_zoning_send

Fabric Zoning Send

nvme_admin_create_export_nvms

Create Exported NVM Subsystem

nvme_admin_manage_export_nvms

Manage Exported NVM Subsystem

nvme_admin_manage_export_ns

Manage Exported Namespace

nvme_admin_manage_export_port

Manage Exported Port

nvme_admin_send_disc_log_page

Send Discovery Log Page

nvme_admin_track_send

Track Send

nvme_admin_track_receive

Track Receive

nvme_admin_migration_send

Migration Send

nvme_admin_migration_receive

Migration Receive

nvme_admin_ctrl_data_queue

Controller Data Queue

nvme_admin_dbbuf

Doorbell Buffer Config

nvme_admin_fabrics

Fabrics Commands

nvme_admin_format_nvm

Format NVM

nvme_admin_security_send

Security Send

nvme_admin_security_recv

Security Receive

nvme_admin_sanitize_nvm

Sanitize

nvme_admin_load_program

Load Program

nvme_admin_get_lba_status

Get LBA Status

nvme_admin_program_act_mgmt

Program Activation Management

nvme_admin_mem_range_set_mgmt

Memory Range Set Management


title: nvme_admin_passthru(2)

summary: Submit an nvme passthrough command

text:
# nvme_admin_passthru(2)

## NAME
nvme_admin_passthru - Submit an nvme passthrough command

## SYNOPSIS
int nvme_admin_passthru (int fd , __u8 opcode , __u8 flags , __u16 rsvd , __u32 nsid , __u32 cdw2 , __u32 cdw3 , __u32 cdw10 , __u32 cdw11 , __u32 cdw12 , __u32 cdw13 , __u32 cdw14 , __u32 cdw15 , __u32 data_len , void *data , __u32 metadata_len , void *metadata , __u32 timeout_ms , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

opcode

The nvme io command to send

flags

NVMe command flags (not used)

rsvd

Reserved for future use

nsid

Namespace identifier

cdw2

Command dword 2

cdw3

Command dword 3

cdw10

Command dword 10

cdw11

Command dword 11

cdw12

Command dword 12

cdw13

Command dword 13

cdw14

Command dword 14

cdw15

Command dword 15

data_len

Length of the data transferred in this command in bytes

data

Pointer to user address of the data buffer

metadata_len

Length of metadata transferred in this command

metadata

Pointer to user address of the metadata buffer

timeout_ms

How long the kernel waits for the command to complete

result

Optional field to return the result from the CQE dword 0

## DESCRIPTION
Parameterized form of nvme_submit_admin_passthru. This sets up and submits a struct nvme_passthru_cmd.

Known values for opcode are defined in enum nvme_admin_opcode.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_admin_passthru64(2)

text:
# nvme_admin_passthru64(2)

## NAME
nvme_admin_passthru64 - Submit a 64-bit nvme passthrough command

## SYNOPSIS
int nvme_admin_passthru64 (int fd , __u8 opcode , __u8 flags , __u16 rsvd , __u32 nsid , __u32 cdw2 , __u32 cdw3 , __u32 cdw10 , __u32 cdw11 , __u32 cdw12 , __u32 cdw13 , __u32 cdw14 , __u32 cdw15 , __u32 data_len , void *data , __u32 metadata_len , void *metadata , __u32 timeout_ms , __u64 *result );

## ARGUMENTS
fd

File descriptor of nvme device

opcode

The nvme io command to send

flags

NVMe command flags (not used)

rsvd

Reserved for future use

nsid

Namespace identifier

cdw2

Command dword 2

cdw3

Command dword 3

cdw10

Command dword 10

cdw11

Command dword 11

cdw12

Command dword 12

cdw13

Command dword 13

cdw14

Command dword 14

cdw15

Command dword 15

data_len

Length of the data transferred in this command in bytes

data

Pointer to user address of the data buffer

metadata_len

Length of metadata transferred in this command

metadata

Pointer to user address of the metadata buffer

timeout_ms

How long the kernel waits for the command to complete

result

Optional field to return the result from the CQE dword 0

## DESCRIPTION
Parameterized form of nvme_submit_admin_passthru64. This sets up and submits a struct nvme_passthru_cmd64.

Known values for opcode are defined in enum nvme_admin_opcode.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_ae_info_css_nvm(2)

text:
# nvme_ae_info_css_nvm(2)

## NAME
enum nvme_ae_info_css_nvm - Asynchronous Event Information - I/O Command Specific Status

## SYNOPSIS
enum nvme_ae_info_css_nvm {

NVME_AER_CSS_NVM_RESERVATION ,

NVME_AER_CSS_NVM_SANITIZE_COMPLETED ,

NVME_AER_CSS_NVM_UNEXPECTED_SANITIZE_DEALLOC

};

## Constants
NVME_AER_CSS_NVM_RESERVATION

Reservation Log Page Available

NVME_AER_CSS_NVM_SANITIZE_COMPLETED

Sanitize Operation Completed

NVME_AER_CSS_NVM_UNEXPECTED_SANITIZE_DEALLOC

Sanitize Operation Completed With Unexpected Deallocation


title: nvme_ae_info_error(2)

text:
# nvme_ae_info_error(2)

## NAME
enum nvme_ae_info_error - Asynchronous Event Information - Error Status

## SYNOPSIS
enum nvme_ae_info_error {

NVME_AER_ERROR_INVALID_DB_REG ,

NVME_AER_ERROR_INVALID_DB_VAL ,

NVME_AER_ERROR_DIAG_FAILURE ,

NVME_AER_ERROR_PERSISTENT_INTERNAL_ERROR ,

NVME_AER_ERROR_TRANSIENT_INTERNAL_ERROR ,

NVME_AER_ERROR_FW_IMAGE_LOAD_ERROR

};

## Constants
NVME_AER_ERROR_INVALID_DB_REG

Write to Invalid Doorbell Register

NVME_AER_ERROR_INVALID_DB_VAL

Invalid Doorbell Write Value

NVME_AER_ERROR_DIAG_FAILURE

Diagnostic Failure

NVME_AER_ERROR_PERSISTENT_INTERNAL_ERROR

Persistent Internal Error

NVME_AER_ERROR_TRANSIENT_INTERNAL_ERROR

Transient Internal Error

NVME_AER_ERROR_FW_IMAGE_LOAD_ERROR

Firmware Image Load Error


title: nvme_ae_info_notice(2)

summary: Asynchronous Event Information - Notice

text:
# nvme_ae_info_notice(2)

## NAME
enum nvme_ae_info_notice - Asynchronous Event Information - Notice

## SYNOPSIS
enum nvme_ae_info_notice {

NVME_AER_NOTICE_NS_CHANGED ,

NVME_AER_NOTICE_FW_ACT_STARTING ,

NVME_AER_NOTICE_TELEMETRY ,

NVME_AER_NOTICE_ANA ,

NVME_AER_NOTICE_PL_EVENT ,

NVME_AER_NOTICE_LBA_STATUS_ALERT ,

NVME_AER_NOTICE_EG_EVENT ,

NVME_AER_NOTICE_DISC_CHANGED

};

## Constants
NVME_AER_NOTICE_NS_CHANGED

Namespace Attribute Changed

NVME_AER_NOTICE_FW_ACT_STARTING

Firmware Activation Starting

NVME_AER_NOTICE_TELEMETRY

Telemetry Log Changed

NVME_AER_NOTICE_ANA

Asymmetric Namespace Access Change

NVME_AER_NOTICE_PL_EVENT

Predictable Latency Event Aggregate Log Change

NVME_AER_NOTICE_LBA_STATUS_ALERT

LBA Status Information Alert

NVME_AER_NOTICE_EG_EVENT

Endurance Group Event Aggregate Log Page Change

NVME_AER_NOTICE_DISC_CHANGED

Discovery Log Page Change


title: nvme_ae_info_smart(2)

text:
# nvme_ae_info_smart(2)

## NAME
enum nvme_ae_info_smart - Asynchronous Event Information - SMART / Health Status

## SYNOPSIS
enum nvme_ae_info_smart {

NVME_AER_SMART_SUBSYSTEM_RELIABILITY ,

NVME_AER_SMART_TEMPERATURE_THRESHOLD ,

NVME_AER_SMART_SPARE_THRESHOLD

};

## Constants
NVME_AER_SMART_SUBSYSTEM_RELIABILITY

NVM subsystem Reliability

NVME_AER_SMART_TEMPERATURE_THRESHOLD

Temperature Threshold

NVME_AER_SMART_SPARE_THRESHOLD

Spare Below Threshold


title: nvme_ae_type(2)

summary: Asynchronous Event Type

text:
# nvme_ae_type(2)

## NAME
enum nvme_ae_type - Asynchronous Event Type

## SYNOPSIS
enum nvme_ae_type {

NVME_AER_ERROR ,

NVME_AER_SMART ,

NVME_AER_NOTICE ,

NVME_AER_IMMEDIATE ,

NVME_AER_ONESHOT ,

NVME_AER_CSS ,

NVME_AER_VS

};

## Constants
NVME_AER_ERROR

Error event

NVME_AER_SMART

SMART / Health Status event

NVME_AER_NOTICE

Notice event

NVME_AER_IMMEDIATE

Immediate

NVME_AER_ONESHOT

One-Shot

NVME_AER_CSS

NVM Command Set Specific events

NVME_AER_VS

Vendor Specific event


title: nvme_aggregate_endurance_group_event(2)

summary: Endurance Group Event Aggregate

text:
# nvme_aggregate_endurance_group_event(2)

## NAME
struct nvme_aggregate_endurance_group_event - Endurance Group Event Aggregate

## SYNOPSIS
struct nvme_aggregate_endurance_group_event {

__le64 num_entries;

__le16 entries[];

};

## Members
num_entries

Number or entries

entries

List of entries


title: nvme_aggregate_predictable_lat_event(2)

text:
# nvme_aggregate_predictable_lat_event(2)

## NAME
struct nvme_aggregate_predictable_lat_event - Predictable Latency Event Aggregate Log Page

## SYNOPSIS
struct nvme_aggregate_predictable_lat_event {

__le64 num_entries;

__le16 entries[];

};

## Members
num_entries

Number of entries

entries

Entry list


title: nvme_ana_group_desc(2)

summary: ANA Group Descriptor

text:
# nvme_ana_group_desc(2)

## NAME
struct nvme_ana_group_desc - ANA Group Descriptor

## SYNOPSIS
struct nvme_ana_group_desc {

__le32 grpid;

__le32 nnsids;

__le64 chgcnt;

__u8 state;

__u8 rsvd17[15];

__le32 nsids[];

};

## Members
grpid

ANA group id

nnsids

Number of namespaces in nsids

chgcnt

Change counter

state

ANA state

rsvd17

Reserved

nsids

List of namespaces


title: nvme_ana_log(2)

summary: Asymmetric Namespace Access Log

text:
# nvme_ana_log(2)

## NAME
struct nvme_ana_log - Asymmetric Namespace Access Log

## SYNOPSIS
struct nvme_ana_log {

__le64 chgcnt;

__le16 ngrps;

__u8 rsvd10[6];

struct nvme_ana_group_desc descs[];

};

## Members
chgcnt

Change Count

ngrps

Number of ANA Group Descriptors

rsvd10

Reserved

descs

ANA Group Descriptor


title: nvme_ana_state(2)

text:
# nvme_ana_state(2)

## NAME
enum nvme_ana_state - ANA Group Descriptor - Asymmetric Namespace Access State

## SYNOPSIS
enum nvme_ana_state {

NVME_ANA_STATE_OPTIMIZED ,

NVME_ANA_STATE_NONOPTIMIZED ,

NVME_ANA_STATE_INACCESSIBLE ,

NVME_ANA_STATE_PERSISTENT_LOSS ,

NVME_ANA_STATE_CHANGE

};

## Constants
NVME_ANA_STATE_OPTIMIZED

ANA Optimized state

NVME_ANA_STATE_NONOPTIMIZED

ANA Non-Optimized state

NVME_ANA_STATE_INACCESSIBLE

ANA Inaccessible state

NVME_ANA_STATE_PERSISTENT_LOSS

ANA Persistent Loss state

NVME_ANA_STATE_CHANGE

ANA Change state


title: nvme_apst_entry(2)

summary: Autonomous Power State Transition

text:
# nvme_apst_entry(2)

## NAME
enum nvme_apst_entry - Autonomous Power State Transition

## SYNOPSIS
enum nvme_apst_entry {

NVME_APST_ENTRY_ITPS_SHIFT ,

NVME_APST_ENTRY_ITPT_SHIFT ,

NVME_APST_ENTRY_ITPS_MASK ,

NVME_APST_ENTRY_ITPT_MASK

};

## Constants
NVME_APST_ENTRY_ITPS_SHIFT

Idle Transition Power State Shift

NVME_APST_ENTRY_ITPT_SHIFT

Idle Time Prior to Transition Shift

NVME_APST_ENTRY_ITPS_MASK

Idle Transition Power State Mask

NVME_APST_ENTRY_ITPT_MASK

Idle Time Prior to Transition Mask


title: nvme_aqa(2)

text:
# nvme_aqa(2)

## NAME
enum nvme_aqa - This field indicates the admin queue attributes

## SYNOPSIS
enum nvme_aqa {

NVME_AQA_ASQS_SHIFT ,

NVME_AQA_ACQS_SHIFT ,

NVME_AQA_ASQS_MASK ,

NVME_AQA_ACQS_MASK

};

## Constants
NVME_AQA_ASQS_SHIFT

Shift amount to get the admin submission queue size

NVME_AQA_ACQS_SHIFT

Shift amount to get the admin completion queue size

NVME_AQA_ASQS_MASK

Mask to get the admin submission queue size

NVME_AQA_ACQS_MASK

Mask to get the admin completion queue size


title: nvme_asq(2)

text:
# nvme_asq(2)

## NAME
enum nvme_asq - This field indicates the admin submission queue base address

## SYNOPSIS
enum nvme_asq {

NVME_ASQ_ASQB_SHIFT

};

## Constants
NVME_ASQ_ASQB_SHIFT

Shift amount to get the admin submission queue base


title: nvme_ave_discover_log(2)

summary: AVE Discovery Log

text:
# nvme_ave_discover_log(2)

## NAME
struct nvme_ave_discover_log - AVE Discovery Log

## SYNOPSIS
struct nvme_ave_discover_log {

__le64 genctr;

__le64 numrec;

__le16 recfmt;

__u8 rsvd18[2];

__le32 tadlpl;

__u8 rsvd24[1000];

struct nvme_ave_discover_log_entry adlpe[];

};

## Members
genctr

Generation Counter

numrec

Number of Records

recfmt

Record Format

rsvd18

Reserved

tadlpl

Total AVE Discovery Log Page Length

rsvd24

Reserved

adlpe

AVE Discovery Log Page Entry List