I am sponsoring the following fasttrack for myself. Micro/patch binding
is requested. I believe the case qualifies for self review (since all
the interfaces are Consolidation Private) and have filed it as Closed Approved
Automatic. If there is a request, I'd be happy to convert it to a
fasttrack and set the timer to enable further discussion.

-Chris


1. Introduction
   1.1. Project/Component Working Name:
        ndi hidden nodes
   1.2. Name of Document Author/Supplier:
        Author: Chris Horne
   1.3. Date of This Document:
        Mon Feb  9 17:45:42 MST 2009

4.0 Technical Description

    A new Nexus Driver Interface (NDI) extension that allows for
    "hidden" devinfo nodes that do not appear in the /devices namespace
    or in a di_init(3DEVINFO) snapshot is proposed.

    This extension allows a nexus driver to control the visibility of
    devinfo nodes it creates in both /devices and in di_init() devinfo
    snapshots. The ability to control visibility allows a nexus to
    create children as an artifact of its discovery implementation,
    while preventing these transitory children from being seen by other
    software.

    Here are two examples of why a nexus driver may want to hide
    certain devinfo nodes:

     o  For a nexus driver that implements a dynamic bus config [1], in
        order to use a bus's existing transport mechanisms to "probe"
        and obtain both configuration and identity information about
        Self-Identifying Device children (SID ddi_dev_is_sid(9F)), a
        fully initialized and linked "probe" devinfo node is needed.

        While kernel creation and full linkage of this "probe" devinfo
        node is necessary to use an existing transport, the "probe"
        node is just an implementation artifact of a nexus driver's
        bus_config implementation, and should not show up in the
        /devices namespace or in devinfo snapshots.

        A facility is needed to allow these "probe" nodes to be created
        as hidden nodes.  After configuration and identity information
        is obtained using an initialized "probe" node, a 'real' node is
        typically created - with the probe information obtained being
        used to form the real node's 'compatible' property.

        As an example, we want common SCSAv3 bus config code (in the
        SCSA framework) to be able to DDI_CTLOPS_INITCHILD
        (tran_tgt_init(9E)) a "probe" devinfo node bound to the
        nulldriver [2] at an enumerated unit-address. Using this
        initialized "probe" node, discovery related SCSI commands (like
        INQUIRY) can be issued using an unmodified HBA transport
        implementation. The information obtained is then used to to
        construct the appropriate self-identifying SCSI target device
        node (devinfo or pathinfo) with a 'compatible' property per
        scsi(4).  The "probe" node can also be used to drive
        enumeration of LUNs associated with a target (using REPORTLUN).

     o  OBP sd(7D)/st(7D) "stub" (wildcard) nodes are an implementation
        artifact that should be hidden. These nodes do not represent
        devices, they have no addressing information. With a facility
        to mark these nodes as hidden in a driver's
        DDI_CTLOPS_INITCHILD, confusion surrounding their existence in
        the Solaris device tree can be avoided.

    The alternative approach of excluding node names that begin with
    "." from /devices and devinfo snapshots was considered but
    rejected.  While a leading "." in a node name does not violate the
    OpenFirmware specification (IEEE 1275), this approach would require
    changing the node name via ndi_devi_set_nodename() to hide OBP
    "stub" nodes.

    NOTE: ndi_devi_clr_hidden is provided for completeness, I am not
    aware of any immediate applicability.

4.5 Interfaces:

    The following private NDI extensions allow a nexus driver to
    create/mark devinfo nodes so they are excluded from /devices and
    from devinfo snapshots. These are extensions of existing ndi
    Private interfaces [3, 4]. The commitment level of the proposed
    extensions is also Sun Private.

    ------------------------------------------------------------------
    Interface Name              Comm.Lev.       Comments
    ------------------------------------------------------------------

    DEVI_SID_HIDDEN_NODEID Cons.Private New i_ddi_alloc_node nodeid
                                        argument used to create a node
                                        that should be considered an
                                        implementation artifact.
                                        Create hidden SID node.  Peer
                                        of DEVI_SID_NODEID.

    ndi_devi_set_hidden         "       Mark a node as hidden.  Can be
                                        used in initchild to hide nodes
                                        that lack correct addressing
                                        information (like stub sd OBP
                                        nodes) or against nodes that
                                        become implementation
                                        artifacts. Peer of interfaces
                                        like ndi_devi_set_nodename().

    ndi_devi_clr_hidden         "       Mark a node as not hidden.

    ndi_dev_is_hidden_node      "       Determine if a node is hidden.
                                        Peer of interfaces like
                                        ndi_dev_is_persistent_node().

    DDI_HIDDEN                  "       New devi_node_attributes bit.
                                        Peer of DDI_PERSISTENT.

    Prototypes:

        void    ndi_devi_set_hidden(dev_info_t *);
        void    ndi_devi_clr_hidden(dev_info_t *);
        int     ndi_dev_is_hidden_node(dev_info_t *);

4.6 Man page changes:

    None.

4.7 Release Binding

    Micro/patch binding is requested.

4.8 References

    [1] PSARC/2002/168  Bus Config
        http://sac.sfbay/PSARC/2002/168
        http://www.opensolaris.org/os/community/arc/caselog/2002/168

    [2] PSARC/2008/674  nulldriver
        http://sac.sfbay/PSARC/2008/674
        http://www.opensolaris.org/os/community/arc/caselog/2008/674

    [3] PSARC/1993/687 Hot Plugging and Dynamic Configuration
        http://sac.sfbay/PSARC/1993/687
        http://www.opensolaris.org/os/community/arc/caselog/1993/687

    [4] PSARC/1996/409 Modifications to Solaris I/O Hotplug
        http://sac.sfbay/PSARC/1996/409
        http://www.opensolaris.org/os/community/arc/caselog/1996/409


6. Resources and Schedule
    6.4. Steering Committee requested information
        6.4.1. Consolidation C-team Name:
                ON
    6.5. ARC review type: Automatic
    6.6. ARC Exposure: open


Reply via email to