Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnrc/pktdump : Expose Configurations to Kconfig #14071

Merged
merged 2 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion sys/include/net/gnrc/pktdump.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,29 @@
extern "C" {
#endif

/**
* @defgroup net_gnrc_pktdump_conf GNRC PKTDUMP compile configurations
* @ingroup net_gnrc_conf
* @{
*/
/**
* @brief Default message queue size for the PKTDUMP thread (as exponent of
* 2^n).
*
* As the queue size ALWAYS needs to be power of two, this option
* represents the exponent of 2^n, which will be used as the size of
* the queue.
*/
#ifndef CONFIG_GNRC_PKTDUMP_MSG_QUEUE_SIZE_EXP
#define CONFIG_GNRC_PKTDUMP_MSG_QUEUE_SIZE_EXP 3
#endif
/** @} */

/**
* @brief Message queue size for the pktdump thread
*/
#ifndef GNRC_PKTDUMP_MSG_QUEUE_SIZE
#define GNRC_PKTDUMP_MSG_QUEUE_SIZE (8U)
#define GNRC_PKTDUMP_MSG_QUEUE_SIZE (1 << CONFIG_GNRC_PKTDUMP_MSG_QUEUE_SIZE_EXP)
#endif

/**
Expand Down
1 change: 1 addition & 0 deletions sys/net/gnrc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ rsource "link_layer/lorawan/Kconfig"
rsource "netif/Kconfig"
rsource "network_layer/ipv6/Kconfig"
rsource "network_layer/sixlowpan/Kconfig"
rsource "pktdump/Kconfig"
rsource "routing/rpl/Kconfig"
rsource "transport_layer/tcp/Kconfig"

Expand Down
23 changes: 23 additions & 0 deletions sys/net/gnrc/pktdump/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) 2020 Freie Universitaet Berlin
#
# 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_PKTDUMP
bool "Configure GNRC Packet Dump"
depends on MODULE_GNRC_PKTDUMP
help
Configure the GNRC_PKTDUMP using Kconfig.

if KCONFIG_MODULE_GNRC_PKTDUMP

config GNRC_PKTDUMP_MSG_QUEUE_SIZE_EXP
int "Exponent for the queue size (resulting in the queue size 2^n)"
default 3
help
As the queue size ALWAYS needs to be power of two, this option
represents the exponent of 2^n, which will be used as the size of
the queue.

endif # KCONFIG_MODULE_GNRC_PKTDUMP