From 3f0a19a9bc9b9c6725c3677f45e13d1e11ded76a Mon Sep 17 00:00:00 2001 From: PeterKietzmann Date: Tue, 7 Jan 2020 15:36:04 +0100 Subject: [PATCH 1/2] net/gnrc/ipv6: Move config macros to 'CONFIG_' namespace --- sys/include/net/gnrc/ipv6.h | 4 ++-- sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/include/net/gnrc/ipv6.h b/sys/include/net/gnrc/ipv6.h index 38e2178ca3..d5d10b635b 100644 --- a/sys/include/net/gnrc/ipv6.h +++ b/sys/include/net/gnrc/ipv6.h @@ -140,8 +140,8 @@ extern "C" { /** * @brief Default message queue size to use for the IPv6 thread. */ -#ifndef GNRC_IPV6_MSG_QUEUE_SIZE -#define GNRC_IPV6_MSG_QUEUE_SIZE (8U) +#ifndef CONFIG_GNRC_IPV6_MSG_QUEUE_SIZE +#define CONFIG_GNRC_IPV6_MSG_QUEUE_SIZE (8U) #endif #ifdef DOXYGEN diff --git a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c index c3c526868f..aafa28f6c3 100644 --- a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c +++ b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c @@ -172,12 +172,12 @@ static void _dispatch_next_header(gnrc_pktsnip_t *pkt, unsigned nh, static void *_event_loop(void *args) { - msg_t msg, reply, msg_q[GNRC_IPV6_MSG_QUEUE_SIZE]; + msg_t msg, reply, msg_q[CONFIG_GNRC_IPV6_MSG_QUEUE_SIZE]; gnrc_netreg_entry_t me_reg = GNRC_NETREG_ENTRY_INIT_PID(GNRC_NETREG_DEMUX_CTX_ALL, sched_active_pid); (void)args; - msg_init_queue(msg_q, GNRC_IPV6_MSG_QUEUE_SIZE); + msg_init_queue(msg_q, CONFIG_GNRC_IPV6_MSG_QUEUE_SIZE); /* initialize fragmentation data-structures */ #ifdef MODULE_GNRC_IPV6_EXT_FRAG From b2f0642825b951193034c92dc7d165d3e8898759 Mon Sep 17 00:00:00 2001 From: PeterKietzmann Date: Tue, 7 Jan 2020 15:36:50 +0100 Subject: [PATCH 2/2] Kconfig: Expose gnrc/ipv6/configurations --- sys/net/gnrc/Kconfig | 1 + sys/net/gnrc/network_layer/ipv6/Kconfig | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 sys/net/gnrc/network_layer/ipv6/Kconfig diff --git a/sys/net/gnrc/Kconfig b/sys/net/gnrc/Kconfig index ed237b16d1..a26a099b8d 100644 --- a/sys/net/gnrc/Kconfig +++ b/sys/net/gnrc/Kconfig @@ -8,6 +8,7 @@ menu "GNRC Network stack" depends on MODULE_GNRC rsource "link_layer/lorawan/Kconfig" +rsource "network_layer/ipv6/Kconfig" rsource "network_layer/ipv6/blacklist/Kconfig" rsource "network_layer/ipv6/whitelist/Kconfig" diff --git a/sys/net/gnrc/network_layer/ipv6/Kconfig b/sys/net/gnrc/network_layer/ipv6/Kconfig new file mode 100644 index 0000000000..14450bd6ec --- /dev/null +++ b/sys/net/gnrc/network_layer/ipv6/Kconfig @@ -0,0 +1,19 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# +menuconfig KCONFIG_MODULE_GNRC_IPV6 + bool "Configure GNRC IPv6 module" + depends on MODULE_GNRC_IPV6 + help + Configure GNRC IPv6 module using Kconfig. + +if KCONFIG_MODULE_GNRC_IPV6 + +config GNRC_IPV6_MSG_QUEUE_SIZE + int "Default message queue size to use for the IPv6 thread" + default 8 + +endif # KCONFIG_MODULE_GNRC_IPV6