mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Greg KH <greg@kroah.com>, Alexander Viro <aviro@redhat.com>,
	"David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Sysfs is too restrictive
Date: Fri, 27 Feb 2004 10:05:41 -0800	[thread overview]
Message-ID: <20040227100541.284fb155@dell_ss3.pdx.osdl.net> (raw)

I have been experimenting with using sysfs to manage Ethernet bridge devices
but have to conclude that sysfs is too restrictive to be useful for doing
it.  Maybe for 2.7, some of the implementation restrictions that tie kobjects 
directly to the file hierarchy can be lifted.

Here is what I want to do.  Assume there are only two kobject's related to
bridging.  The first is the class device (inside the net_device) that contains
"br0".  The other is the bridge port which represents an interface in a bridge.
The hack method of adding kobjects to create subdirectories would make the already
painful ref count issues worse.

It is too hard to get the desired directory layout without re-implementing most
of sysfs in the driver.  This is what I want, and don't have Pat to kick around
anymore.

class
`-- net
    |-- br0
    |   |-- addr_len
    |   |-- address
    |   |-- bridge
    |   |   |-- forward_delay
    |   |   |-- hello_time
    |   |   |-- id
    |   |   |-- max_age
    |   |   |-- port
    |   |   |   |-- cost
    |   |   |   |-- eth0 -> ../../../eth0
    |   |   |   |-- priority
    |   |   |   `-- stp
    |   |   `-- priority
    |   |-- broadcast
    |   |-- features
    |   |-- flags
    |   |-- ifindex
    |   |-- mtu
    |   |-- statistics
    |   |   |-- collisions
    |   |   |-- multicast
    |   |   |-- rx_bytes
    |   |   |-- rx_compressed
    |   |   |-- rx_crc_errors
    |   |   |-- rx_dropped
    |   |   |-- rx_errors
    |   |   |-- rx_fifo_errors
    |   |   |-- rx_frame_errors
    |   |   |-- rx_length_errors
    |   |   |-- rx_missed_errors
    |   |   |-- rx_over_errors
    |   |   |-- rx_packets
    |   |   |-- tx_aborted_errors
    |   |   |-- tx_bytes
    |   |   |-- tx_carrier_errors
    |   |   |-- tx_compressed
    |   |   |-- tx_dropped
    |   |   |-- tx_errors
    |   |   |-- tx_fifo_errors
    |   |   |-- tx_heartbeat_errors
    |   |   |-- tx_packets
    |   |   `-- tx_window_errors
    |   |-- tx_queue_len
    |   `-- type
    `-- eth0
        |-- addr_len
        |-- address
        |-- broadcast
        |-- device -> ../../../devices/pci0000:00/0000:00:1e.0/0000:04:04.0
        |-- driver -> ../../../bus/pci/drivers/e100
        |-- features
        |-- flags
        |-- ifindex
        |-- iflink
        |-- mtu
        |-- statistics
        |   |-- collisions
        |   |-- multicast
        |   |-- rx_bytes
        |   |-- rx_compressed
        |   |-- rx_crc_errors
        |   |-- rx_dropped
        |   |-- rx_errors
        |   |-- rx_fifo_errors
        |   |-- rx_frame_errors
        |   |-- rx_length_errors
        |   |-- rx_missed_errors
        |   |-- rx_over_errors
        |   |-- rx_packets
        |   |-- tx_aborted_errors
        |   |-- tx_bytes
        |   |-- tx_carrier_errors
        |   |-- tx_compressed
        |   |-- tx_dropped
        |   |-- tx_errors
        |   |-- tx_fifo_errors
        |   |-- tx_heartbeat_errors
        |   |-- tx_packets
        |   `-- tx_window_errors
        |-- tx_queue_len
        `-- type

8 directories, 75 files

             reply	other threads:[~2004-02-27 18:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-27 18:05 Stephen Hemminger [this message]
2004-02-27 18:14 ` Dave Jones
2004-02-27 18:30   ` Stephen Hemminger
2004-02-27 18:42     ` Dave Jones
2004-02-27 18:18 ` Greg KH

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=20040227100541.284fb155@dell_ss3.pdx.osdl.net \
    --to=shemminger@osdl.org \
    --cc=aviro@redhat.com \
    --cc=davem@redhat.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®