<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/net/nfs.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>net: nfs: Move most NFS code to common files</title>
<updated>2026-01-15T10:09:28+00:00</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-12-12T11:32:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3bc1197e3d7c54bcbd2dfb481cb4a9ae47f3e8d3'/>
<id>3bc1197e3d7c54bcbd2dfb481cb4a9ae47f3e8d3</id>
<content type='text'>
Move most of the NFS code into common files so that it can be used by an
lwIP port of NFS.

Acked-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move most of the NFS code into common files so that it can be used by an
lwIP port of NFS.

Acked-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Remove duplicate newlines</title>
<updated>2024-07-15T18:12:18+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2024-07-13T13:19:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=218a32d6e61fdf1cc50740d5f139ef1b4c226a32'/>
<id>218a32d6e61fdf1cc50740d5f139ef1b4c226a32</id>
<content type='text'>
Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: nfs: remove superfluous packed attribute</title>
<updated>2019-09-04T16:37:19+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-09-02T22:05:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5a5d1def59024dd3225e2a6142f8ee3ee10180a8'/>
<id>5a5d1def59024dd3225e2a6142f8ee3ee10180a8</id>
<content type='text'>
With GCC 9.2.1 net/nfs.c leads to multiple errors of type
address-of-packed-member.

net/nfs.c: In function ‘rpc_req’:
net/nfs.c:199:18: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  199 |  p = (uint32_t *)&amp;(rpc_pkt.u.call.data);
      |                  ^~~~~~~~~~~~~~~~~~~~~~
net/nfs.c: In function ‘nfs_readlink_reply’:
net/nfs.c:631:46: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  631 |    nfs3_get_attributes_offset(rpc_pkt.u.reply.data);
      |                               ~~~~~~~~~~~~~~~^~~~~
  LD      drivers/block/built-in.o
net/nfs.c: In function ‘nfs_read_reply’:
net/nfs.c:692:46: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  692 |    nfs3_get_attributes_offset(rpc_pkt.u.reply.data);
      |                               ~~~~~~~~~~~~~~~^~~~~

struct rpc_t is only used as local variable. It is naturally packed. So
there is no need for the attribute packed.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With GCC 9.2.1 net/nfs.c leads to multiple errors of type
address-of-packed-member.

net/nfs.c: In function ‘rpc_req’:
net/nfs.c:199:18: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  199 |  p = (uint32_t *)&amp;(rpc_pkt.u.call.data);
      |                  ^~~~~~~~~~~~~~~~~~~~~~
net/nfs.c: In function ‘nfs_readlink_reply’:
net/nfs.c:631:46: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  631 |    nfs3_get_attributes_offset(rpc_pkt.u.reply.data);
      |                               ~~~~~~~~~~~~~~~^~~~~
  LD      drivers/block/built-in.o
net/nfs.c: In function ‘nfs_read_reply’:
net/nfs.c:692:46: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  692 |    nfs3_get_attributes_offset(rpc_pkt.u.reply.data);
      |                               ~~~~~~~~~~~~~~~^~~~~

struct rpc_t is only used as local variable. It is naturally packed. So
there is no need for the attribute packed.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Correct size of NFS buffers</title>
<updated>2018-07-26T19:08:19+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2018-07-04T00:22:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2d114b83a7e44d448b6ffe1bf5e2ced11b769ab2'/>
<id>2d114b83a7e44d448b6ffe1bf5e2ced11b769ab2</id>
<content type='text'>
Reported-by: Coverity (CID: 152888)
Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported-by: Coverity (CID: 152888)
Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDX: Convert all of our single license tags to Linux Kernel style</title>
<updated>2018-05-07T13:34:12+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-05-06T21:58:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=83d290c56fab2d38cd1ab4c4cc7099559c1d5046'/>
<id>83d290c56fab2d38cd1ab4c4cc7099559c1d5046</id>
<content type='text'>
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: nfs: Drop CONFIG_NFS_READ_SIZE</title>
<updated>2017-09-07T18:23:52+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2017-08-21T02:40:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0b1e58067202316680423a6aafa73a9828ee07cc'/>
<id>0b1e58067202316680423a6aafa73a9828ee07cc</id>
<content type='text'>
In the general case, CONFIG_NFS_READ_SIZE is unchanged from the default
of 1024.  There are in fact no in-tree users that increase this size.
Adjust the comment to reflect what could be done in the future in
conjunction with CONFIG_IP_DEFRAG.

Cc: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the general case, CONFIG_NFS_READ_SIZE is unchanged from the default
of 1024.  There are in fact no in-tree users that increase this size.
Adjust the comment to reflect what could be done in the future in
conjunction with CONFIG_IP_DEFRAG.

Cc: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Use packed structures for networking</title>
<updated>2017-08-07T20:18:31+00:00</updated>
<author>
<name>Denis Pynkin</name>
<email>denis.pynkin@collabora.com</email>
</author>
<published>2017-07-21T16:28:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=704f3acfcf55343043bbed01c5fb0a0094a68e8a'/>
<id>704f3acfcf55343043bbed01c5fb0a0094a68e8a</id>
<content type='text'>
PXE boot is broken with GCC 7.1 due option '-fstore-merging' enabled
by default for '-O2':

BOOTP broadcast 1
data abort
pc : [&lt;8ff8bb30&gt;]          lr : [&lt;00004f1f&gt;]
reloc pc : [&lt;17832b30&gt;]    lr : [&lt;878abf1f&gt;]
sp : 8f558bc0  ip : 00000000     fp : 8ffef5a4
r10: 8ffed248  r9 : 8f558ee0     r8 : 8ffef594
r7 : 0000000e  r6 : 8ffed700     r5 : 00000000  r4 : 8ffed74e
r3 : 00060101  r2 : 8ffed230     r1 : 8ffed706  r0 : 00000ddd
Flags: nzcv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

Core reason is usage of structures for network headers without packed
attribute.

Reviewed-by: Yauheni Kaliuta &lt;yauheni.kaliuta@redhat.com&gt;
Signed-off-by: Denis Pynkin &lt;denis.pynkin@collabora.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PXE boot is broken with GCC 7.1 due option '-fstore-merging' enabled
by default for '-O2':

BOOTP broadcast 1
data abort
pc : [&lt;8ff8bb30&gt;]          lr : [&lt;00004f1f&gt;]
reloc pc : [&lt;17832b30&gt;]    lr : [&lt;878abf1f&gt;]
sp : 8f558bc0  ip : 00000000     fp : 8ffef5a4
r10: 8ffed248  r9 : 8f558ee0     r8 : 8ffef594
r7 : 0000000e  r6 : 8ffed700     r5 : 00000000  r4 : 8ffed74e
r3 : 00060101  r2 : 8ffed230     r1 : 8ffed706  r0 : 00000ddd
Flags: nzcv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

Core reason is usage of structures for network headers without packed
attribute.

Reviewed-by: Yauheni Kaliuta &lt;yauheni.kaliuta@redhat.com&gt;
Signed-off-by: Denis Pynkin &lt;denis.pynkin@collabora.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "net: nfs: Correct the reply data buffer size"</title>
<updated>2016-09-09T18:13:41+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2016-09-09T18:01:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=11e8ec96dcff19ac0e0232a1ae10999398d64e3b'/>
<id>11e8ec96dcff19ac0e0232a1ae10999398d64e3b</id>
<content type='text'>
This reverts commit 6279b49e6c2fdaf8665355d1777bc90cd41fcf90.

This caused a bad data crc.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reported-by: Guillaume GARDET &lt;guillaume.gardet@free.fr&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 6279b49e6c2fdaf8665355d1777bc90cd41fcf90.

This caused a bad data crc.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reported-by: Guillaume GARDET &lt;guillaume.gardet@free.fr&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: nfs: Correct the reply data buffer size</title>
<updated>2016-08-22T19:20:36+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2016-08-15T20:03:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6279b49e6c2fdaf8665355d1777bc90cd41fcf90'/>
<id>6279b49e6c2fdaf8665355d1777bc90cd41fcf90</id>
<content type='text'>
The type of the buffer is uint32_t, but the parameter used to size it
is referring to bytes. Divide by the size of the array elements.

Strictly speaking, this shouldn't be needed at all... It could just be 1
just like the request.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The type of the buffer is uint32_t, but the parameter used to size it
is referring to bytes. Divide by the size of the array elements.

Strictly speaking, this shouldn't be needed at all... It could just be 1
just like the request.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: NFS: Add NFSv3 support</title>
<updated>2016-08-22T19:20:20+00:00</updated>
<author>
<name>Guillaume GARDET</name>
<email>guillaume.gardet@free.fr</email>
</author>
<published>2016-07-29T09:31:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b0baca9820485507a3ec0e5b403a6bf0a57ff2fc'/>
<id>b0baca9820485507a3ec0e5b403a6bf0a57ff2fc</id>
<content type='text'>
This patch enables NFSv3 support.
If NFSv2 is available use it as usual.
If NFSv2 is not available, but NFSv3 is available, use NFSv3.
If NFSv2 and NFSv3 are not available, print an error message since NFSv4 is not supported.

Tested on iMX6 sabrelite with 4 Linux NFS servers:
  * NFSv2 + NFSv3 + NFSv4 server: use NFSv2 protocol
  * NFSv2 + NFSv3 server: use NFSv2 protocol
  * NFSv3 + NFSv4 server: use NFSv3 protocol
  * NFSv3 server: use NFSv3 protocol

Signed-off-by: Guillaume GARDET &lt;guillaume.gardet@free.fr&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: joe.hershberger@ni.com
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables NFSv3 support.
If NFSv2 is available use it as usual.
If NFSv2 is not available, but NFSv3 is available, use NFSv3.
If NFSv2 and NFSv3 are not available, print an error message since NFSv4 is not supported.

Tested on iMX6 sabrelite with 4 Linux NFS servers:
  * NFSv2 + NFSv3 + NFSv4 server: use NFSv2 protocol
  * NFSv2 + NFSv3 server: use NFSv2 protocol
  * NFSv3 + NFSv4 server: use NFSv3 protocol
  * NFSv3 server: use NFSv3 protocol

Signed-off-by: Guillaume GARDET &lt;guillaume.gardet@free.fr&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: joe.hershberger@ni.com
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
