History log of /u-boot/net/nfs.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 5a5d1def 02-Sep-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

net: nfs: remove superfluous packed attribute

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 *)&(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 <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 2d114b83 03-Jul-2018 Joe Hershberger <joe.hershberger@ni.com>

net: Correct size of NFS buffers

Reported-by: Coverity (CID: 152888)
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

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 <trini@konsulko.com>

# 0b1e5806 20-Aug-2017 Tom Rini <trini@konsulko.com>

net: nfs: Drop CONFIG_NFS_READ_SIZE

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 <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 704f3acf 21-Jul-2017 Denis Pynkin <denis.pynkin@collabora.com>

net: Use packed structures for networking

PXE boot is broken with GCC 7.1 due option '-fstore-merging' enabled
by default for '-O2':

BOOTP broadcast 1
data abort
pc : [<8ff8bb30>] lr : [<00004f1f>]
reloc pc : [<17832b30>] lr : [<878abf1f>]
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 <yauheni.kaliuta@redhat.com>
Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 11e8ec96 09-Sep-2016 Joe Hershberger <joe.hershberger@ni.com>

Revert "net: nfs: Correct the reply data buffer size"

This reverts commit 6279b49e6c2fdaf8665355d1777bc90cd41fcf90.

This caused a bad data crc.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Guillaume GARDET <guillaume.gardet@free.fr>

# 6279b49e 15-Aug-2016 Joe Hershberger <joe.hershberger@ni.com>

net: nfs: Correct the reply data buffer size

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 <joe.hershberger@ni.com>

# b0baca98 29-Jul-2016 Guillaume GARDET <guillaume.gardet@free.fr>

net: NFS: Add NFSv3 support

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 <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@konsulko.com>
Cc: joe.hershberger@ni.com
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# d23d7bd7 15-Aug-2016 Joe Hershberger <joe.hershberger@ni.com>

net: nfs: Remove unused define

Unreferenced, so remove the noise.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 68c76a3a 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Clean up NFS variables and functions

Make a thorough pass through all variables and function names contained
within nfs.c and remove CamelCase and improve naming.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>

# c9f6c91b 15-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: nfs.* checkpatch compliance

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# bd931ca6 07-Aug-2009 Alessandro Rubini <rubini-list@gnudd.com>

nfs: accept CONFIG_NFS_READ_SIZE from config file

To take advantage of defragmented packets, the config file
can define CONFIG_NFS_READ_SIZE to override the 1kB default.
No support is there for an environment variable by now.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>

# 11dadd54 26-Feb-2004 wdenk <wdenk>

* Patch by Steven Scholz, 25 Feb 2004:
- Timeouts in FPGA code should be based on CFG_HZ
- Minor cleanup in code for Altera FPGA ACEX1K

* Patch by Steven Scholz, 25 Feb 2004:
Changed "Directory Hierarchy" section in README

* Patch by Masami Komiya, 25 Feb 2004:
Reduce copy count in nfs_read_reply() of NFS code

# cbd8a35c 23-Feb-2004 wdenk <wdenk>

* Patch by Masami Komiy, 22 Feb 2004:
Add support for NFS for file download

* Minor code cleanup

# 2d114b83 03-Jul-2018 Joe Hershberger <joe.hershberger@ni.com>

net: Correct size of NFS buffers

Reported-by: Coverity (CID: 152888)
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

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 <trini@konsulko.com>


# 0b1e5806 20-Aug-2017 Tom Rini <trini@konsulko.com>

net: nfs: Drop CONFIG_NFS_READ_SIZE

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 <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 704f3acf 21-Jul-2017 Denis Pynkin <denis.pynkin@collabora.com>

net: Use packed structures for networking

PXE boot is broken with GCC 7.1 due option '-fstore-merging' enabled
by default for '-O2':

BOOTP broadcast 1
data abort
pc : [<8ff8bb30>] lr : [<00004f1f>]
reloc pc : [<17832b30>] lr : [<878abf1f>]
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 <yauheni.kaliuta@redhat.com>
Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 11e8ec96 09-Sep-2016 Joe Hershberger <joe.hershberger@ni.com>

Revert "net: nfs: Correct the reply data buffer size"

This reverts commit 6279b49e6c2fdaf8665355d1777bc90cd41fcf90.

This caused a bad data crc.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Guillaume GARDET <guillaume.gardet@free.fr>


# 6279b49e 15-Aug-2016 Joe Hershberger <joe.hershberger@ni.com>

net: nfs: Correct the reply data buffer size

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 <joe.hershberger@ni.com>


# b0baca98 29-Jul-2016 Guillaume GARDET <guillaume.gardet@free.fr>

net: NFS: Add NFSv3 support

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 <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@konsulko.com>
Cc: joe.hershberger@ni.com
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# d23d7bd7 15-Aug-2016 Joe Hershberger <joe.hershberger@ni.com>

net: nfs: Remove unused define

Unreferenced, so remove the noise.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>


# 68c76a3a 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Clean up NFS variables and functions

Make a thorough pass through all variables and function names contained
within nfs.c and remove CamelCase and improve naming.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>


# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>


# c9f6c91b 15-May-2012 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: nfs.* checkpatch compliance

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>


# bd931ca6 07-Aug-2009 Alessandro Rubini <rubini-list@gnudd.com>

nfs: accept CONFIG_NFS_READ_SIZE from config file

To take advantage of defragmented packets, the config file
can define CONFIG_NFS_READ_SIZE to override the 1kB default.
No support is there for an environment variable by now.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>


# 11dadd54 26-Feb-2004 wdenk <wdenk>

* Patch by Steven Scholz, 25 Feb 2004:
- Timeouts in FPGA code should be based on CFG_HZ
- Minor cleanup in code for Altera FPGA ACEX1K

* Patch by Steven Scholz, 25 Feb 2004:
Changed "Directory Hierarchy" section in README

* Patch by Masami Komiya, 25 Feb 2004:
Reduce copy count in nfs_read_reply() of NFS code


# cbd8a35c 23-Feb-2004 wdenk <wdenk>

* Patch by Masami Komiy, 22 Feb 2004:
Add support for NFS for file download

* Minor code cleanup