From: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
To: Bernard Metzler <bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 04/14] SIWv2: Module initialization: siw_main.c
Date: Sat, 18 Jun 2011 19:39:11 +0200 [thread overview]
Message-ID: <BANLkTi=E=FQonndVeROSQJkpWRH4sCwEfA@mail.gmail.com> (raw)
In-Reply-To: <1308228122-22616-1-git-send-email-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
On Thu, Jun 16, 2011 at 2:42 PM, Bernard Metzler <bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org> wrote:
> ---
> drivers/infiniband/hw/siw/siw_main.c | 603 ++++++++++++++++++++++++++++++++++
> 1 files changed, 603 insertions(+), 0 deletions(-)
> create mode 100644 drivers/infiniband/hw/siw/siw_main.c
>
> diff --git a/drivers/infiniband/hw/siw/siw_main.c b/drivers/infiniband/hw/siw/siw_main.c
> [ ... ]
> +static ssize_t show_stats(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + struct siw_dev *siw_dev = container_of(dev, struct siw_dev,
> + ofa_dev.dev);
> +
> + return sprintf(buf, "Allocated SIW Objects:\n"
> +#if DPRINT_MASK > 0
> + "Global :\t%s: %d\n"
> +#endif
> + "Device %s:\t"
> + "%s: %d, %s: %d, %s: %d, %s: %d, %s: %d, %s: %d\n",
> +#if DPRINT_MASK > 0
> + "WQEs", atomic_read(&siw_num_wqe),
> +#endif
> + siw_dev->ofa_dev.name,
> + "PDs", atomic_read(&siw_dev->num_pd),
> + "QPs", atomic_read(&siw_dev->num_qp),
> + "CQs", atomic_read(&siw_dev->num_cq),
> + "SRQs", atomic_read(&siw_dev->num_srq),
> + "MRs", atomic_read(&siw_dev->num_mem),
> + "CEPs", atomic_read(&siw_dev->num_cep));
> +}
The rules for sysfs, documented in Documentation/ABI/README, are:
- One value per file.
- All new sysfs attributes must be documented in Documentation/ABI.
An alternative to following the above rules is moving attributes from
sysfs to debugfs.
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-06-18 17:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 12:42 [PATCH 04/14] SIWv2: Module initialization: siw_main.c Bernard Metzler
[not found] ` <1308228122-22616-1-git-send-email-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2011-06-18 17:39 ` Bart Van Assche [this message]
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='BANLkTi=E=FQonndVeROSQJkpWRH4sCwEfA@mail.gmail.com' \
--to=bvanassche-hinycgiudog@public.gmane.org \
--cc=bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for NNTP newsgroup(s).