Commit c4803752 authored by Robert Lubos's avatar Robert Lubos Committed by Henrik Brix Andersen
Browse files

net: Deprecate CONFIG_NET_SOCKETS_POLL_MAX



CONFIG_ZVFS_POLL_MAX is now used to control the maximum number of poll()
entires. Thereby, CONFIG_NET_SOCKETS_POLL_MAX is redundant and shall
be deprecated.

Modify the defaults for NET_SOCKETS_POLL_MAX and ZVS_POLL_MAX so that
the deprecation actually makes sense instead of symbol removal. In case
the application still sets the old config, it will modify the
ZVS_POLL_MAX default.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: default avatarChris Friedt <cfriedt@tenstorrent.com>
parent e82b2ea9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ Connection Options
Socket Options
**************

:kconfig:option:`CONFIG_NET_SOCKETS_POLL_MAX`
:kconfig:option:`CONFIG_ZVFS_POLL_MAX`
  Maximum number of supported poll() entries. One needs to select proper value here depending
  on how many BSD sockets are polled in the system.

+3 −0
Original line number Diff line number Diff line
@@ -474,6 +474,9 @@ Networking
* The ``work_q`` parameter to ``NET_SOCKET_SERVICE_SYNC_DEFINE`` and
  ``NET_SOCKET_SERVICE_SYNC_DEFINE_STATIC`` has been removed as it was always ignored. (:github:`79446`)

* Deprecated the :kconfig:option:`CONFIG_NET_SOCKETS_POLL_MAX` option in favour of
  :kconfig:option:`CONFIG_ZVFS_POLL_MAX`.

Other Subsystems
****************

+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ implementation of the POSIX API.
* :kconfig:option:`CONFIG_MSG_SIZE_MAX`
* :kconfig:option:`CONFIG_NET_SOCKETPAIR`
* :kconfig:option:`CONFIG_NET_SOCKETS`
* :kconfig:option:`CONFIG_NET_SOCKETS_POLL_MAX`
* :kconfig:option:`CONFIG_ZVFS_POLL_MAX`
* :kconfig:option:`CONFIG_ZVFS_OPEN_MAX`
* :kconfig:option:`CONFIG_POSIX_API`
* :kconfig:option:`CONFIG_POSIX_OPEN_MAX`
+1 −1
Original line number Diff line number Diff line
@@ -269,7 +269,7 @@ int modem_socket_poll(struct modem_socket_config *cfg, struct zsock_pollfd *fds,
	int ret, i;
	uint8_t found_count = 0;

	if (!cfg || nfds > CONFIG_NET_SOCKETS_POLL_MAX) {
	if (!cfg || nfds > CONFIG_ZVFS_POLL_MAX) {
		return -EINVAL;
	}
	struct k_poll_event events[nfds];
+3 −3
Original line number Diff line number Diff line
@@ -141,9 +141,9 @@ enum dns_query_type {
/** How many sockets the dispatcher is able to poll. */
#define DNS_DISPATCHER_MAX_POLL (DNS_RESOLVER_MAX_POLL + MDNS_MAX_POLL + LLMNR_MAX_POLL)

#if defined(CONFIG_NET_SOCKETS_POLL_MAX)
BUILD_ASSERT(CONFIG_NET_SOCKETS_POLL_MAX >= DNS_DISPATCHER_MAX_POLL,
	     "CONFIG_NET_SOCKETS_POLL_MAX must be larger than " STRINGIFY(DNS_DISPATCHER_MAX_POLL));
#if defined(CONFIG_ZVFS_POLL_MAX)
BUILD_ASSERT(CONFIG_ZVFS_POLL_MAX >= DNS_DISPATCHER_MAX_POLL,
	     "CONFIG_ZVFS_POLL_MAX must be larger than " STRINGIFY(DNS_DISPATCHER_MAX_POLL));
#endif

/** @brief What is the type of the socket given to DNS socket dispatcher,
Loading