diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2026-05-27 20:57:23 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2026-05-27 20:57:23 +0000 |
| commit | caef3c50ac067ca751ba4950f310821a521ebf57 (patch) | |
| tree | 87324aedc47709ee7c4fb3e26779a4e6350f5c2c /.github | |
| parent | 7a436d378951bedbdaa71d45bf236fb001323549 (diff) | |
ctld: Refactor ioctl port handling
- Normalize ioctl port names when the port name is first added to
the configuration. This can catch potential duplicate port names
sooner and helps with other parts of this change.
- When recognizing existing ioctl ports, always expand the name to
include the physical and virtual port numbers. This permits binding
ioctl/0/0 or ioctl/1/0 to a target, for example.
- When adding physical ports to a target, first check for an existing
kernel port to reuse. This handles both ioctl and non-ioctl ports
and removes the need for the conf::add_port method for ioctl ports
to check in kports.
- If an existing kport isn't found when adding physical ports, check
to see if the port name is an ioctl port. If so, call conf::add_port
to add an ioctl port. This add_port method overload is now simpler
as it always creates a new port.
NB: The kernel_port class handles CTL ports that already existed
before ctld started including existing ioctl ports, whereas the
ioctl_port class handles ioctl ports that are created and completely
managed by ctld. This was true before this change but is perhaps more
obvious after this change.
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D57092
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions
