NC-SI driver: update multi_package, multi_channel base on package_num and channel_num.

Thu Nguyen OS thu at os.amperecomputing.com
Thu Jan 28 10:00:02 AEDT 2021


Dear,

I checked the NC-SI driver source, the driver will work difference when the interface have multiple package or multiple channel.
Such as:
If multi_channel is enabled configure all valid
                         * channels whether or not they currently have link
                         * so they will have AENs enabled.

By default the search is done once an inactive channel with up
         * link is found, unless a preferred channel is set.
         * If multi_package or multi_channel are configured all channels in the
         * whitelist are added to the channel queue.

Look that the code:
multi_channel is set in ncsi_set_channel_mask_nl base on the configuration of NCSI_ATTR_MULTI_FLAG.
multi_package is set in ncsi_set_package_mask_nl  base on the configuration of NCSI_ATTR_MULTI_FLAG.
Do we have any special reason to add this option?
What should I do to enable this option?

As my understanding, multi_channel  and multi_package  will be mapped with the number of  the physical package/channel on OCP card.
In the driver, we have section to add/remove the package or channel in functions ncsi_add/remove_package,  ncsi_add/remove_channel.
Why don’t we update multi_channel  and multi_package  in these function as below?

ndp->package_num++;
     if (ndp->package_num > 1)
                ndp->multi_package = true;

        ndp->package_num--;
        if (ndp->package_num <= 1)
                ndp->multi_package = false;

    np->channel_num++;
        if (np->channel_num > 1)
                np->multi_channel = true;

        np->channel_num--;
        if (np->channel_num <= 1)
                np->multi_channel = false;

Thanks.
Thu Nguyen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20210127/4e726614/attachment-0001.htm>


More information about the openbmc mailing list