[<prev] [next>] [day] [month] [year] [list]
Message-ID: <F363E7AC84E1B646A0358B281A46F4AEABA0FFCFFC@HQ1-EXCH03.corp.brocade.com>
Date: Thu, 21 Oct 2010 13:29:59 -0700
From: Debashis Dutt <ddutt@...cade.COM>
To: Stephen Hemminger <shemminger@...tta.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: Question w.r.t debugfs / netdevice pass-through IOCTL
----Original Message-----
From: Stephen Hemminger [mailto:shemminger@...tta.com]
Sent: Wednesday, October 20, 2010 9:19 PM
To: Debashis Dutt
Cc: netdev@...r.kernel.org
Subject: Re: Question w.r.t debugfs / netdevice pass-through IOCTL
On Wed, 20 Oct 2010 20:26:50 -0700
Debashis Dutt <ddutt@...cade.COM> wrote:
> Hi,
>
> For the Brocade 10G Ethernet driver (bna) we want to implement a set of operations which is not supported by current tools like ethtool.
>
> Examples of such operations would be
> a) Queries related to CEE, if the link is CEE.
> b) Get traces from firmware.
>
> I was wondering what would be right approach to take here:
> a) use debugfs (like the Chelsio cxgb4 driver)
Works as long as they are really debug operations. The debugfs isn't always
available, and support should be a config option for your driver.
> b) use SIOCDEVPRIVATE for the pass through IOCTL defined in
> struct net_device_ops{}
The problem with ioctl is it doesn't work for 32 bit user space
compatiablity. The ioctl compat layer does not have enough context
to translate SIOCDEVPRIVATE
> As per comments in the header file, b) should not be used
> since this IOCTL is supposed to be deprecated.
> c) use procfs / sysfs (these may not scale, in our opinion)
Although less common, there were drivers putting things in /proc/net/xxx/ethX
Thanks Stephen for the suggestions.
--Debashis
--
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists