All of lore.kernel.org
 help / color / mirror / Atom feed
* Sysfs is too restrictive
@ 2004-02-27 18:05 Stephen Hemminger
  2004-02-27 18:14 ` Dave Jones
  2004-02-27 18:18 ` Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Hemminger @ 2004-02-27 18:05 UTC (permalink / raw)
  To: Greg KH, Alexander Viro, David S. Miller; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-02-27 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-27 18:05 Sysfs is too restrictive Stephen Hemminger
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

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.