Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions doc/releases/migration-guide-4.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ Base Libraries
may include :zephyr_file:`include/zephyr/posix/posix_limits.h` for Zephyr's definitions. Some
runtime-invariant values may need to be queried via :c:func:`sysconf`.

* The number of file descriptor table size and its availability is now determined by
a ``ZVFS_OPEN_SIZE`` define instead of the :kconfig:option:`CONFIG_ZVFS_OPEN_MAX`
Kconfig option. Subsystems can specify their own custom file descriptor table size
requirements by specifying Kconfig options with the prefix ``CONFIG_ZVFS_OPEN_ADD_SIZE_``.
The old Kconfig option still exists, but will be overridden if the custom requirements
are larger. To force the old Kconfig option to be used, even when its value is less
than the indicated custom requirements, a new :kconfig:option:`CONFIG_ZVFS_OPEN_IGNORE_MIN`
option has been introduced (which defaults being disabled).

Boards
******

Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/sys/fdtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ struct zvfs_pollfd {
__syscall int zvfs_poll(struct zvfs_pollfd *fds, int nfds, int poll_timeout);

struct zvfs_fd_set {
uint32_t bitset[(CONFIG_ZVFS_OPEN_MAX + 31) / 32];
uint32_t bitset[DIV_ROUND_UP(ZVFS_OPEN_SIZE, 32)];
};

/** @brief Number of file descriptors which can be added @ref zvfs_fd_set */
Expand Down
30 changes: 30 additions & 0 deletions lib/os/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,36 @@ zephyr_sources(
thread_entry.c
)

if(CONFIG_ZVFS_OPEN_IGNORE_MIN)
set(final_fd_size ${CONFIG_ZVFS_OPEN_MAX})
else()
# Import all custom ZVFS_OPEN_ size requirements
import_kconfig(CONFIG_ZVFS_OPEN_ADD_SIZE_ ${DOTCONFIG} add_size_keys)

# Calculate the sum of all "ADD_SIZE" requirements
set(add_size_sum 0)
foreach(add_size ${add_size_keys})
math(EXPR add_size_sum "${add_size_sum} + ${${add_size}}")
endforeach()

if(CONFIG_ZVFS_OPEN_MAX LESS "${add_size_sum}")
# Only warn if default value 0 has been modified
if(NOT CONFIG_ZVFS_OPEN_MAX EQUAL 0)
message(WARNING "
CONFIG_ZVFS_OPEN_MAX is less than requested minimum:
${CONFIG_ZVFS_OPEN_MAX} < ${add_size_sum}
Setting the file descriptor size to ${add_size_sum}")
endif()

set(final_fd_size ${add_size_sum})
else()
# CONFIG_ZVFS_OPEN_MAX was greater than the sum of the requirements
set(final_fd_size ${CONFIG_ZVFS_OPEN_MAX})
endif()
endif()

zephyr_compile_definitions(ZVFS_OPEN_SIZE=${final_fd_size})

zephyr_sources_ifdef(CONFIG_FDTABLE fdtable.c)
zephyr_syscall_header_ifdef(CONFIG_FDTABLE
${ZEPHYR_BASE}/include/zephyr/sys/fdtable.h
Expand Down
24 changes: 19 additions & 5 deletions lib/os/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,27 @@ config FDTABLE

config ZVFS_OPEN_MAX
int "Maximum number of open file descriptors"
default 24 if NRF70_ENABLE_DUAL_VIF
default 16 if WIFI_NM_WPA_SUPPLICANT
default 16 if POSIX_API
default 4
default 0
help
Maximum number of open file descriptors, this includes
files, sockets, special devices, etc.
files, sockets, special devices, etc. If subsystems
specify ZVFS_OPEN_ADD_SIZE_* options, these will be added together
and the sum will be compared to the ZVFS_OPEN_MAX value.
If the sum is greater than the ZVFS_OPEN_MAX option (even if this
has the default 0 value), then the actual file descriptor count will be
rounded up to the sum of the individual requirements (unless the
ZVFS_OPEN_IGNORE_MIN option is enabled). If the final value, after
considering both this option as well as sum of the custom
requirements, ends up being zero, then no file descriptors will be
available.

config ZVFS_OPEN_IGNORE_MIN
bool "Ignore the minimum fd count requirement"
help
This option can be set to force setting a smaller file descriptor
count than what's specified by enabled subsystems. This can be useful
when optimizing memory usage and a more precise minimum fd count
is known for a given application.

config PRINTK_SYNC
bool "Serialize printk() calls"
Expand Down
4 changes: 2 additions & 2 deletions lib/os/fdtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ struct fd_entry {
#if defined(CONFIG_POSIX_DEVICE_IO)
static const struct fd_op_vtable stdinout_fd_op_vtable;

BUILD_ASSERT(CONFIG_ZVFS_OPEN_MAX >= 3, "CONFIG_ZVFS_OPEN_MAX >= 3 for CONFIG_POSIX_DEVICE_IO");
BUILD_ASSERT(ZVFS_OPEN_SIZE >= 3, "ZVFS_OPEN_SIZE >= 3 for CONFIG_POSIX_DEVICE_IO");
#endif /* defined(CONFIG_POSIX_DEVICE_IO) */

static struct fd_entry fdtable[CONFIG_ZVFS_OPEN_MAX] = {
static struct fd_entry fdtable[ZVFS_OPEN_SIZE] = {
#if defined(CONFIG_POSIX_DEVICE_IO)
/*
* Predefine entries for stdin/stdout/stderr.
Expand Down
9 changes: 7 additions & 2 deletions lib/posix/options/Kconfig.device_io
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@ config POSIX_DEVICE_IO_ALIAS_WRITE

endif # POSIX_DEVICE_IO

# Allocate fd for stdin, stdout and stderr
config ZVFS_OPEN_ADD_SIZE_POSIX
int "Amount of file descriptors used by Posix"
default 3

config POSIX_OPEN_MAX
int
default ZVFS_OPEN_MAX
default ZVFS_OPEN_ADD_SIZE_POSIX
help
The maximum number of files that a process can have open at one time. This option is not
directly user-configurable but can be adjusted via CONFIG_ZVFS_OPEN_MAX.
directly user-configurable but can be adjusted via CONFIG_ZVFS_OPEN_ADD_SIZE_POSIX.

For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
Expand Down
4 changes: 4 additions & 0 deletions modules/hostap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ config WIFI_NM_WPA_SUPPLICANT

if WIFI_NM_WPA_SUPPLICANT

config ZVFS_OPEN_ADD_SIZE_WIFI_NM_WPA_SUPPLICANT
int "Number of socket descriptors needed by hostap"
default 12

config WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP
bool "Use Zephyr kernel heap for Wi-Fi driver"
default y
Expand Down
4 changes: 4 additions & 0 deletions modules/nrf_wifi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
config ZEPHYR_NRF_WIFI_MODULE
bool

config ZVFS_OPEN_ADD_SIZE_NRF70_ENABLE_DUAL_VIF
int "Number of socket descriptors needed by nrf wifi driver"
default 8

source "modules/nrf_wifi/bus/Kconfig"
1 change: 0 additions & 1 deletion samples/drivers/video/tcpserversink/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ CONFIG_NETWORKING=y
CONFIG_NET_TCP=y
CONFIG_NET_IPV4=y
CONFIG_NET_SOCKETS=y
CONFIG_ZVFS_OPEN_MAX=6
CONFIG_POSIX_API=y

# Kernel options
Expand Down
5 changes: 0 additions & 5 deletions samples/modules/thrift/hello/client/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ CONFIG_NET_TCP=y
CONFIG_NET_IPV6=n
CONFIG_NET_IPV4=y
CONFIG_NET_SOCKETS=y
CONFIG_ZVFS_OPEN_MAX=6
CONFIG_NET_CONNECTION_MANAGER=y

# Kernel options
Expand Down Expand Up @@ -59,10 +58,6 @@ CONFIG_NET_CONFIG_NEED_IPV4=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2"

# Number of socket descriptors might need adjusting
# if there are more than 1 handlers defined.
CONFIG_ZVFS_OPEN_MAX=16

# Some platforms require relatively large stack sizes.
# This can be tuned per-board.
CONFIG_MAIN_STACK_SIZE=8192
Expand Down
4 changes: 0 additions & 4 deletions samples/modules/thrift/hello/server/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ CONFIG_NET_CONFIG_NEED_IPV4=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2"

# Number of socket descriptors might need adjusting
# if there are more than 1 handlers defined.
CONFIG_ZVFS_OPEN_MAX=16

# Some platforms require relatively large stack sizes.
# This can be tuned per-board.
CONFIG_MAIN_STACK_SIZE=8192
Expand Down
5 changes: 5 additions & 0 deletions samples/net/common/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@ config NET_SAMPLE_COMMON_TUNNEL_MY_ADDR
depends on NET_L2_IPIP
help
The value depends on your network setup.

# Generic way to allocate enough sockets for the application
config ZVFS_OPEN_ADD_SIZE_NET_SAMPLE
int "Amount of sockets needed by the networking sample"
default 0
1 change: 0 additions & 1 deletion samples/net/dns_resolve/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=n

CONFIG_ZVFS_POLL_MAX=5
CONFIG_ZVFS_OPEN_MAX=5

# Enable the DNS resolver
CONFIG_DNS_RESOLVER=y
Expand Down
1 change: 0 additions & 1 deletion samples/net/dsa/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=5
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=5
CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=1
CONFIG_NET_MAX_CONTEXTS=4
CONFIG_ZVFS_OPEN_MAX=4
CONFIG_ZVFS_POLL_MAX=4
CONFIG_NET_MAX_CONN=4

Expand Down
1 change: 1 addition & 0 deletions samples/net/lwm2m_client/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ config NET_SAMPLE_LWM2M_WAIT_DNS
Make sure we get DNS server addresses from the network
before considering the connection to be up.

source "samples/net/common/Kconfig"
source "Kconfig.zephyr"
2 changes: 1 addition & 1 deletion samples/net/lwm2m_client/boards/native_sim.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ CONFIG_DNS_SERVER1="192.0.2.2"
CONFIG_LWM2M_DNS_SUPPORT=y
CONFIG_NET_CONFIG_MY_IPV4_GW="192.0.2.2"
CONFIG_HEAP_MEM_POOL_SIZE=32768
CONFIG_ZVFS_OPEN_MAX=16
CONFIG_ZVFS_OPEN_ADD_SIZE_NET_SAMPLE=16
1 change: 0 additions & 1 deletion samples/net/mqtt_sn_publisher/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ CONFIG_NET_UDP=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=y
CONFIG_NET_SOCKETS=y
CONFIG_ZVFS_OPEN_MAX=6
CONFIG_NET_CONNECTION_MANAGER=y

# Kernel options
Expand Down
5 changes: 0 additions & 5 deletions samples/net/openthread/border_router/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ CONFIG_NET_ROUTE_MCAST=y
CONFIG_NET_SOCKETS_SERVICE=y
CONFIG_NET_CONTEXT_RECV_PKTINFO=y
CONFIG_NET_CONTEXT_RECV_HOPLIMIT=y
CONFIG_ZVFS_POLL_MAX=15
CONFIG_NET_SOCKETS_SERVICE_STACK_SIZE=12288
CONFIG_NET_MAX_CONN=12
CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=2048
Expand Down Expand Up @@ -72,10 +71,6 @@ CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=6
CONFIG_NET_IF_MAX_IPV4_COUNT=2
CONFIG_NET_IF_MAX_IPV6_COUNT=6

# Number of socket descriptors might need adjusting
# if there are more than 1 handlers defined.
CONFIG_ZVFS_OPEN_MAX=15

# DNS resolver required by DNS upstream resolver
CONFIG_DNS_RESOLVER=y
CONFIG_DNS_RESOLVER_PACKET_FORWARDING=y
Expand Down
2 changes: 0 additions & 2 deletions samples/net/prometheus/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ CONFIG_LOG=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y
CONFIG_ZVFS_OPEN_MAX=32
CONFIG_POSIX_API=y
CONFIG_FDTABLE=y
CONFIG_NET_SOCKETS_POLL_MAX=32
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_ZVFS_OPEN_MAX=32

# Prometheus
CONFIG_PROMETHEUS=y
Expand Down
1 change: 0 additions & 1 deletion samples/net/sockets/dumb_http_server_mt/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
CONFIG_TEST_RANDOM_GENERATOR=y

# POSIX options
CONFIG_ZVFS_OPEN_MAX=20
CONFIG_POSIX_API=y

# Networking config
Expand Down
1 change: 1 addition & 0 deletions samples/net/sockets/echo_client/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ config NET_SAMPLE_SEND_ITERATIONS
Send sample data this many times before exiting. A value of
zero means that the sample application is run forever.

source "samples/net/common/Kconfig"
source "Kconfig.zephyr"
2 changes: 1 addition & 1 deletion samples/net/sockets/echo_client/overlay-tls.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=4
CONFIG_NET_SOCKETS_ENABLE_DTLS=y
CONFIG_NET_SOCKETS_DTLS_MAX_FRAGMENT_LENGTH=2048
CONFIG_ZVFS_OPEN_MAX=12
CONFIG_ZVFS_OPEN_ADD_SIZE_NET_SAMPLE=9
2 changes: 1 addition & 1 deletion samples/net/sockets/echo_server/overlay-tls.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=6
CONFIG_NET_SOCKETS_ENABLE_DTLS=y
CONFIG_NET_SOCKETS_DTLS_TIMEOUT=30000
CONFIG_NET_SOCKETS_DTLS_MAX_FRAGMENT_LENGTH=2048
CONFIG_ZVFS_OPEN_MAX=20
CONFIG_ZVFS_OPEN_ADD_SIZE_NET_SAMPLE=16
2 changes: 1 addition & 1 deletion samples/net/sockets/echo_server/overlay-ws-console.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ CONFIG_NET_SOCKETS_POLL_MAX=32
CONFIG_NET_MAX_CONN=32
CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=32
CONFIG_ZVFS_EVENTFD_MAX=10
CONFIG_ZVFS_OPEN_MAX=32
CONFIG_ZVFS_OPEN_ADD_SIZE_NET_SAMPLE=24
2 changes: 1 addition & 1 deletion samples/net/sockets/echo_server/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2"

# Number of socket descriptors might need adjusting
# if there are more than 1 handlers defined.
CONFIG_ZVFS_OPEN_MAX=12
CONFIG_ZVFS_OPEN_ADD_SIZE_NET_SAMPLE=8

# How many client can connect to echo-server simultaneously
CONFIG_NET_SAMPLE_NUM_HANDLERS=1
1 change: 1 addition & 0 deletions samples/net/sockets/http_server/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ if USB_DEVICE_STACK_NEXT
source "samples/subsys/usb/common/Kconfig.sample_usbd"
endif

source "samples/net/common/Kconfig"
source "Kconfig.zephyr"
2 changes: 1 addition & 1 deletion samples/net/sockets/http_server/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CONFIG_LOG=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y
CONFIG_ZVFS_OPEN_MAX=32
CONFIG_ZVFS_OPEN_ADD_SIZE_NET_SAMPLE=24
CONFIG_POSIX_API=y
CONFIG_FDTABLE=y
CONFIG_ZVFS_POLL_MAX=32
Expand Down
1 change: 0 additions & 1 deletion samples/net/sockets/net_mgmt/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_SOCKETS=y
CONFIG_POSIX_API=y
CONFIG_ZVFS_OPEN_MAX=6
CONFIG_NET_SOCKETS_NET_MGMT=y
CONFIG_NET_MGMT_EVENT=y

Expand Down
1 change: 0 additions & 1 deletion samples/net/sockets/packet/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ CONFIG_NET_IPV4=n
CONFIG_NET_MAX_CONTEXTS=10
CONFIG_NET_SOCKETS=y
CONFIG_POSIX_API=y
CONFIG_ZVFS_OPEN_MAX=6
CONFIG_NET_CONTEXT_RCVTIMEO=y
CONFIG_NET_MGMT=y
CONFIG_NET_MGMT_EVENT=y
Expand Down
1 change: 0 additions & 1 deletion samples/net/zperf/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ CONFIG_NET_TC_TX_COUNT=1
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_SERVICE_THREAD_PRIO=-1
CONFIG_ZVFS_POLL_MAX=9
CONFIG_ZVFS_OPEN_MAX=12
CONFIG_POSIX_API=y

CONFIG_INIT_STACKS=y
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/check_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,7 @@ def check_no_undef_outside_kconfig(self, kconf):
"ZEPHYR_TRY_MASS_ERASE", # MCUBoot setting described in sysbuild
# documentation
"ZTEST_FAIL_TEST_", # regex in tests/ztest/fail/CMakeLists.txt
"ZVFS_OPEN_ADD_SIZE_", # Used as an option matching prefix
# zephyr-keep-sorted-stop
}

Expand Down
2 changes: 1 addition & 1 deletion snippets/wifi/wifi-ip/wifi-ip.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_WIFI_NM_WPA_SUPPLICANT=y

# Make sure there is enough resources for supplicant and most of the samples
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_ZVFS_OPEN_MAX=24
CONFIG_ZVFS_OPEN_ADD_SIZE_NET=10
CONFIG_NET_MAX_CONN=10
CONFIG_ZVFS_POLL_MAX=10

Expand Down
2 changes: 1 addition & 1 deletion snippets/wifi/wifi-ipv4/wifi-ipv4.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_WIFI_NM_WPA_SUPPLICANT=y

# Make sure there is enough resources for supplicant and most of the samples
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_ZVFS_OPEN_MAX=24
CONFIG_ZVFS_OPEN_ADD_SIZE_NET=10
CONFIG_NET_MAX_CONN=10
CONFIG_ZVFS_POLL_MAX=10

Expand Down
2 changes: 1 addition & 1 deletion snippets/wifi/wifi-ipv6/wifi-ipv6.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_WIFI_NM_WPA_SUPPLICANT=y

# Make sure there is enough resources for supplicant and most of the samples
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_ZVFS_OPEN_MAX=24
CONFIG_ZVFS_OPEN_ADD_SIZE_NET=10
CONFIG_NET_MAX_CONN=10
CONFIG_ZVFS_POLL_MAX=10

Expand Down
4 changes: 4 additions & 0 deletions subsys/net/ip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,10 @@ config NET_MAX_CONTEXTS
is used when listening or sending network traffic. This is very
similar as one could call a network socket in some other systems.

config ZVFS_OPEN_ADD_SIZE_NET
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wonder if we should do the same for the TLS sockets (for config NET_SOCKETS_TLS_MAX_CONTEXTS, if enabled). I think those TLS contexts should add up to the regular net contexts to represent the acutal limit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can add sub-option for TLS contexts.

int "Number of network sockets to allocate"
default NET_MAX_CONTEXTS

config NET_CONTEXT_NET_PKT_POOL
bool "Net_buf TX pool / context"
default y if NET_TCP && NET_6LO
Expand Down
2 changes: 1 addition & 1 deletion subsys/net/lib/dns/dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ NET_BUF_POOL_DEFINE(dns_msg_pool, DNS_RESOLVER_BUF_CTR,

static struct socket_dispatch_table {
struct dns_socket_dispatcher *ctx;
} dispatch_table[CONFIG_ZVFS_OPEN_MAX];
} dispatch_table[ZVFS_OPEN_SIZE];

static int dns_dispatch(struct dns_socket_dispatcher *dispatcher,
int sock, struct sockaddr *addr, size_t addrlen,
Expand Down
Loading
Loading