netdev
[Top] [All Lists]

[PATCH 0/2] Sysfs net class .

To: "David S. Miller" <davem@xxxxxxxxxx>, Patrick Mochel <mochel@xxxxxxxx>
Subject: [PATCH 0/2] Sysfs net class .
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Thu, 15 May 2003 16:27:12 -0700
Cc: netdev@xxxxxxxxxxx, greg@xxxxxxxxx, mochel@xxxxxxxx, jkenisto@xxxxxxxxxx, lkessler@xxxxxxxxxx, Daniel Stekloff <dsteklof@xxxxxxxxxx>
In-reply-to: <200305141443.57169.dsteklof@us.ibm.com>
Organization: Open Source Development Lab
References: <20030513150303.A2406@DYN318281.beaverton.ibm.com> <200305131657.03508.dsteklof@us.ibm.com> <20030514142023.0e411f34.shemminger@osdl.org> <200305141443.57169.dsteklof@us.ibm.com>
Sender: netdev-bounce@xxxxxxxxxxx
Starting with work by Pat and Daniel Stekoff , I created a sysfs network 
interface.

There are two parts, one is the core network device piece to create
sysfs entries during init and register. The other is changing the device
drivers so that during registration the appropriate symlinks back to the
pci physical devices gets made.

All this is under a config option in case embedded or other systems
don't need it.  The files are in sysfs standard format with one value per
file.  Most are read-only, although some like flags, mtu, can be set.

The sysfs tree layout is:

class/net
|-- eth0
|   |-- addr_len
|   |-- address
|   |-- broadcast
|   |-- device -> ../../../devices/pci0/00:1e.0/04:04.0
|   |-- driver -> ../../../bus/pci/drivers/e100
|   |-- features
|   |-- flags
|   |-- if_port
|   |-- 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
`-- lo
    |-- addr_len
    |-- address
    |-- broadcast
    |-- features
    |-- flags
    |-- if_port
    |-- 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

6 directories, 66 files

<Prev in Thread] Current Thread [Next in Thread>