#include <linux/init.h>
#include <linux/errno.h>
#include <rdma/ib_user_verbs.h>
#include <rdma/ib_addr.h>
#include "usnic_common_util.h"
#include "usnic_ib.h"
#include "usnic_ib_qp_grp.h"
#include "usnic_vnic.h"
#include "usnic_ib_verbs.h"
#include "usnic_ib_sysfs.h"
#include "usnic_log.h"
static ssize_t board_id_show(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(board_id);
static ssize_t
config_show(struct device *device, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(config);
static ssize_t
iface_show(struct device *device, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(iface);
static ssize_t
max_vf_show(struct device *device, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(max_vf);
static ssize_t
qp_per_vf_show(struct device *device, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(qp_per_vf);
static ssize_t
cq_per_vf_show(struct device *device, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(cq_per_vf);
static struct attribute *usnic_class_attributes[] = …;
const struct attribute_group usnic_attr_group = …;
struct qpn_attribute { … };
static ssize_t
usnic_ib_qpn_attr_show(struct kobject *kobj, struct attribute *attr, char *buf)
{ … }
static const struct sysfs_ops usnic_ib_qpn_sysfs_ops = …;
#define QPN_ATTR_RO(NAME) …
static ssize_t context_show(struct usnic_ib_qp_grp *qp_grp, char *buf)
{ … }
static ssize_t summary_show(struct usnic_ib_qp_grp *qp_grp, char *buf)
{ … }
static QPN_ATTR_RO(context);
static QPN_ATTR_RO(summary);
static struct attribute *usnic_ib_qpn_default_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static struct kobj_type usnic_ib_qpn_type = …;
int usnic_ib_sysfs_register_usdev(struct usnic_ib_dev *us_ibdev)
{ … }
void usnic_ib_sysfs_unregister_usdev(struct usnic_ib_dev *us_ibdev)
{ … }
void usnic_ib_sysfs_qpn_add(struct usnic_ib_qp_grp *qp_grp)
{ … }
void usnic_ib_sysfs_qpn_remove(struct usnic_ib_qp_grp *qp_grp)
{ … }