* Question w.r.t debugfs / netdevice pass-through IOCTL
@ 2010-10-21 3:26 Debashis Dutt
2010-10-21 4:19 ` Stephen Hemminger
0 siblings, 1 reply; 5+ messages in thread
From: Debashis Dutt @ 2010-10-21 3:26 UTC (permalink / raw)
To: netdev@vger.kernel.org
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)
b) use SIOCDEVPRIVATE for the pass through IOCTL defined in
struct net_device_ops{}
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)
Please suggest.
Thanks
--Debashis
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question w.r.t debugfs / netdevice pass-through IOCTL
2010-10-21 3:26 Question w.r.t debugfs / netdevice pass-through IOCTL Debashis Dutt
@ 2010-10-21 4:19 ` Stephen Hemminger
2010-10-21 20:22 ` John Fastabend
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2010-10-21 4:19 UTC (permalink / raw)
To: Debashis Dutt; +Cc: netdev@vger.kernel.org
On Wed, 20 Oct 2010 20:26:50 -0700
Debashis Dutt <ddutt@Brocade.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
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question w.r.t debugfs / netdevice pass-through IOCTL
2010-10-21 4:19 ` Stephen Hemminger
@ 2010-10-21 20:22 ` John Fastabend
2010-10-25 13:48 ` Shyam_Iyer
0 siblings, 1 reply; 5+ messages in thread
From: John Fastabend @ 2010-10-21 20:22 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Debashis Dutt, netdev@vger.kernel.org
On 10/20/2010 9:19 PM, Stephen Hemminger wrote:
> On Wed, 20 Oct 2010 20:26:50 -0700
> Debashis Dutt <ddutt@Brocade.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.
Assuming CEE is Converged Enhanced Ethernet here.
For CEE queries please consider using the dcbnl interface in /net/dcb/dcbnl.c. If
it is missing an interface that would be useful to all DCB devices we could
entertain adding it. Also this way DCB queries will work with existing tools that
query these things lldpad/dcbtool.
The things you would want to know about a CEE device should be about the same
regardless of the hardware in use lets try to use a single interface and avoid
private interfaces.
Thanks,
John.
>> 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
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Question w.r.t debugfs / netdevice pass-through IOCTL
2010-10-21 20:22 ` John Fastabend
@ 2010-10-25 13:48 ` Shyam_Iyer
0 siblings, 0 replies; 5+ messages in thread
From: Shyam_Iyer @ 2010-10-25 13:48 UTC (permalink / raw)
To: john.r.fastabend, shemminger; +Cc: ddutt, netdev
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On Behalf Of John Fastabend
> Sent: Thursday, October 21, 2010 4:22 PM
> To: Stephen Hemminger
> Cc: Debashis Dutt; netdev@vger.kernel.org
> Subject: Re: Question w.r.t debugfs / netdevice pass-through IOCTL
>
> On 10/20/2010 9:19 PM, Stephen Hemminger wrote:
> > On Wed, 20 Oct 2010 20:26:50 -0700
> > Debashis Dutt <ddutt@Brocade.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.
>
> Assuming CEE is Converged Enhanced Ethernet here.
>
> For CEE queries please consider using the dcbnl interface in /net/dcb/dcbnl.c. If
> it is missing an interface that would be useful to all DCB devices we could
> entertain adding it. Also this way DCB queries will work with existing tools that
> query these things lldpad/dcbtool.
>
> The things you would want to know about a CEE device should be about the same
> regardless of the hardware in use lets try to use a single interface and avoid
> private interfaces.
John - I agree on this.. On a sidenote I would like the interface to not be netdev device specific..
View the CEE device to be not just an Ethernet controller but a SCSI controller as well and hence if this interface can be generally accessible by other subsystems.
>
> Thanks,
> John.
>
> >> 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
> >
> >
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Question w.r.t debugfs / netdevice pass-through IOCTL
@ 2010-10-21 20:29 Debashis Dutt
0 siblings, 0 replies; 5+ messages in thread
From: Debashis Dutt @ 2010-10-21 20:29 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev@vger.kernel.org
----Original Message-----
From: Stephen Hemminger [mailto:shemminger@vyatta.com]
Sent: Wednesday, October 20, 2010 9:19 PM
To: Debashis Dutt
Cc: netdev@vger.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@Brocade.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
--
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-25 13:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21 3:26 Question w.r.t debugfs / netdevice pass-through IOCTL Debashis Dutt
2010-10-21 4:19 ` Stephen Hemminger
2010-10-21 20:22 ` John Fastabend
2010-10-25 13:48 ` Shyam_Iyer
-- strict thread matches above, loose matches on Subject: below --
2010-10-21 20:29 Debashis Dutt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).