Skip to content

Commit

Permalink
feat(mdns): Allow setting length of mDNS action queue in menuconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
gytxxsy committed Jul 18, 2023
1 parent ecc465d commit 28cd898
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions components/mdns/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ menu "mDNS"
higher than priorities of system tasks. Compile time warning/error
would be emitted if the chosen task priority were too high.

config MDNS_ACTION_QUEUE_LEN
int "Maximum actions pending to the server"
range 8 64
default 16
help
Allows setting the length of mDNS action queue.

config MDNS_TASK_STACK_SIZE
int "mDNS task stack size"
default 4096
Expand Down
2 changes: 1 addition & 1 deletion components/mdns/private_include/mdns_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
#define MDNS_SERVICE_ADD_TIMEOUT_MS CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS

#define MDNS_PACKET_QUEUE_LEN 16 // Maximum packets that can be queued for parsing
#define MDNS_ACTION_QUEUE_LEN 16 // Maximum actions pending to the server
#define MDNS_ACTION_QUEUE_LEN CONFIG_MDNS_ACTION_QUEUE_LEN // Maximum actions pending to the server
#define MDNS_TXT_MAX_LEN 1024 // Maximum string length of text data in TXT record
#if defined(CONFIG_LWIP_IPV6) && defined(CONFIG_MDNS_RESPOND_REVERSE_QUERIES)
#define MDNS_NAME_MAX_LEN (64+4) // Need to account for IPv6 reverse queries (64 char address + ".ip6" )
Expand Down
3 changes: 2 additions & 1 deletion components/mdns/tests/test_afl_fuzz_host/sdkconfig.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
Expand Down Expand Up @@ -290,6 +290,7 @@
#define CONFIG_MDNS_MAX_SERVICES 25
#define CONFIG_MDNS_MAX_INTERFACES 3
#define CONFIG_MDNS_TASK_PRIORITY 1
#define CONFIG_MDNS_ACTION_QUEUE_LEN 16
#define CONFIG_MDNS_TASK_STACK_SIZE 4096
#define CONFIG_MDNS_TASK_AFFINITY_CPU0 1
#define CONFIG_MDNS_TASK_AFFINITY 0x0
Expand Down

0 comments on commit 28cd898

Please sign in to comment.