From: Andrew Lunn <andrew@lunn.ch>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: allison.henderson@oracle.com, netdev@vger.kernel.org,
linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com,
tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com,
cgroups@vger.kernel.org
Subject: Re: [PATCH v2] rds: Expose feature parameters via sysfs
Date: Mon, 16 Jun 2025 21:01:10 +0200 [thread overview]
Message-ID: <b71efc64-89b7-4f4b-af0e-9bf081cc9518@lunn.ch> (raw)
In-Reply-To: <aFBlHiguQpdB1e86@char.us.oracle.com>
> I could not for the life of me get the kernel to compile without
> CONFIG_SYSFS, but here is the patch with the modifications you
> enumerated:
Please take a read of:
https://docs.kernel.org/process/submitting-patches.html
and
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
You need a new thread for every version of the patch. You should also
put the tree into the Subject: line, etc.
> diff --git a/Documentation/ABI/stable/sysfs-driver-rds b/Documentation/ABI/stable/sysfs-driver-rds
I could be bike shedding too much, but RDS is not a driver. It is a
socket protocol, which you can layer on top of a few different
transport protocols. So i don't think it should have -driver- in the
filename.
> new file mode 100644
> index 000000000000..d0b4fe0d3ce4
> --- /dev/null
> +++ b/Documentation/ABI/stable/sysfs-driver-rds
> @@ -0,0 +1,10 @@
> +What: /sys/kernel/rds/features
> +Date: June 2025
> +KernelVersion: 6.17
> +Contact: rds-devel@oss.oracle.com
> +Description: This file will contain the features that correspond
> + to the include/uapi/linux/rds.h in a string format.
> +
> + The intent is for applications compiled against rds.h
> + to be able to query and find out what features the
> + driver supports.
Is that enough Documentation for somebody to make use of this file
without having to do a deep dive into the kernel sources? If i need to
do a deep dive, i might just as well handle the EOPNOTSUPP return
values.
> +static ssize_t features_show(struct kobject *kobj, struct kobj_attribute *attr,
> + char *buf)
> +{
> + return snprintf(buf, PAGE_SIZE, "get_tos\n"
> + "set_tos\n"
> + "socket_cancel_sent_to\n"
> + "socket_get_mr\n"
> + "socket_free_mr\n"
> + "socket_recverr\n"
> + "socket_cong_monitor\n"
> + "socket_get_mr_for_dest\n"
> + "socket_so_transport\n"
> + "socket_so_rxpath_latency\n");
This is ABI. User space is going to start parsing this. Maybe we
should add both here, and in the documentation, something like:
New lines will be added at random places within the file as new
features are added.
This makes it clear that any code which tests line 4 for
"socket_free_mr" could break in the future. The whole file needs to be
searched for a feature.
Andrew
next prev parent reply other threads:[~2025-06-16 19:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 22:39 [PATCH v2] Expose RDS features via sysfs Konrad Rzeszutek Wilk
2025-06-11 22:39 ` [PATCH v2] rds: Expose feature parameters " Konrad Rzeszutek Wilk
2025-06-11 22:44 ` Konrad Rzeszutek Wilk
2025-06-13 15:21 ` Andrew Lunn
2025-06-16 18:40 ` Konrad Rzeszutek Wilk
2025-06-16 19:01 ` Andrew Lunn [this message]
2025-06-14 2:42 ` Allison Henderson
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=b71efc64-89b7-4f4b-af0e-9bf081cc9518@lunn.ch \
--to=andrew@lunn.ch \
--cc=allison.henderson@oracle.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-rdma@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
--cc=tj@kernel.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).