<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:11:35 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-14649] LNetDist() may not return 0 for local NID</title>
                <link>https://jira.whamcloud.com/browse/LU-14649</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Multi-rail peer can have multiple local NIDs, but LNetDist() will only identify a NID as local if it is the first one returned by lnet_get_next_ni_locked().&lt;/p&gt;

&lt;p&gt;Here&apos;s the code:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;        while ((ni = lnet_get_next_ni_locked(NULL, ni))) {
                if (ni-&amp;gt;ni_nid == dstnid) {
                        if (srcnidp != NULL)
                                *srcnidp = dstnid;
                        if (orderp != NULL) {
                                if (dstnid == LNET_NID_LO_0)
                                        *orderp = 0;
                                else
                                        *orderp = 1;
                        }
                        lnet_net_unlock(cpt);

                        return local_nid_dist_zero ? 0 : 1;
                }

                if (LNET_NIDNET(ni-&amp;gt;ni_nid) == dstnet) {
                        /* Check if ni was originally created in
                         * current net namespace.
                         * If not, assign order above 0xffff0000,
                         * to make this ni not a priority. */
                        if (current-&amp;gt;nsproxy &amp;amp;&amp;amp;
                            !net_eq(ni-&amp;gt;ni_net_ns, current-&amp;gt;nsproxy-&amp;gt;net_ns))
                                        order += 0xffff0000;
                        if (srcnidp != NULL)
                                *srcnidp = ni-&amp;gt;ni_nid;
                        if (orderp != NULL)
                                *orderp = order;
                        lnet_net_unlock(cpt);
                        return 1;
                }

                order++;
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If a peer has two nids on same net, x@o2ib and y@o2ib, then LNetDist() will return 0 for one of the NIDs and 1 for the other NID even though both NIDs are local.&lt;/p&gt;

&lt;p&gt;This is evidenced by &lt;tt&gt;lctl which_nids&lt;/tt&gt; always returning the first NI that is configured regardless of the order of arguments:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;sles15c01:~ # lctl list_nids
192.168.2.38@tcp
192.168.2.39@tcp
sles15c01:~ # lctl which_nid 192.168.2.38@tcp 192.168.2.39@tcp
192.168.2.38@tcp
sles15c01:~ # lctl which_nid 192.168.2.39@tcp 192.168.2.38@tcp
192.168.2.38@tcp
sles15c01:~ #
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="63974">LU-14649</key>
            <summary>LNetDist() may not return 0 for local NID</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="hornc">Chris Horn</assignee>
                                    <reporter username="hornc">Chris Horn</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Apr 2021 16:30:45 +0000</created>
                <updated>Tue, 22 Jun 2021 01:08:42 +0000</updated>
                            <resolved>Tue, 22 Jun 2021 01:08:42 +0000</resolved>
                                                    <fixVersion>Lustre 2.15.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="300135" author="gerrit" created="Thu, 29 Apr 2021 17:03:01 +0000"  >&lt;p&gt;Chris Horn (chris.horn@hpe.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/43498&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43498&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14649&quot; title=&quot;LNetDist() may not return 0 for local NID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14649&quot;&gt;&lt;del&gt;LU-14649&lt;/del&gt;&lt;/a&gt; lnet: Correct distance calculation of local NIDs&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: a95973cc5ab1c121f2603f61697ba044327dcf20&lt;/p&gt;</comment>
                            <comment id="305114" author="gerrit" created="Mon, 21 Jun 2021 22:16:39 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/43498/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/43498/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14649&quot; title=&quot;LNetDist() may not return 0 for local NID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14649&quot;&gt;&lt;del&gt;LU-14649&lt;/del&gt;&lt;/a&gt; lnet: Correct distance calculation of local NIDs&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 3b263dd80ee56efae922e2cfcab375dbe2cb273a&lt;/p&gt;</comment>
                            <comment id="305133" author="pjones" created="Tue, 22 Jun 2021 01:08:42 +0000"  >&lt;p&gt;Landed for 2.15&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i01tbz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>