All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Debashis Dutt <ddutt@Brocade.COM>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: Question w.r.t debugfs / netdevice pass-through IOCTL
Date: Wed, 20 Oct 2010 21:19:00 -0700	[thread overview]
Message-ID: <20101020211900.79b8336f@nehalam> (raw)
In-Reply-To: <F363E7AC84E1B646A0358B281A46F4AEABA0FFCC68@HQ1-EXCH03.corp.brocade.com>

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



-- 

  reply	other threads:[~2010-10-21  4:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21  3:26 Question w.r.t debugfs / netdevice pass-through IOCTL Debashis Dutt
2010-10-21  4:19 ` Stephen Hemminger [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101020211900.79b8336f@nehalam \
    --to=shemminger@vyatta.com \
    --cc=ddutt@Brocade.COM \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.