Commit graph

11 commits

Author SHA1 Message Date
Chris Friedt bc4374b5fe posix: deprecate POSIX_MAX_FDS and add POSIX_DEVICE_IO
The POSIX_MAX_FDS option does not correspond to any standard
POSIX option. It was used to define the size of the file
descriptor table, which is by no means exclusively used by
POSIX (also net, fs, ...).

POSIX_MAX_FDS is being deprecated in order to ensure that
Zephyr's POSIX Kconfig variables correspond to those defined in
the specification, as of IEEE 1003.1-2017. Namely,
POSIX_OPEN_MAX. CONFIG_POSIX_MAX_OPEN_FILES is being deprecated
for the same reason.

To mitigate any possible layering violations, that option is
not user selectable. It tracks the newly added
CONFIG_ZVFS_OPEN_MAX option, which is native to Zephyr.

With this deprecation, we introduce the following Kconfig
options that map directly to standard POSIX Option Groups by
simply removing "CONFIG_":

* CONFIG_POSIX_DEVICE_IO

Similarly, with this deprecation, we introduce the following
Kconfig options that map directly to standard POSIX Options by
simply removing "CONFIG":

* CONFIG_POSIX_OPEN_MAX

In order to maintain parity with the current feature set, we
introduce the following Kconfig options.

* CONFIG_POSIX_DEVICE_IO_ALIAS_CLOSE
* CONFIG_POSIX_DEVICE_IO_ALIAS_OPEN
* CONFIG_POSIX_DEVICE_IO_ALIAS_READ
* CONFIG_POSIX_DEVICE_IO_ALIAS_WRITE

Gate open(), close(), read(), and write() via the
CONFIG_POSIX_DEVICE_IO Kconfig option and move
implementations into device_io.c, to be conformant with the
spec.

Lastly, stage function names for upcoming ZVFS work, to be
completed as part of the LTSv3 Roadmap (e.g. zvfs_open(), ..).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00
Jukka Rissanen 5c3fa85bc8 samples: net: Change to use CONFIG_POSIX_API
Change the sample applications that use network socket API to
use the POSIX_API config because the NET_SOCKETS_POSIX_NAMES is
deprecated. Convert also the zsock_ API calls to plain BSD
socket API calls when applicable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen 1dc8249fcd samples: net: zperf: Increase the polled fd count
We need more polled fd count so that socket services work ok.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-18 20:13:31 +01:00
Reto Schneider c646a5576a net: zperf: Fix SO_RCVTIMEO dependency
Since 6c30c9ac47 (samples: net: zperf:
Rewrite upload part to use sockets), zperf uses SO_RCVTIMEO in UDP mode,
hence must depend on/enable support for it.

Without SO_RCVTIMEO support, zperf fails like this:
> nb_packets=47   delay=188964    adjust=-13
> setsockopt error (109)
> setsockopt error (109)
> -
> Upload completed!
> LAST PACKET NOT RECEIVED!!!
> Statistics:             server  (client)
> Duration:               0 us    (10.19 s)
> Num packets:            0       (50)
> Num packets out order:  0
> Num packets lost:       0
> Jitter:                 0 us
> Rate:                   0 Kbps  (9 Kbps)

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-12-15 17:14:26 +01:00
Robert Lubos 2091b34820 net: zperf: Extract zperf into library
Make a library out of the zperf shell sample. This makes to enable the
module in any application, not only the dedicated sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-10 11:15:21 +02:00
Robert Lubos 6c30c9ac47 samples: net: zperf: Rewrite upload part to use sockets
Rewrite TCP/UDP upload part of the zperf sample to use socket API
instead of net_context. This has a negligible impact on the upload
throughputs (< 1 Mbps).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-06-23 11:10:34 +02:00
Jukka Rissanen b9f6bdfe08 samples: net: zperf: Fix TCP download command
The TCP download command was not handling TCP session and
connection closing properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-13 01:52:09 +01:00
Jakub Rzeszutko 1a220b4e80 shell: decrease built-in commands flash usage
Rephrase some help messages to decrease flash usage.
Deactivate shell history feature for test test_netusb_rndis

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-04 15:53:02 -05:00
Jukka Rissanen 7cd17d58ca samples: net: zperf: Convert to use the new shell
Use new shell instead of the legacy one. This commit also fixes
the configuration file mess and allows the program to be run on
more hardware.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-15 11:14:02 +03:00
Flavio Santes e5d0b8f93e samples/net/zperf: Delete symbolic link
Remove the symbolic link.
Update the Makefile.
Rename README as README.rst and restructure its content.

Change-Id: Ic74e91749fc0bbf728e528b49e99a87188f84e6d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-15 01:16:55 +00:00
jgarcia 7b8d89d921 net:apps: zperf application
zperf is a network traffic generator for Zephyr.
Same application is able to work dynamically in client or server mode.
It allows to assess network bandwidth.
zperf is compliant with iperf_2.0.5.
zperf can be run in micro or nano kernel.

Change-Id: Icbd69e1ad56ad29c678b098e7a2e07c44f90e48e
Signed-off-by: jgarcia <jeremie.garcia@intel.com>
2016-04-18 06:07:02 +00:00