Re: [PATCH 06/15] net: hbl_cn: debugfs support

Omer Shpigelman
2024-06-21T10:18:36Z

On 6/19/24 21:35, Sunil Kovvuri Goutham wrote:
> [Some people who received this message don't often get email from sgoutham@marvell.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
>> +
>> +What: /sys/kernel/debug/habanalabs_cn/hbl_cn<n>/nic_disable_decap
>> +What: /sys/kernel/debug/habanalabs_cn/hbl_cn<n>/nic_inject_rx_err
>> +What: /sys/kernel/debug/habanalabs_cn/hbl_cn<n>/nic_mac_lane_remap
>
> Don't think debugfs is the correct interface for all this configuration.
> Debugfs should ideally be used for dumping runtime device state info for debug purposes.
>

I see other vendors have debugfs entries for debug configurations or
settings, not just for dumping debug info.

>> +What: /sys/kernel/debug/habanalabs_cn/hbl_cn<n>/nic_mac_loopback
>
> Why not use ethtool ?
>

We have an ethtool option for that, but we have also internal NIC ports
that are not exposed as netdevices and for them the ethtool path is
irrelevant. Hence we need this debugfs option as well.

>> +
>> +What: /sys/kernel/debug/habanalabs_cn/hbl_cn<n>/nic_mmu_bypass
>
> How does this work ?
>

When this option is enabled the RDMA data buffers the user allocated on the
host memory are being accessed directly i.e. without MMU.
But now after you brought this up I see that it is not fully supported
anymore so I'll remove in the next version.

> Thanks,
> Sunil.