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

Samuel Mendoza-Jonas sam at mendozajonas.com
Fri Jan 29 15:30:59 AEDT 2021


On Wed, 2021-01-27 at 23:00 +0000, Thu Nguyen OS wrote:
> 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?

Hi Thu,

The multi_channel and multi_package variables represent whether
multiple channels and packages should be used simultaneously, not
whether they exist. The commit introducing support for this has a good
description:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/ncsi?id=8d951a75d022d94a05f5fa74217670a981e8302d

Behaviour like this can be configured via the NCSI Netlink interface,
e.g. via this tool: https://github.com/sammj/ncsi-netlink

Cheers,
Sam




More information about the openbmc mailing list