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

Andrew Lunn
2024-06-21T15:33:51Z

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

Did you see any added in the last few years? This is also something
DaveM pushed back on. We want uniform APIs so that all devices look
alike. Please consider what you are exporting here, how it should
cleanly fit into ethtool, devlink, etc, and expand these APIs to cover
your needs.

>
> >> +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.

If there is no netdev, what is the point of putting it into loopback?
How do you send packets which are to be looped back? How do you
receive them to see if they were actually looped back?

Andrew