<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/source/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in kernel.cc</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>95fc64cc29fb4cddc7cad093cfa32587a623f560 - ctld: More consistent error messages</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#95fc64cc29fb4cddc7cad093cfa32587a623f560</link>
        <description>ctld: More consistent error messagesThe error messages ctld emits when it finds a port or LUN it did notcreate were inconsistent with each other as well as with ctld&apos;s othererror messages.MFC after:	1 weekSponsored by:	Klara, Inc.Sponsored by:	NetApp, Inc.Reviewed by:	jhbDifferential Revision:	https://reviews.freebsd.org/D57270

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Thu, 28 May 2026 19:22:43 +0200</pubDate>
        <dc:creator>Dag-Erling Sm&#248;rgrav &lt;des@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>caef3c50ac067ca751ba4950f310821a521ebf57 - ctld: Refactor ioctl port handling</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#caef3c50ac067ca751ba4950f310821a521ebf57</link>
        <description>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&apos;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 existedbefore ctld started including existing ioctl ports, whereas theioctl_port class handles ioctl ports that are created and completelymanaged by ctld.  This was true before this change but is perhaps moreobvious after this change.Sponsored by:	Chelsio CommunicationsDifferential Revision:	https://reviews.freebsd.org/D57092

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Wed, 27 May 2026 22:57:23 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>7a436d378951bedbdaa71d45bf236fb001323549 - ctld: Don&apos;t ignore pp/vp values of kernel ports with pp == 0 but vp != 0</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#7a436d378951bedbdaa71d45bf236fb001323549</link>
        <description>ctld: Don&apos;t ignore pp/vp values of kernel ports with pp == 0 but vp != 0Fixes:		c6f1e9b8a412 (&quot;ctld: Simplify XML parsing memory management&quot;)Sponsored by:	Chelsio Communications

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Wed, 27 May 2026 22:56:39 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>d9c0594191f5c45d7f3c737350321ee59bfce9bf - ctld: kernel-sourced portal groups are not dummies</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#d9c0594191f5c45d7f3c737350321ee59bfce9bf</link>
        <description>ctld: kernel-sourced portal groups are not dummiesThe current and historical versions of ctld would flag our initial setof kernel ports as dummies, because their portal groups were empty sinceportals come from the configuration on-disk.As a result, we would never try to remove a kernel port at startup thatdidn&apos;t exist in the configuration (possibly a feature if you wantedconcurrent ctld(8)), and we would always try to port-&gt;kernel_add() onports in the configuration (even if they actually did have an existingkernel port).Flag these portal groups as kernel groups so that we avoid trying to addports that already exist.  It may be the case that the kernel_remove()loop in conf::apply() needs to do something other than the current`oldport-&gt;is_dummy()` to avoid removing ports that it isn&apos;t supposed tobe managing, but that wuld also seem to apply to LUNs that would beremoved today.Reviewed by:	jhbDifferential Revision:	https://reviews.freebsd.org/D51782

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Tue, 28 Apr 2026 22:51:50 +0200</pubDate>
        <dc:creator>Kyle Evans &lt;kevans@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>d21b513988b7d685edf2ad77886b3e3c95cc0df8 - ctld: Be more explicit in a few uses of types to avoid potential ambiguity</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#d21b513988b7d685edf2ad77886b3e3c95cc0df8</link>
        <description>ctld: Be more explicit in a few uses of types to avoid potential ambiguityThis appeases -Wchanges-meaning warnings from GCC.Sponsored by:	Chelsio Communications

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Thu, 07 Aug 2025 23:11:31 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>66b5296f1b29083634e2875ff08c32e7b6b866a8 - ctld: Add support for NVMe over Fabrics</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#66b5296f1b29083634e2875ff08c32e7b6b866a8</link>
        <description>ctld: Add support for NVMe over FabricsWhile the overall structure is similar for NVMeoF controllers andiSCSI targets, there are sufficient differences that NVMe support usesan alternate configuration syntax.- In authentication groups, permitted NVMeoF hosts can be allowed by  names (NQNs) via &quot;host-nqn&quot; values (similar to &quot;initiator-name&quot; for  iSCSI).  Similarly, &quot;host-address&quot; accepts permitted host addresses  similar to &quot;initiator-portal&quot; for iSCSI.- A new &quot;transport-group&quot; context enumerates transports that can be  used by a group of NVMeoF controllers similar to the &quot;portal-group&quot;  context for iSCSI.  In this section, the &quot;listen&quot; keyword accepts a  transport as well as an address to permit other types of transports  besides TCP in the future.  The &quot;foreign&quot;, &quot;offload&quot;, and &quot;redirect&quot;  keywords are also not meaningful and thus not supported.- A new &quot;controller&quot; context describes an NVMeoF I/O controller  similar to the &quot;target&quot; context for iSCSI.  One key difference here  is that &quot;lun&quot; objects are replaced by &quot;namespace&quot; objects.  However,  a &quot;namespace&quot; can reference a named global lun permitting LUNs to be  shared between iSCSI targets and NVMeoF controllers.NB: Authentication via CHAP is not implemented for NVMeoF.Reviewed by:	impSponsored by:	Chelsio CommunicationsDifferential Revision:	https://reviews.freebsd.org/D48773

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Wed, 06 Aug 2025 21:57:50 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>7e844dcad22bdbbdfa9c73271fe46b9ef963d34c - ctld: Add abstractions to support multiple target protocols</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#7e844dcad22bdbbdfa9c73271fe46b9ef963d34c</link>
        <description>ctld: Add abstractions to support multiple target protocolsThis is a prerequisite for adding NVMe over Fabrics support.Convert portal_group, portal_group_port, and target into abstractclasses with virtual methods to support protocol-specific methods.Add new iscsi_portal_group, iscsi_port, iscsi_portal and iscsi_targetsubclasses in a new iscsi.cc file and move some iSCSI-specific logicthere.  Rename ctld_connection to iscsi_connection and move it to anew iscsi.hh header.  Move iscsi_connection methods out of ctld.cc andkernel.cc into iscsi.cc.Reviewed by:	impSponsored by:	Chelsio CommunicationsDifferential Revision:	https://reviews.freebsd.org/D48772

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Wed, 06 Aug 2025 21:56:56 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>ed076901ec80e23804ef432cfa7edeb10c4f9ede - ctld: Convert struct ctld_connection to a C++ class</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#ed076901ec80e23804ef432cfa7edeb10c4f9ede</link>
        <description>ctld: Convert struct ctld_connection to a C++ classNote that some of the functions for handling iSCSI login, discovery,and kernel handoff are now functions of this class as they are logicaloperations on an iSCSI connection and need access to various membersof this class.This also fixes some memory leaks as ctld_connection wasn&apos;t properlytorn down once a connection finishes.  These leaks were harmless inpractice since the ctld process exits after handling each connection.Sponsored by:	Chelsio CommunicationsPull Request:	https://github.com/freebsd/freebsd-src/pull/1794

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Mon, 04 Aug 2025 21:38:08 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>c6f1e9b8a412e4ab7ca5b144708c170d790e4567 - ctld: Simplify XML parsing memory management</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#c6f1e9b8a412e4ab7ca5b144708c170d790e4567</link>
        <description>ctld: Simplify XML parsing memory managementUse C++ STL containers (std::string, std::list) for the data structureholding the parsed output of the XML configuration obtained from thekernel.  This simplifies the code in various places and removes theneed for manual memory freeing (which was incomplete).Use a std::list of pairs of std::string objects for the port and LUNattribute lists instead of an nvlist.Use a std::vector&lt;char&gt; for the resizable buffer receiving XML resultsvia ioctl().  Also, reuse the buffer from CTL_LUN_LIST forCTL_PORT_LIST rather than doing a free() only to turn around andmalloc() again.  While here, split out the code for fetching andparsing the XML into a separate function.Sponsored by:	Chelsio CommunicationsPull Request:	https://github.com/freebsd/freebsd-src/pull/1794

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Mon, 04 Aug 2025 21:38:08 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>888ec3a71912994e4585a6444962de691b56d5d6 - ctld: Convert struct conf to a C++ class</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#888ec3a71912994e4585a6444962de691b56d5d6</link>
        <description>ctld: Convert struct conf to a C++ class- Various functions to add or lookup configuration objects are now  methods of the conf class.- Use std::string and freebsd::pidfile for various members.- Rename the global set_timeout() to start_timer() to avoid shadowing  conf::set_timeout() and also split out a separate stop_timer().Sponsored by:	Chelsio CommunicationsPull Request:	https://github.com/freebsd/freebsd-src/pull/1794

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Mon, 04 Aug 2025 21:38:07 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>2bb9180bb5d0054bf79529d6a1cb56b61a94629a - ctld: Convert struct target to a C++ class</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#2bb9180bb5d0054bf79529d6a1cb56b61a94629a</link>
        <description>ctld: Convert struct target to a C++ class- Use std::string for string members.- Use std::array for the array of LUN pointers indexed by LUN id.- Move meat of the target_* functions from conf.cc into class methods.Sponsored by:	Chelsio CommunicationsPull Request:	https://github.com/freebsd/freebsd-src/pull/1794

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Mon, 04 Aug 2025 21:38:07 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>afcae14d2f241484c9c52aaa130a313eec0991c9 - ctld: Convert struct lun to a C++ class</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#afcae14d2f241484c9c52aaa130a313eec0991c9</link>
        <description>ctld: Convert struct lun to a C++ class- Use std::string and freebsd::nvlist_up for class members.- Turn most lun_* and kernel_lun_* functions into class methods.Sponsored by:	Chelsio CommunicationsPull Request:	https://github.com/freebsd/freebsd-src/pull/1794

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Mon, 04 Aug 2025 21:38:07 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>d6d8a7ba4216d0f12e32c858d4332ba29cc7dc9b - ctld: Convert struct portal_group to a C++ class</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#d6d8a7ba4216d0f12e32c858d4332ba29cc7dc9b</link>
        <description>ctld: Convert struct portal_group to a C++ class- Use std::string, freebsd_nvlist_up to manage life cycle of class  members.- Use an unordered_map&lt;&gt; keyed by std::string in struct conf to  replace the previous TAILQ.- Replace PG_FILTER_* macros with a scoped enum.- Provide a variety of accessors as portal groups are widely used  while keeping members private.- The logic to &quot;move&quot; sockets from existing portals to new portals  when parsing new configuration is now split into several operations  across the conf and portal_group classes to preserve some semblance  of data hiding.Sponsored by:	Chelsio CommunicationsPull Request:	https://github.com/freebsd/freebsd-src/pull/1794

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Mon, 04 Aug 2025 21:38:07 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>6acc7afa34aa5da8d9132e927f2026e594e73701 - ctld: Convert struct port to a hierarchy of C++ classes</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#6acc7afa34aa5da8d9132e927f2026e594e73701</link>
        <description>ctld: Convert struct port to a hierarchy of C++ classesThe existing C struct port was used to describe three types of ports:iSCSI ports associated with a portal_group, ioctl ports, and&quot;physical&quot; ports associated with a kernel device.  This change choosesto split these out into separate sub-classes of an abstract port baseclass.  Virtual methods are used in a few places such as sending theclass-specific CTL ioctls for creating and removing CTL kernel ports.For ownership purposes, a struct conf instance &quot;owns&quot; each port via astd::unique_ptr&lt;&gt; in a std::unordered_map&lt;&gt; indexed by name.  Otherobjects such as targets and portal_groups can also contain collectionsof ports (targets hold a std::list of pointers, portal groups hold astd::unordered_map&lt;&gt; indexed by target names).  Onenot-so-straightforward case is that if a new port fails to register,it is removed from the configuration.  In that case, these otherreferences also have to be removed explicitly.Sponsored by:	Chelsio CommunicationsPull Request:	https://github.com/freebsd/freebsd-src/pull/1794

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Mon, 04 Aug 2025 21:38:07 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>4b1aac931465f39c5c26bfa1d5539a428d340f20 - ctld: Convert struct pport and struct kports to C++ classes</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#4b1aac931465f39c5c26bfa1d5539a428d340f20</link>
        <description>ctld: Convert struct pport and struct kports to C++ classes- Use an unordered_map&lt;&gt; indexed by std::string to replace the TAILQ  of pport objects in struct kports since pport objects are looked up  name.  Use a few wrapper methods around the unordered_map&lt;&gt; to  simplify consumers.- Don&apos;t store a list of port pointers in pport.  Only a single port is  ever associated (previously the code failed with an error if the  TAILQ wasn&apos;t empty when adding a port), so just store a pointer to a  single port and replace the empty TAILQ test with checking if the  pointer is null.- Use std::string for the pport name.- Add accessors (and a setter) for members of pport so that all the  fields can be private.Sponsored by:	Chelsio CommunicationsPull Request:	https://github.com/freebsd/freebsd-src/pull/1794

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Mon, 04 Aug 2025 21:38:07 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>5b0f19262952e7d39fe9a94a0e21c739275e643b - ctld: Convert struct portal to a C++ class</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#5b0f19262952e7d39fe9a94a0e21c739275e643b</link>
        <description>ctld: Convert struct portal to a C++ class- Convert portal_init_socket and portal_reuse_socket into class methods.  Move the logic to handle proxy portal setup into the init_socket method  so that some fields can remain private.- Add accessors for a few other members (most are const) so that all the  fields can be private.- Use std::string, freebsd::addrinfo_up, and freebsd::fd_up classes to  manage fields owned exclusively.- Add a vector of proxy portal pointers to struct conf and use the index  into the vector as the portal ID.  This replaces an O(n^2) loop to  find the portal for a portal ID returned by kernel_accept with a direct  lookup.Sponsored by:	Chelsio CommunicationsPull Request:	https://github.com/freebsd/freebsd-src/pull/1794

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Mon, 04 Aug 2025 21:38:07 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>34e8d66412cd81d020f0e75d078a4404ec39cf5a - ctld: Rename {ctld,isns}.h to {ctld,isns}.hh</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#34e8d66412cd81d020f0e75d078a4404ec39cf5a</link>
        <description>ctld: Rename {ctld,isns}.h to {ctld,isns}.hhSubsequent commits will use C++ in these headers rather than only C.conf.h remains as a C-only header since it is intended for use by theC code generated from parse.y.Sponsored by:	Chelsio CommunicationsPull Request:	https://github.com/freebsd/freebsd-src/pull/1794

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Mon, 04 Aug 2025 21:38:06 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>30020689fb1e5c9549e430bd23600c88e1257697 - ctld: Do not remove item from an nvlist while iterating it</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#30020689fb1e5c9549e430bd23600c88e1257697</link>
        <description>ctld: Do not remove item from an nvlist while iterating itWhile here, make use of cnvlist_* to simplify this code.Fixes:		d42a73fb6a85 (&quot;ctld: Add a dedicated API between parse.y and the rest of the program&quot;)Sponsored by:	Chelsio CommunicationsDifferential Revision:	https://reviews.freebsd.org/D49650

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Fri, 11 Apr 2025 16:02:48 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>839d0755fea8ef761698b50fa5f293546ae832a8 - ctld: Convert to C++</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/usr.sbin/ctld/kernel.cc#839d0755fea8ef761698b50fa5f293546ae832a8</link>
        <description>ctld: Convert to C++This is the minimal set of changes need to compile as C++ so git canhandle the rename correctly.Reviewed by:	asomersSponsored by:	Chelsio CommunicationsDifferential Revision:	https://reviews.freebsd.org/D49139

            List of files:
            /freebsd/usr.sbin/ctld/kernel.cc</description>
        <pubDate>Wed, 02 Apr 2025 20:41:35 +0200</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
</channel>
</rss>
