1# Copyright Runtime.io 2018. All rights reserved.
2# Copyright Nordic Semiconductor ASA 2020-2022. All rights reserved.
3# SPDX-License-Identifier: Apache-2.0
4
5# The Kconfig file is dedicated to transport subdirectory of MCUmgr
6# subsystem and provides Kconfig options to control aspects of
7# transport, in general, that are not otherwise controlled by
8# options belonging to transport specifically.
9#
10# Options defined in this file should be prefixed:
11#  MCUMGR_TRANSPORT_ -- general transport options;
12#  MCUMGR_TRANSPORT_WORKQUEUE -- for workqueue configuration;
13#  MCUMGR_TRANSPORT_NETBUF -- for Net Buf related configuration.
14
15config MCUMGR_TRANSPORT_WORKQUEUE_STACK_SIZE
16	int "MCUmgr transport workqueue stack size"
17	default 2048
18	help
19	  Stack size of the MCUmgr for transport subsystem work queue.
20
21config MCUMGR_TRANSPORT_WORKQUEUE_THREAD_PRIO
22	int "MCUmgr transport workqueue thread priority"
23	default 3
24	help
25	  Scheduling priority of the MCUmgr transport subsystem work queue.
26
27config MCUMGR_TRANSPORT_REASSEMBLY
28	bool
29	help
30	  Enable structures and functions needed for packet reassembly by SMP backend.
31
32config MCUMGR_TRANSPORT_NETBUF_COUNT
33	int "Number of mcumgr buffers"
34	default 2 if MCUMGR_TRANSPORT_UDP
35	default 4
36	help
37	  The number of net_bufs to allocate for mcumgr.  These buffers are
38	  used for both requests and responses.
39
40config MCUMGR_TRANSPORT_NETBUF_SIZE
41	int "Size of each mcumgr buffer"
42	default 2048 if MCUMGR_TRANSPORT_UDP
43	default 384
44	help
45	  The size, in bytes, of each mcumgr buffer.  This value must satisfy
46	  the following relation:
47	  MCUMGR_TRANSPORT_NETBUF_SIZE >= transport-specific-MTU + transport-overhead
48	  In case when MCUMGR_TRANSPORT_SHELL is enabled this value should be set to
49	  at least MCUMGR_GRP_SHELL_BACKEND_DUMMY_BUF_SIZE + 32.
50
51config MCUMGR_TRANSPORT_NETBUF_USER_DATA_SIZE
52	int "Size of mcumgr buffer user data"
53	default 24 if MCUMGR_TRANSPORT_UDP && MCUMGR_TRANSPORT_UDP_IPV6
54	default 8 if MCUMGR_TRANSPORT_UDP && MCUMGR_TRANSPORT_UDP_IPV4
55	default 8 if MCUMGR_TRANSPORT_BT
56	default 4
57	help
58	  The size, in bytes, of user data to allocate for each mcumgr buffer.
59
60	  Different mcumgr transports impose different requirements for this
61	  setting. A value of 4 is sufficient for UART and shell, a value of 8
62	  is sufficient for Bluetooth. For UDP, the userdata must be large
63	  enough to hold a IPv4/IPv6 address.
64
65module = MCUMGR_TRANSPORT
66module-str = mcumgr_transport
67source "subsys/logging/Kconfig.template.log_config"
68
69rsource "Kconfig.dummy"
70
71rsource "Kconfig.bluetooth"
72
73rsource "Kconfig.shell"
74
75rsource "Kconfig.uart"
76
77rsource "Kconfig.udp"
78