net: Use the existing logging option in Kconfig for debugging
Instead of new config option for debugging, lets re-use the existing logging option CONFIG_NETWORKING_WITH_LOGGING that is found in Kconfig. Unselecting that option will turn off the debug messages in IP stack. Change-Id: I4c1e0e91f3959304b7dc2b62d2bf73ec87cd1114 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
410d6849a6
commit
ca3d1adc43
|
@ -90,6 +90,8 @@ config NETWORKING_WITH_IPV4
|
|||
Legacy IP.
|
||||
endchoice
|
||||
|
||||
source "net/ip/Kconfig.debug"
|
||||
|
||||
config NETWORKING_STATISTICS
|
||||
bool
|
||||
prompt "Enable IP statistics gathering"
|
||||
|
@ -159,15 +161,6 @@ config RPL_WITH_OF0
|
|||
Objective function zero (OF0).
|
||||
endchoice
|
||||
|
||||
config NETWORKING_WITH_LOGGING
|
||||
bool
|
||||
prompt "Enable logging of the uIP stack"
|
||||
depends on NETWORKING
|
||||
select STDOUT_CONSOLE
|
||||
default n
|
||||
help
|
||||
Enable packet and uIP stack logging
|
||||
|
||||
config NETWORKING_WITH_LOOPBACK
|
||||
bool
|
||||
prompt "Enable loopback driver"
|
||||
|
@ -435,6 +428,4 @@ config NET_15_4_LOOPBACK_NUM
|
|||
help
|
||||
Number of times loopback test runs, 0 means infinite.
|
||||
|
||||
source "net/ip/Kconfig.debug"
|
||||
|
||||
endif
|
||||
|
|
|
@ -16,13 +16,14 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
menuconfig NETWORKING_IP_STACK_DEBUG
|
||||
bool "IP stack Debuggging options"
|
||||
menuconfig NETWORKING_WITH_LOGGING
|
||||
bool "Enable network stack logging"
|
||||
select STDOUT_CONSOLE
|
||||
default n
|
||||
help
|
||||
Enable the menu to select IP stack debugging part by part
|
||||
Enable logging in various parts of the network stack.
|
||||
|
||||
if NETWORKING_IP_STACK_DEBUG
|
||||
if NETWORKING_WITH_LOGGING
|
||||
|
||||
choice
|
||||
prompt "General debug level"
|
||||
|
@ -38,6 +39,12 @@ config NETWORK_IP_STACK_DEBUG_FULL
|
|||
bool "Print both messages and annotations"
|
||||
endchoice
|
||||
|
||||
config NETWORK_IP_STACK_DEBUG_NET_BUF
|
||||
bool "Debug network buffer allocation"
|
||||
default n
|
||||
help
|
||||
Enables printing of network buffer allocations and frees.
|
||||
|
||||
config NETWORK_IP_STACK_DEBUG_IPV6
|
||||
bool "Debug core IPv6"
|
||||
depends on NETWORKING_WITH_IPV6
|
||||
|
|
|
@ -33,6 +33,11 @@
|
|||
|
||||
#include "ip/uip.h"
|
||||
|
||||
#if !defined(CONFIG_NETWORK_IP_STACK_DEBUG_NET_BUF)
|
||||
#undef NET_DBG
|
||||
#define NET_DBG(...)
|
||||
#endif
|
||||
|
||||
extern struct net_tuple *net_context_get_tuple(struct net_context *context);
|
||||
|
||||
/* Available (free) buffers queue */
|
||||
|
|
|
@ -33,6 +33,11 @@
|
|||
|
||||
#include "ip/uip.h"
|
||||
|
||||
#if !defined(CONFIG_NETWORK_IP_STACK_DEBUG_NET_BUF)
|
||||
#undef NET_DBG
|
||||
#define NET_DBG(...)
|
||||
#endif
|
||||
|
||||
/* Available (free) layer 2 (MAC/L2) buffers queue */
|
||||
#ifndef NET_NUM_L2_BUFS
|
||||
/* Default value is 13 (receiving side) which means that max. UDP data
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#define DEBUG DEBUG_PRINT
|
||||
#ifdef CONFIG_NETWORKING_WITH_LOGGING
|
||||
#define DEBUG 1
|
||||
#endif
|
||||
#include "contiki/ip/uip-debug.h"
|
||||
|
||||
#include <nanokernel.h>
|
||||
|
|
Loading…
Reference in New Issue