All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xdrgen: Add a utility for extracting XDR from RFCs
@ 2024-10-07 18:07 cel
  2024-10-07 18:17 ` Jeff Layton
  0 siblings, 1 reply; 3+ messages in thread
From: cel @ 2024-10-07 18:07 UTC (permalink / raw)
  To: Jeff Layton; +Cc: linux-nfs, Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

For convenience, copy the XDR extraction script from RFC

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 tools/net/sunrpc/extract.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100755 tools/net/sunrpc/extract.sh

diff --git a/tools/net/sunrpc/extract.sh b/tools/net/sunrpc/extract.sh
new file mode 100755
index 000000000000..13b0036eaa81
--- /dev/null
+++ b/tools/net/sunrpc/extract.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+#
+# Extract an RPC protocol specification from an RFC document.
+# The version of this script comes from RFC 8166.
+#
+# Usage:
+#  $ extract.sh < rfcNNNN.txt > protocol.x
+#
+
+grep '^ *///' | sed 's?^ */// ??' | sed 's?^ *///$??'
-- 
2.46.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xdrgen: Add a utility for extracting XDR from RFCs
  2024-10-07 18:07 [PATCH] xdrgen: Add a utility for extracting XDR from RFCs cel
@ 2024-10-07 18:17 ` Jeff Layton
  2024-10-07 18:23   ` Chuck Lever III
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2024-10-07 18:17 UTC (permalink / raw)
  To: cel; +Cc: linux-nfs, Chuck Lever

On Mon, 2024-10-07 at 14:07 -0400, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> For convenience, copy the XDR extraction script from RFC
> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>  tools/net/sunrpc/extract.sh | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>  create mode 100755 tools/net/sunrpc/extract.sh
> 
> diff --git a/tools/net/sunrpc/extract.sh b/tools/net/sunrpc/extract.sh
> new file mode 100755
> index 000000000000..13b0036eaa81
> --- /dev/null
> +++ b/tools/net/sunrpc/extract.sh
> @@ -0,0 +1,10 @@
> +#! /bin/sh
> +#
> +# Extract an RPC protocol specification from an RFC document.
> +# The version of this script comes from RFC 8166.
> +#
> +# Usage:
> +#  $ extract.sh < rfcNNNN.txt > protocol.x
> +#
> +
> +grep '^ *///' | sed 's?^ */// ??' | sed 's?^ *///$??'

It might be nice to mention where to get the versions of the .txt files
that have the "///" annotation before the source code bits. Are those
available somewhere?

Reviewed-by: Jeff Layton <jlayton@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xdrgen: Add a utility for extracting XDR from RFCs
  2024-10-07 18:17 ` Jeff Layton
@ 2024-10-07 18:23   ` Chuck Lever III
  0 siblings, 0 replies; 3+ messages in thread
From: Chuck Lever III @ 2024-10-07 18:23 UTC (permalink / raw)
  To: Jeff Layton; +Cc: Chuck Lever, Linux NFS Mailing List



> On Oct 7, 2024, at 2:17 PM, Jeff Layton <jlayton@kernel.org> wrote:
> 
> On Mon, 2024-10-07 at 14:07 -0400, cel@kernel.org wrote:
>> From: Chuck Lever <chuck.lever@oracle.com>
>> 
>> For convenience, copy the XDR extraction script from RFC
>> 
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>> ---
>> tools/net/sunrpc/extract.sh | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>> create mode 100755 tools/net/sunrpc/extract.sh
>> 
>> diff --git a/tools/net/sunrpc/extract.sh b/tools/net/sunrpc/extract.sh
>> new file mode 100755
>> index 000000000000..13b0036eaa81
>> --- /dev/null
>> +++ b/tools/net/sunrpc/extract.sh
>> @@ -0,0 +1,10 @@
>> +#! /bin/sh
>> +#
>> +# Extract an RPC protocol specification from an RFC document.
>> +# The version of this script comes from RFC 8166.
>> +#
>> +# Usage:
>> +#  $ extract.sh < rfcNNNN.txt > protocol.x
>> +#
>> +
>> +grep '^ *///' | sed 's?^ */// ??' | sed 's?^ *///$??'
> 
> It might be nice to mention where to get the versions of the .txt files
> that have the "///" annotation before the source code bits. Are those
> available somewhere?

That kind of index would be appropriate to store under
Documentation/sunrpc/xdr/ .

Or you can edit the extracted .x file to include that
information as a comment, which is what I've been doing
when the extracted .x does not already have that
information. For example:

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=xdrgen&id=ea22fd02cf4aed2eb6dfaaeb5738dcca366c11de


--
Chuck Lever



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-07 18:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 18:07 [PATCH] xdrgen: Add a utility for extracting XDR from RFCs cel
2024-10-07 18:17 ` Jeff Layton
2024-10-07 18:23   ` Chuck Lever III

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.