net: pkt: Add CONFIG_NET_DEBUG_NET_PKT_ALL option

This option enables full debugging output for memory allocations.
As that can produce lot of output and slow down the device under test,
it is disabled by default.
The previous CONFIG_NET_DEBUG_NET_PKT will collect information about
memory allocations but will not print any output. Use "net mem" or
"net allocs" commands in net-shell to see the memory allocation status.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2017-08-15 14:12:10 +03:00 committed by Anas Nashif
parent 6a496f87cf
commit f673a701f9
2 changed files with 17 additions and 1 deletions

View file

@ -91,7 +91,16 @@ config NET_DEBUG_NET_PKT
default n
select NET_BUF_POOL_USAGE
help
Enables printing of network packet and buffer allocations and frees.
Enables collection of network packet and buffer allocations and frees.
config NET_DEBUG_NET_PKT_ALL
bool "Debug network packet and buffer individual allocation"
default n
depends on NET_DEBUG_NET_PKT
help
Enables printing of network packet and buffer allocations and frees for
each allocation. This can produce lot of output so it is disabled by
default.
config NET_DEBUG_NET_PKT_EXTERNALS
int "How many external network packet allocations"

View file

@ -13,6 +13,13 @@
#if defined(CONFIG_NET_DEBUG_NET_PKT)
#define SYS_LOG_DOMAIN "net/pkt"
#define NET_LOG_ENABLED 1
/* This enables allocation debugging but does not print so much output
* as that can slow things down a lot.
*/
#if !defined(CONFIG_NET_DEBUG_NET_PKT_ALL)
#define NET_SYS_LOG_LEVEL 5
#endif
#endif
#include <kernel.h>