1# Network buffer configuration options
2
3# Copyright (c) 2015 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig NET_BUF
7	bool "Network buffer support"
8	help
9	  This option enables support for generic network protocol
10	  buffers.
11
12if NET_BUF
13
14config NET_BUF_LOG
15	bool "Network buffer logging"
16	select LOG
17	help
18	  Enable logs and checks for the generic network buffers.
19
20module = NET_BUF
21module-str = net_buf
22source "subsys/logging/Kconfig.template.log_config"
23
24if NET_BUF_LOG
25
26config NET_BUF_WARN_ALLOC_INTERVAL
27	int "Interval of Network buffer allocation warnings"
28	default 1
29	range 0 60
30	help
31	  Interval in seconds of Network buffer allocation warnings which are
32	  generated when a buffer cannot immediately be allocated with K_FOREVER
33	  which may lead to deadlocks. Setting it to 0 makes warnings to be
34	  printed only once per allocation.
35
36config NET_BUF_SIMPLE_LOG
37	bool "Network buffer memory debugging"
38	select LOG
39	help
40	  Enable extra debug logs and checks for the generic network buffers.
41
42endif # NET_BUF_LOG
43
44config NET_BUF_POOL_USAGE
45	bool "Network buffer pool usage tracking"
46	help
47	  Enable network buffer pool tracking. This means that:
48	  * amount of free buffers in the pool is remembered
49	  * total size of the pool is calculated
50	  * pool name is stored and can be shown in debugging prints
51
52config NET_BUF_ALIGNMENT
53	int "Network buffer alignment restriction"
54	default 0
55	help
56	  Alignment restriction for network buffers. This is useful for
57	  some hardware IP with DMA that requires the buffers to be aligned
58	  to a certain byte boundary, or dealing with cache line restrictions.
59	  Default value of 0 means the alignment will be the size of a void pointer,
60	  any other value will force the alignment of a net buffer in bytes.
61
62endif # NET_BUF
63