Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sysfs.c File Reference
#include "core_priv.h"
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/string.h>
#include <rdma/ib_mad.h>

Go to the source code of this file.

Data Structures

struct  ib_port
 
struct  port_attribute
 
struct  port_table_attribute
 

Macros

#define PORT_ATTR(_name, _mode, _show, _store)   struct port_attribute port_attr_##_name = __ATTR(_name, _mode, _show, _store)
 
#define PORT_ATTR_RO(_name)   struct port_attribute port_attr_##_name = __ATTR_RO(_name)
 
#define PORT_PMA_ATTR(_name, _counter, _width, _offset)
 
#define IW_STATS_ENTRY(name)
 

Functions

 IW_STATS_ENTRY (ipInReceives)
 
 IW_STATS_ENTRY (ipInHdrErrors)
 
 IW_STATS_ENTRY (ipInTooBigErrors)
 
 IW_STATS_ENTRY (ipInNoRoutes)
 
 IW_STATS_ENTRY (ipInAddrErrors)
 
 IW_STATS_ENTRY (ipInUnknownProtos)
 
 IW_STATS_ENTRY (ipInTruncatedPkts)
 
 IW_STATS_ENTRY (ipInDiscards)
 
 IW_STATS_ENTRY (ipInDelivers)
 
 IW_STATS_ENTRY (ipOutForwDatagrams)
 
 IW_STATS_ENTRY (ipOutRequests)
 
 IW_STATS_ENTRY (ipOutDiscards)
 
 IW_STATS_ENTRY (ipOutNoRoutes)
 
 IW_STATS_ENTRY (ipReasmTimeout)
 
 IW_STATS_ENTRY (ipReasmReqds)
 
 IW_STATS_ENTRY (ipReasmOKs)
 
 IW_STATS_ENTRY (ipReasmFails)
 
 IW_STATS_ENTRY (ipFragOKs)
 
 IW_STATS_ENTRY (ipFragFails)
 
 IW_STATS_ENTRY (ipFragCreates)
 
 IW_STATS_ENTRY (ipInMcastPkts)
 
 IW_STATS_ENTRY (ipOutMcastPkts)
 
 IW_STATS_ENTRY (ipInBcastPkts)
 
 IW_STATS_ENTRY (ipOutBcastPkts)
 
 IW_STATS_ENTRY (tcpRtoAlgorithm)
 
 IW_STATS_ENTRY (tcpRtoMin)
 
 IW_STATS_ENTRY (tcpRtoMax)
 
 IW_STATS_ENTRY (tcpMaxConn)
 
 IW_STATS_ENTRY (tcpActiveOpens)
 
 IW_STATS_ENTRY (tcpPassiveOpens)
 
 IW_STATS_ENTRY (tcpAttemptFails)
 
 IW_STATS_ENTRY (tcpEstabResets)
 
 IW_STATS_ENTRY (tcpCurrEstab)
 
 IW_STATS_ENTRY (tcpInSegs)
 
 IW_STATS_ENTRY (tcpOutSegs)
 
 IW_STATS_ENTRY (tcpRetransSegs)
 
 IW_STATS_ENTRY (tcpInErrs)
 
 IW_STATS_ENTRY (tcpOutRsts)
 
int ib_device_register_sysfs (struct ib_device *device, int(*port_callback)(struct ib_device *, u8, struct kobject *))
 
void ib_device_unregister_sysfs (struct ib_device *device)
 
int ib_sysfs_setup (void)
 
void ib_sysfs_cleanup (void)
 

Macro Definition Documentation

#define IW_STATS_ENTRY (   name)
Value:
static ssize_t show_##name(struct device *device, \
struct device_attribute *attr, char *buf) \
{ \
return show_protocol_stat(device, attr, buf, \
sizeof (u64)); \
} \
static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL)

Definition at line 710 of file sysfs.c.

#define PORT_ATTR (   _name,
  _mode,
  _show,
  _store 
)    struct port_attribute port_attr_##_name = __ATTR(_name, _mode, _show, _store)

Definition at line 58 of file sysfs.c.

#define PORT_ATTR_RO (   _name)    struct port_attribute port_attr_##_name = __ATTR_RO(_name)

Definition at line 61 of file sysfs.c.

#define PORT_PMA_ATTR (   _name,
  _counter,
  _width,
  _offset 
)
Value:
struct port_table_attribute port_pma_attr_##_name = { \
.attr = __ATTR(_name, S_IRUGO, show_pma_counter, NULL), \
.index = (_offset) | ((_width) << 16) | ((_counter) << 24) \
}

Definition at line 314 of file sysfs.c.

Function Documentation

int ib_device_register_sysfs ( struct ib_device device,
int(*)(struct ib_device *, u8, struct kobject *)  port_callback 
)

Definition at line 806 of file sysfs.c.

void ib_device_unregister_sysfs ( struct ib_device device)

Definition at line 882 of file sysfs.c.

void ib_sysfs_cleanup ( void  )

Definition at line 908 of file sysfs.c.

int ib_sysfs_setup ( void  )

Definition at line 903 of file sysfs.c.

IW_STATS_ENTRY ( ipInReceives  )
IW_STATS_ENTRY ( ipInHdrErrors  )
IW_STATS_ENTRY ( ipInTooBigErrors  )
IW_STATS_ENTRY ( ipInNoRoutes  )
IW_STATS_ENTRY ( ipInAddrErrors  )
IW_STATS_ENTRY ( ipInUnknownProtos  )
IW_STATS_ENTRY ( ipInTruncatedPkts  )
IW_STATS_ENTRY ( ipInDiscards  )
IW_STATS_ENTRY ( ipInDelivers  )
IW_STATS_ENTRY ( ipOutForwDatagrams  )
IW_STATS_ENTRY ( ipOutRequests  )
IW_STATS_ENTRY ( ipOutDiscards  )
IW_STATS_ENTRY ( ipOutNoRoutes  )
IW_STATS_ENTRY ( ipReasmTimeout  )
IW_STATS_ENTRY ( ipReasmReqds  )
IW_STATS_ENTRY ( ipReasmOKs  )
IW_STATS_ENTRY ( ipReasmFails  )
IW_STATS_ENTRY ( ipFragOKs  )
IW_STATS_ENTRY ( ipFragFails  )
IW_STATS_ENTRY ( ipFragCreates  )
IW_STATS_ENTRY ( ipInMcastPkts  )
IW_STATS_ENTRY ( ipOutMcastPkts  )
IW_STATS_ENTRY ( ipInBcastPkts  )
IW_STATS_ENTRY ( ipOutBcastPkts  )
IW_STATS_ENTRY ( tcpRtoAlgorithm  )
IW_STATS_ENTRY ( tcpRtoMin  )
IW_STATS_ENTRY ( tcpRtoMax  )
IW_STATS_ENTRY ( tcpMaxConn  )
IW_STATS_ENTRY ( tcpActiveOpens  )
IW_STATS_ENTRY ( tcpPassiveOpens  )
IW_STATS_ENTRY ( tcpAttemptFails  )
IW_STATS_ENTRY ( tcpEstabResets  )
IW_STATS_ENTRY ( tcpCurrEstab  )
IW_STATS_ENTRY ( tcpInSegs  )
IW_STATS_ENTRY ( tcpOutSegs  )
IW_STATS_ENTRY ( tcpRetransSegs  )
IW_STATS_ENTRY ( tcpInErrs  )
IW_STATS_ENTRY ( tcpOutRsts  )