<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/tools/net, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge tag 'nfsd-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux</title>
<updated>2026-10-26T01:12:41+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-26T01:12:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=47439bb1635e8dd9245e876c2046b66a9b6f9400'/>
<id>47439bb1635e8dd9245e876c2046b66a9b6f9400</id>
<content type='text'>
Pull nfsd updates from Chuck Lever:
 "Jeff Layton extended the netlink listener-set operation so that
  a management daemon can register NFSD's programs with rpcbind
  itself. This prevents an unresponsive rpcbind from stalling NFSD
  administration for a minute at a time.

  Bulk delegation recall now adjusts the number of delegations it
  wants returned, based on memory pressure. The previous mechanism
  was spec-conformant, but it requested all delegations to be
  returned at once. Clients are free to return few or none in such
  cases, but requesting smaller batches of delegations is more
  neighborly.

  In preparation for handling TLS KeyUpdate, the server's TCP
  receive path has been reworked to handle control records. In the
  process, the use of sock_recvmsg was replaced with -&gt;read_sock,
  which contends less with other holders of the socket lock.

  NFSv2 XDR code is now generated by xdrgen, which mechanically
  generates the encoders and decoders from the RPC language
  specification for the protocol. Replacing hand-built XDR code
  makes prototyping new protocol elements faster, reduces errors,
  and improves memory safety. Replacement of XDR code for newer NFS
  versions will continue in subsequent releases of NFSD.

  The remaining bulk of changes in v7.4 is bug fixes, clean-ups, and
  small optimizations. Sincere thanks to all contributors,
  reviewers, testers, and bug reporters who participated in the v7.4
  NFSD development cycle"

* tag 'nfsd-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (184 commits)
  SUNRPC: use assign_bit() where applicable
  nfsd: Fix id-to-name cache entry leak in idtoname_parse()
  NFSD: Use xdrgen XDR functions for NFSv2 READDIR results
  NFSD: Refactor NFSv2 directory cookie encoding
  NFSD: Add a streaming directory reader
  NFSD: Use xdrgen XDR functions for NFSv2 READDIR arguments
  NFSD: Use xdrgen XDR functions for the NFSv2 STATFS procedure
  NFSD: Use xdrgen XDR functions for NFSv2 RMDIR procedure
  NFSD: Use xdrgen XDR functions for NFSv2 MKDIR procedure
  NFSD: Use xdrgen XDR functions for NFSv2 SYMLINK procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 LINK procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 RENAME procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 REMOVE procedure
  NFSD: Use xdrgen XDR functions for NFSv2 CREATE procedure
  NFSD: Refactor nfsd_proc_create()
  NFSD: Use xdrgen XDR functions for NFSv2 WRITE procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 WRITECACHE procedure
  NFSD: Use xdrgen XDR functions for NFSv2 READ procedure
  NFSD: Use xdrgen XDR functions for NFSv2 READLINK procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 LOOKUP procedure
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull nfsd updates from Chuck Lever:
 "Jeff Layton extended the netlink listener-set operation so that
  a management daemon can register NFSD's programs with rpcbind
  itself. This prevents an unresponsive rpcbind from stalling NFSD
  administration for a minute at a time.

  Bulk delegation recall now adjusts the number of delegations it
  wants returned, based on memory pressure. The previous mechanism
  was spec-conformant, but it requested all delegations to be
  returned at once. Clients are free to return few or none in such
  cases, but requesting smaller batches of delegations is more
  neighborly.

  In preparation for handling TLS KeyUpdate, the server's TCP
  receive path has been reworked to handle control records. In the
  process, the use of sock_recvmsg was replaced with -&gt;read_sock,
  which contends less with other holders of the socket lock.

  NFSv2 XDR code is now generated by xdrgen, which mechanically
  generates the encoders and decoders from the RPC language
  specification for the protocol. Replacing hand-built XDR code
  makes prototyping new protocol elements faster, reduces errors,
  and improves memory safety. Replacement of XDR code for newer NFS
  versions will continue in subsequent releases of NFSD.

  The remaining bulk of changes in v7.4 is bug fixes, clean-ups, and
  small optimizations. Sincere thanks to all contributors,
  reviewers, testers, and bug reporters who participated in the v7.4
  NFSD development cycle"

* tag 'nfsd-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (184 commits)
  SUNRPC: use assign_bit() where applicable
  nfsd: Fix id-to-name cache entry leak in idtoname_parse()
  NFSD: Use xdrgen XDR functions for NFSv2 READDIR results
  NFSD: Refactor NFSv2 directory cookie encoding
  NFSD: Add a streaming directory reader
  NFSD: Use xdrgen XDR functions for NFSv2 READDIR arguments
  NFSD: Use xdrgen XDR functions for the NFSv2 STATFS procedure
  NFSD: Use xdrgen XDR functions for NFSv2 RMDIR procedure
  NFSD: Use xdrgen XDR functions for NFSv2 MKDIR procedure
  NFSD: Use xdrgen XDR functions for NFSv2 SYMLINK procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 LINK procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 RENAME procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 REMOVE procedure
  NFSD: Use xdrgen XDR functions for NFSv2 CREATE procedure
  NFSD: Refactor nfsd_proc_create()
  NFSD: Use xdrgen XDR functions for NFSv2 WRITE procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 WRITECACHE procedure
  NFSD: Use xdrgen XDR functions for NFSv2 READ procedure
  NFSD: Use xdrgen XDR functions for NFSv2 READLINK procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 LOOKUP procedure
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>netlink: specs: add genetlink-legacy spec for GTP</title>
<updated>2026-10-21T09:37:08+00:00</updated>
<author>
<name>Anil Kaushik</name>
<email>anilkaushikwireless@gmail.com</email>
</author>
<published>2026-10-16T09:32:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8a2f9964fc28954cef5a39e3636690d83cff3951'/>
<id>8a2f9964fc28954cef5a39e3636690d83cff3951</id>
<content type='text'>
The GTP (GPRS Tunnelling Protocol, user plane) generic netlink family
has no YAML specification under Documentation/netlink/specs/, so it
cannot be consumed by the ynl tooling used for user-space clients,
documentation and selftests.

Add a genetlink-legacy spec describing the existing family: the PDP
context management commands (NEWPDP, DELPDP, GETPDP) and the GTP-U echo
request (ECHOREQ), the GTPA_* attribute set, and the "gtp" multicast
group. Command and attribute values are taken from
include/uapi/linux/gtp.h and match it one-to-one. The request
attributes of each command are the ones its handler in
drivers/net/gtp.c reads, and the reply attributes the ones
gtp_genl_fill_info() emits.

The notifications sent on the "gtp" group are not described: they reuse
the command values of the NEWPDP, DELPDP and ECHOREQ requests, which
the ynl code generator cannot express with the existing uapi header.
The family doc says so.

Add the matching CFLAGS_gtp entry to tools/net/ynl/Makefile.deps, so
the generated code is built against the tree's gtp.h instead of an
older one installed on the host.

This only adds the description; there is no kernel code or uapi change.

Signed-off-by: Anil Kaushik &lt;anilkaushikwireless@gmail.com&gt;
Link: https://patch.msgid.link/20261016093225.1036375-4-anilkaushikwireless@gmail.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The GTP (GPRS Tunnelling Protocol, user plane) generic netlink family
has no YAML specification under Documentation/netlink/specs/, so it
cannot be consumed by the ynl tooling used for user-space clients,
documentation and selftests.

Add a genetlink-legacy spec describing the existing family: the PDP
context management commands (NEWPDP, DELPDP, GETPDP) and the GTP-U echo
request (ECHOREQ), the GTPA_* attribute set, and the "gtp" multicast
group. Command and attribute values are taken from
include/uapi/linux/gtp.h and match it one-to-one. The request
attributes of each command are the ones its handler in
drivers/net/gtp.c reads, and the reply attributes the ones
gtp_genl_fill_info() emits.

The notifications sent on the "gtp" group are not described: they reuse
the command values of the NEWPDP, DELPDP and ECHOREQ requests, which
the ynl code generator cannot express with the existing uapi header.
The family doc says so.

Add the matching CFLAGS_gtp entry to tools/net/ynl/Makefile.deps, so
the generated code is built against the tree's gtp.h instead of an
older one installed on the host.

This only adds the description; there is no kernel code or uapi change.

Signed-off-by: Anil Kaushik &lt;anilkaushikwireless@gmail.com&gt;
Link: https://patch.msgid.link/20261016093225.1036375-4-anilkaushikwireless@gmail.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netlink: specs: Add a spec for nexthops in rtnetlink</title>
<updated>2026-10-21T02:40:16+00:00</updated>
<author>
<name>Demos Ra</name>
<email>demosthenes.ra@gmail.com</email>
</author>
<published>2026-10-19T06:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=457dc9fefe9aed6505502d20930d9dec4b10eabc'/>
<id>457dc9fefe9aed6505502d20930d9dec4b10eabc</id>
<content type='text'>
Add a YNL spec for nexthop objects and nexthop buckets in rtnetlink.

./tools/net/ynl/pyynl/cli.py \
    --spec Documentation/netlink/specs/rt-nexthop.yaml \
    --dump getnexthop

Exclude newnexthopbucket-ntf from the C code generation. ynl_gen_c.py
looks up a classic notification by the request of the same message
type, and no request uses RTM_NEWNEXTHOPBUCKET. The spec keeps the
notification, so the Python tools can still subscribe to it.

Signed-off-by: Demos Ra &lt;demosthenes.ra@gmail.com&gt;
Link: https://patch.msgid.link/20261019-rt-nexthop-spec-v1-1-9c586edf86ab@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a YNL spec for nexthop objects and nexthop buckets in rtnetlink.

./tools/net/ynl/pyynl/cli.py \
    --spec Documentation/netlink/specs/rt-nexthop.yaml \
    --dump getnexthop

Exclude newnexthopbucket-ntf from the C code generation. ynl_gen_c.py
looks up a classic notification by the request of the same message
type, and no request uses RTM_NEWNEXTHOPBUCKET. The spec keeps the
notification, so the Python tools can still subscribe to it.

Signed-off-by: Demos Ra &lt;demosthenes.ra@gmail.com&gt;
Link: https://patch.msgid.link/20261019-rt-nexthop-spec-v1-1-9c586edf86ab@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netlink: specs: rt-route: add lwtunnel encap sub-message support</title>
<updated>2026-10-15T23:59:58+00:00</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@kylinos.cn</email>
</author>
<published>2026-10-08T08:24:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=24d11a55860be75a6b478e4e4ba8adb419c19661'/>
<id>24d11a55860be75a6b478e4e4ba8adb419c19661</id>
<content type='text'>
Define encap-type enum (LWTUNNEL_ENCAP_*) and add encap-data sub-message
keyed by encap-type. Add tunnel attribute sets (mpls, ip, ila, ip6, seg6,
bpf, seg6-local, rpl, ioam6, xfrm). This spec update depends on the kernel
side encap-type/data reorder patch.

Keep some nested option attributes as binary in this patch to simplify
review; they will be converted in follow-up patches.

Also add the Makefile to include uapi headers. Note the lwtunnel.h
is guarded by _UAPI_LWTUNNEL_H_.

Signed-off-by: Hangbin Liu &lt;liuhangbin@kylinos.cn&gt;
Link: https://patch.msgid.link/20261008-ynl_rt_encap-v4-3-4ed2ccf7f949@kylinos.cn
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Define encap-type enum (LWTUNNEL_ENCAP_*) and add encap-data sub-message
keyed by encap-type. Add tunnel attribute sets (mpls, ip, ila, ip6, seg6,
bpf, seg6-local, rpl, ioam6, xfrm). This spec update depends on the kernel
side encap-type/data reorder patch.

Keep some nested option attributes as binary in this patch to simplify
review; they will be converted in follow-up patches.

Also add the Makefile to include uapi headers. Note the lwtunnel.h
is guarded by _UAPI_LWTUNNEL_H_.

Signed-off-by: Hangbin Liu &lt;liuhangbin@kylinos.cn&gt;
Link: https://patch.msgid.link/20261008-ynl_rt_encap-v4-3-4ed2ccf7f949@kylinos.cn
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: ynl: convert enum selector to string for sub-message parsing</title>
<updated>2026-10-15T23:59:58+00:00</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@kylinos.cn</email>
</author>
<published>2026-10-08T08:24:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=05d3030eff5b73f6fe7f86dafa3eeae004e2ede1'/>
<id>05d3030eff5b73f6fe7f86dafa3eeae004e2ede1</id>
<content type='text'>
YNL sub-message parsing expects a string selector for strcmp(). So for
non-external enum selectors, convert the integer value to its string form
via the family's {enum}_str() helper. This enables correct decoding of
sub-messages keyed by enum values.

After the change, if there is no encap_type (e.g. previous ordering on
older kernels), or a new encap_type is missing from the spec file in
future kernel, the code will report "Sub-message key not set", the same
with string lookup fails. With the subsequent rt-route encap spec update,
the newly generated code will look like:

	if (!dst-&gt;_present.encap_type)
		return ynl_submsg_failed(yarg, "encap", "encap-type");
	encap_type_str = rt_route_encap_type_str(dst-&gt;encap_type);
	if (!encap_type_str)
		return ynl_submsg_failed(yarg, "encap", "enum-lookup-failed");
	if (rt_route_encap_data_parse(&amp;parg, encap_type_str, attr))
		return YNL_PARSE_CB_ERROR;

Signed-off-by: Hangbin Liu &lt;liuhangbin@kylinos.cn&gt;
Link: https://patch.msgid.link/20261008-ynl_rt_encap-v4-2-4ed2ccf7f949@kylinos.cn
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
YNL sub-message parsing expects a string selector for strcmp(). So for
non-external enum selectors, convert the integer value to its string form
via the family's {enum}_str() helper. This enables correct decoding of
sub-messages keyed by enum values.

After the change, if there is no encap_type (e.g. previous ordering on
older kernels), or a new encap_type is missing from the spec file in
future kernel, the code will report "Sub-message key not set", the same
with string lookup fails. With the subsequent rt-route encap spec update,
the newly generated code will look like:

	if (!dst-&gt;_present.encap_type)
		return ynl_submsg_failed(yarg, "encap", "encap-type");
	encap_type_str = rt_route_encap_type_str(dst-&gt;encap_type);
	if (!encap_type_str)
		return ynl_submsg_failed(yarg, "encap", "enum-lookup-failed");
	if (rt_route_encap_data_parse(&amp;parg, encap_type_str, attr))
		return YNL_PARSE_CB_ERROR;

Signed-off-by: Hangbin Liu &lt;liuhangbin@kylinos.cn&gt;
Link: https://patch.msgid.link/20261008-ynl_rt_encap-v4-2-4ed2ccf7f949@kylinos.cn
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xdrgen: Update the aggregate_members comment for optional-data lists</title>
<updated>2026-10-05T01:15:29+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>cel@kernel.org</email>
</author>
<published>2026-09-08T15:16:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a11fb8f725ea927d6e35e9f61c065f871285a901'/>
<id>a11fb8f725ea927d6e35e9f61c065f871285a901</id>
<content type='text'>
check_aggregate_directives() records an optional-data list member
in aggregate_members alongside a variable-length array member, but
the comment on the set still describes only the array form.

Name both member forms.

Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
check_aggregate_directives() records an optional-data list member
in aggregate_members alongside a variable-length array member, but
the comment on the set still describes only the array form.

Name both member forms.

Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xdrgen: Document that aggregate members of a struct share an element type</title>
<updated>2026-10-05T01:15:29+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>cel@kernel.org</email>
</author>
<published>2026-09-08T15:16:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e44471d1d03c8adb4f0a8fe85204507e51e3218c'/>
<id>e44471d1d03c8adb4f0a8fe85204507e51e3218c</id>
<content type='text'>
check_aggregate_directives() rejects a second marked member whose
element type differs from the first, because one hook set serves
every marked member of a struct and its item hook takes a single
element type. The README says the members share a hook set but
never states the restriction that follows from it, so a spec
author learns of it only from the diagnostic.

State the restriction where the shared hook set is described.

Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
check_aggregate_directives() rejects a second marked member whose
element type differs from the first, because one hook set serves
every marked member of a struct and its item hook takes a single
element type. The README says the members share a hook set but
never states the restriction that follows from it, so a spec
author learns of it only from the diagnostic.

State the restriction where the shared hook set is described.

Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xdrgen: Report unsupported client-side directives without a traceback</title>
<updated>2026-10-05T01:15:29+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>cel@kernel.org</email>
</author>
<published>2026-09-08T15:16:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f10ffc243355b3921271b3c4060214357128d0bf'/>
<id>f10ffc243355b3921271b3c4060214357128d0bf</id>
<content type='text'>
The struct and union emitters raise NotImplementedError when a
"pragma pages" or "pragma aggregate" member is generated for the
client peer. The source subcommand catches the parse and semantic
errors but not that one, so a client generation request for such a
specification emits partial output and then a Python traceback,
which buries the one line that says what is unsupported.

Catch the exception in the source subcommand and report its message
on stderr the way the other diagnostics are reported.

Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The struct and union emitters raise NotImplementedError when a
"pragma pages" or "pragma aggregate" member is generated for the
client peer. The source subcommand catches the parse and semantic
errors but not that one, so a client generation request for such a
specification emits partial output and then a Python traceback,
which buries the one line that says what is unsupported.

Catch the exception in the source subcommand and report its message
on stderr the way the other diagnostics are reported.

Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xdrgen: Reject a "pragma pages" union arm declared as an opaque</title>
<updated>2026-10-05T01:15:29+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>cel@kernel.org</email>
</author>
<published>2026-09-08T15:15:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aa41b1bc7520da91c2483e6237fd4658c69daf25'/>
<id>aa41b1bc7520da91c2483e6237fd4658c69daf25</id>
<content type='text'>
check_pages_directives() rejects a union arm declared directly as
a string, with a diagnostic pointing at the directive, but accepts
one declared directly as a variable-length opaque. The union
generator has no arm representation for a direct opaque, so
generation fails with an AttributeError from
emit_union_case_spec_definition() instead. A direct opaque arm was
never generated correctly, marked or not, but the pages validation
exists to report such a directive at its source position.

Extend the union-arm check to a direct variable-length opaque, so
both forms draw the same diagnostic.

Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
check_pages_directives() rejects a union arm declared directly as
a string, with a diagnostic pointing at the directive, but accepts
one declared directly as a variable-length opaque. The union
generator has no arm representation for a direct opaque, so
generation fails with an AttributeError from
emit_union_case_spec_definition() instead. A direct opaque arm was
never generated correctly, marked or not, but the pages validation
exists to report such a directive at its source position.

Extend the union-arm check to a direct variable-length opaque, so
both forms draw the same diagnostic.

Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xdrgen: Stream optional-data aggregate lists during encode</title>
<updated>2026-10-05T01:15:29+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>cel@kernel.org</email>
</author>
<published>2026-09-08T13:42:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1e7f9d30d519d3df6953d4ab6a045063bb8b5896'/>
<id>1e7f9d30d519d3df6953d4ab6a045063bb8b5896</id>
<content type='text'>
The optional-data aggregate encoder loops cursor.count times, so the
begin hook must report the element count before the first element is
written.  A producer that reads its elements while the reply is
encoded -- NFSv2 READDIR streaming directory entries straight into the
send buffer -- does not know that count in advance, and would have to
materialize the whole list just to satisfy the loop bound.

An optional-data list carries no count on the wire, so nothing forces
one on the encoder.  Drive it from the item hook instead: a false
return ends the list, and the framing writes the terminator.

The counted-array form and its hook contract are unchanged.  No
in-tree spec marks an optional-data member yet, so no generated code
changes here.

Acked-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Link: https://patch.msgid.link/20260908134234.512312-11-cel@kernel.org
Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The optional-data aggregate encoder loops cursor.count times, so the
begin hook must report the element count before the first element is
written.  A producer that reads its elements while the reply is
encoded -- NFSv2 READDIR streaming directory entries straight into the
send buffer -- does not know that count in advance, and would have to
materialize the whole list just to satisfy the loop bound.

An optional-data list carries no count on the wire, so nothing forces
one on the encoder.  Drive it from the item hook instead: a false
return ends the list, and the framing writes the terminator.

The counted-array form and its hook contract are unchanged.  No
in-tree spec marks an optional-data member yet, so no generated code
changes here.

Acked-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Link: https://patch.msgid.link/20260908134234.512312-11-cel@kernel.org
Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
