<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libnvmf, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>libnvmf: Fix a typo in a source code comment</title>
<updated>2025-08-25T08:33:32+00:00</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2025-08-25T08:33:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e041280989eaa887e1dea1e00a51c2d3e0644f9d'/>
<id>e041280989eaa887e1dea1e00a51c2d3e0644f9d</id>
<content type='text'>
- s/tranfers/transfers/

MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- s/tranfers/transfers/

MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove redundant PACKAGE for INTERNALLIB libraries</title>
<updated>2025-08-23T00:57:23+00:00</updated>
<author>
<name>Lexi Winter</name>
<email>ivy@FreeBSD.org</email>
</author>
<published>2025-08-22T23:51:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1a80bcc5fafaa822e281bf963e7c58a8747a610c'/>
<id>1a80bcc5fafaa822e281bf963e7c58a8747a610c</id>
<content type='text'>
These libraries don't install anything, so they shouldn't have a
PACKAGE setting.  This avoids surprising behaviour in future if
e.g. manpages are added to an internal library.

Reported by:	des
Differential Revision:	https://reviews.freebsd.org/D51901
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These libraries don't install anything, so they shouldn't have a
PACKAGE setting.  This avoids surprising behaviour in future if
e.g. manpages are added to an internal library.

Reported by:	des
Differential Revision:	https://reviews.freebsd.org/D51901
</pre>
</div>
</content>
</entry>
<entry>
<title>libnvmf: Fix header to work with C++</title>
<updated>2025-08-06T19:56:05+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-08-06T19:56:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b14d3736c23ea530491667c5eb68070bd12b05ca'/>
<id>b14d3736c23ea530491667c5eb68070bd12b05ca</id>
<content type='text'>
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D51727
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D51727
</pre>
</div>
</content>
</entry>
<entry>
<title>libnvmf: Add nvmf_nqn_valid_strict() function</title>
<updated>2025-07-28T18:33:03+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-07-28T18:33:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9f0f30bc1f5f08d25243952bad3fdc6e13a75c2a'/>
<id>9f0f30bc1f5f08d25243952bad3fdc6e13a75c2a</id>
<content type='text'>
This moves the checks previously under #ifdef STRICT in
nvmf_nqn_valid() into a separate helper for userland.  This
requires that the NQN starts with "nqn.YYYY-MM." followed by at
least one additional character.

Reviewed by:	asomers
Differential Revision:	https://reviews.freebsd.org/D48767
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This moves the checks previously under #ifdef STRICT in
nvmf_nqn_valid() into a separate helper for userland.  This
requires that the NQN starts with "nqn.YYYY-MM." followed by at
least one additional character.

Reviewed by:	asomers
Differential Revision:	https://reviews.freebsd.org/D48767
</pre>
</div>
</content>
</entry>
<entry>
<title>nvmf: Auto-reconnect periodically after a disconnect</title>
<updated>2025-07-09T14:19:45+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-07-09T14:17:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5c59cec2d5e141de54bbc737477a8e498685186a'/>
<id>5c59cec2d5e141de54bbc737477a8e498685186a</id>
<content type='text'>
Use a timer in the nvmf(4) driver to periodically trigger a devctl
"RECONNECT" notification.  A trigger in the /etc/devd/nvmf.conf file
invokes "nvmecontrol reconnect nvmeX" upon each notification.  This
differs from iSCSI which uses a dedicated daemon (iscsid(8)) to wait
inside a custom ioctl for an iSCSI initiator event to occur, but I
think this design might be simpler.

Similar to nvme-cli, the interval between reconnection attempts is
specified in seconds by the --reconnect-delay argument to the connect
and reconnect commands.  Note that nvme-cli uses -c for short letter
of this command, but that was already taken so nvmecontrol uses -r.
The default is 10 seconds to match Linux.

In addition, a second timeout can be used to force a full detach of a
disconnected the nvmeX device after the controller loss timeout
expires.  The timeout for this is specified in seconds by the
--ctrl-loss-tmo/-l options (identical to nvme-cli).  The default is
600 seconds.

Either of these timers can be disabled by setting the timer to 0.  In
that case, the associated action (devctl notifications or full detach)
will not occur after a disconnect.

Note that this adds a dedicated taskqueue for nvmf tasks instead of
using taskqueue_thread as the controller loss task could deadlock
waiting for the completion of other tasks queued to taskqueue_thread.
(Specifically, tearing down the CAM SIM can trigger
destroy_dev_sched_cb() and waits for the callback to run, but the
callback is scheduled to run in a task on taskqueue_thread.  Possibly,
destroy_dev_sched should be using a dedicated taskqueue.)

Reviewed by:	imp (earlier version)
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D50222
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a timer in the nvmf(4) driver to periodically trigger a devctl
"RECONNECT" notification.  A trigger in the /etc/devd/nvmf.conf file
invokes "nvmecontrol reconnect nvmeX" upon each notification.  This
differs from iSCSI which uses a dedicated daemon (iscsid(8)) to wait
inside a custom ioctl for an iSCSI initiator event to occur, but I
think this design might be simpler.

Similar to nvme-cli, the interval between reconnection attempts is
specified in seconds by the --reconnect-delay argument to the connect
and reconnect commands.  Note that nvme-cli uses -c for short letter
of this command, but that was already taken so nvmecontrol uses -r.
The default is 10 seconds to match Linux.

In addition, a second timeout can be used to force a full detach of a
disconnected the nvmeX device after the controller loss timeout
expires.  The timeout for this is specified in seconds by the
--ctrl-loss-tmo/-l options (identical to nvme-cli).  The default is
600 seconds.

Either of these timers can be disabled by setting the timer to 0.  In
that case, the associated action (devctl notifications or full detach)
will not occur after a disconnect.

Note that this adds a dedicated taskqueue for nvmf tasks instead of
using taskqueue_thread as the controller loss task could deadlock
waiting for the completion of other tasks queued to taskqueue_thread.
(Specifically, tearing down the CAM SIM can trigger
destroy_dev_sched_cb() and waits for the callback to run, but the
callback is scheduled to run in a task on taskqueue_thread.  Possibly,
destroy_dev_sched should be using a dedicated taskqueue.)

Reviewed by:	imp (earlier version)
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D50222
</pre>
</div>
</content>
</entry>
<entry>
<title>nvmf: Add NVMF_CONNECTION_STATUS ioctl</title>
<updated>2025-01-31T20:47:58+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-01-31T20:47:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=38e1083940a274783cc9e8ebd845e35df6d0a1ff'/>
<id>38e1083940a274783cc9e8ebd845e35df6d0a1ff</id>
<content type='text'>
This returns an nvlist indicating if a Fabrics host is connected and
the time of the most recent disconnection.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48219
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This returns an nvlist indicating if a Fabrics host is connected and
the time of the most recent disconnection.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48219
</pre>
</div>
</content>
</entry>
<entry>
<title>nvmf: Refactor reconnection support</title>
<updated>2025-01-24T14:43:19+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-01-24T14:43:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8bba2c0f8958443790b1f3abc0675719da987e87'/>
<id>8bba2c0f8958443790b1f3abc0675719da987e87</id>
<content type='text'>
Save more data associated with a new association including the network
address of the remote controller.  This permits reconnecting an
association without providing the address or other details.  To use
this new mode, provide only an existing device ID to nvmecontrol's
reconnect command.  An address can still be provided to request a
different address or other different settings for the new association.

The saved data includes an entire Discovery Log page entry to aim to
be compatible with other transports in the future.  When a remote
controller is connected to via a Discovery Log page entry (nvmecontrol
connect-all), the raw entry is used.  When a remote controller is
connected to via an explicit address, an entry is synthesized from the
parameters.

Note that this is a pseudo-ABI break for the ioctls used by nvmf(4) in
that the nvlists for handoff and reconnect now use a slightly
different set of elements.  Since this is only present in main I did
not bother implementing compatability shims.

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48214
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Save more data associated with a new association including the network
address of the remote controller.  This permits reconnecting an
association without providing the address or other details.  To use
this new mode, provide only an existing device ID to nvmecontrol's
reconnect command.  An address can still be provided to request a
different address or other different settings for the new association.

The saved data includes an entire Discovery Log page entry to aim to
be compatible with other transports in the future.  When a remote
controller is connected to via a Discovery Log page entry (nvmecontrol
connect-all), the raw entry is used.  When a remote controller is
connected to via an explicit address, an entry is synthesized from the
parameters.

Note that this is a pseudo-ABI break for the ioctls used by nvmf(4) in
that the nvlists for handoff and reconnect now use a slightly
different set of elements.  Since this is only present in main I did
not bother implementing compatability shims.

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48214
</pre>
</div>
</content>
</entry>
<entry>
<title>nvmf: Switch several ioctls to using nvlists</title>
<updated>2024-12-30T18:52:21+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-12-30T18:52:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=365b89e8ea4af34a05f68aa28e77573e89fa00b2'/>
<id>365b89e8ea4af34a05f68aa28e77573e89fa00b2</id>
<content type='text'>
For requests that handoff queues from userspace to the kernel as well
as the request to fetch reconnect parameters from the kernel, switch
from using flat structures to nvlists.  In particular, this will
permit adding support for additional transports in the future without
breaking the ABI of the structures.

Note that this is an ABI break for the ioctls used by nvmf(4) and
nvmft(4).  Since this is only present in main I did not bother
implementing compatability shims.

Inspired by:	imp (suggestion on a different review)
Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48230
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For requests that handoff queues from userspace to the kernel as well
as the request to fetch reconnect parameters from the kernel, switch
from using flat structures to nvlists.  In particular, this will
permit adding support for additional transports in the future without
breaking the ABI of the structures.

Note that this is an ABI break for the ioctls used by nvmf(4) and
nvmft(4).  Since this is only present in main I did not bother
implementing compatability shims.

Inspired by:	imp (suggestion on a different review)
Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48230
</pre>
</div>
</content>
</entry>
<entry>
<title>nvmf_tcp: Correct padding calculation</title>
<updated>2024-11-02T13:54:29+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-11-02T13:54:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=06b2ed7a3adf023d8a8ce821616052f03dc18ed6'/>
<id>06b2ed7a3adf023d8a8ce821616052f03dc18ed6</id>
<content type='text'>
PDU data alignment (PDA) isn't necessarily a power of 2, just a
multiple of 4, so use roundup() instead of roundup2() to compute the
PDU data offset (PDO).

Sponsored by:	Chelsio Communications
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PDU data alignment (PDA) isn't necessarily a power of 2, just a
multiple of 4, so use roundup() instead of roundup2() to compute the
PDU data offset (PDO).

Sponsored by:	Chelsio Communications
</pre>
</div>
</content>
</entry>
<entry>
<title>libnvmf: Correctly set the controller and host PDA fields</title>
<updated>2024-11-02T13:54:20+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-11-02T13:54:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7b8dd078ea3c6b836f514f47587672fd062279c8'/>
<id>7b8dd078ea3c6b836f514f47587672fd062279c8</id>
<content type='text'>
The caller supplied PDU data alignment (PDA) field from
nvmf_association_params is the caller's restriction on data alignment
(so affects received PDUs), and the PDA value received from the other
end is the remote end's restriction (so affects transmitted PDUs).

I had these backwards so that if the remote end advertised a PDA it
was used as the receive PDA instead of the transmit PDA.

Sponsored by:	Chelsio Communications
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The caller supplied PDU data alignment (PDA) field from
nvmf_association_params is the caller's restriction on data alignment
(so affects received PDUs), and the PDA value received from the other
end is the remote end's restriction (so affects transmitted PDUs).

I had these backwards so that if the remote end advertised a PDA it
was used as the receive PDA instead of the transmit PDA.

Sponsored by:	Chelsio Communications
</pre>
</div>
</content>
</entry>
</feed>
