lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 14 Sep 2020 13:48:14 +0000
From:   Omer Shpigelman <oshpigelman@...ana.ai>
To:     Jakub Kicinski <kuba@...nel.org>,
        Oded Gabbay <oded.gabbay@...il.com>
CC:     "Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        SW_Drivers <SW_Drivers@...ana.ai>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "David S. Miller" <davem@...emloft.net>
Subject: RE: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

On Thu, Sep 10, 2020 at 11:31 PM Jakub Kicinski <kuba@...nel.org> wrote:
> On Thu, 10 Sep 2020 23:17:59 +0300 Oded Gabbay wrote:
> > > Doesn't seem like this one shows any more information than can be
> > > queried with ethtool, right?
> > correct, it just displays it in a format that is much more readable
> 
> You can cat /sys/class/net/$ifc/carrier if you want 0/1.
> 
> > > > nic_mac_loopback
> > > > is to set a port to loopback mode and out of it. It's not really
> > > > configuration but rather a mode change.
> > >
> > > What is this loopback for? Testing?
> >
> > Correct.
> 
> Loopback test is commonly implemented via ethtool -t

This debugfs entry is only to set the port to loopback mode, not running a loopback test.
Hence IMO adding a private flag is more suitable here and please correct me if I'm wrong.
But either way, doing that from ethtool instead of debugfs is not a good practice in our case.
Due to HW limitations, when we switch a port to/from loopback mode, we need to reset the device.
Since ethtool works on specific interface rather than an entire device, we'll need to reset the device 10 times in order to switch the entire device to loopback mode.
Moreover, running this command for one interface affects other interfaces which is not desirable when using ethtool AFAIK.
Is there any other acceptable debugfs-like mechanism for that?

Thanks,
Omer

Powered by blists - more mailing lists