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

[v1.3cherrypick] [ESP32]: add custom MRP configs for esp platform #33356

Merged
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
58 changes: 58 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1229,4 +1229,62 @@ menu "CHIP Device Layer"

endmenu

menu "Message Reliable Protocol Options"
config MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_THREAD
int "MRP local active retry interval for Thread network in milliseconds"
depends on OPENTHREAD_ENABLED
range 0 3600000
default 800
help
Base retry interval of the present Thread node when it is in the active state.

config MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_WIFI_ETHERNET
int "MRP local active retry interval for WIFI or ETHERNET network in milliseconds"
depends on !OPENTHREAD_ENABLED
range 0 3600000
default 300
help
Base retry interval of the present node (WIFI or ETHERNET) when it is in the active state.

config MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_THREAD
int "MRP local idle retry interval for Thread network in milliseconds"
depends on OPENTHREAD_ENABLED
range 0 3600000
default 800
help
Base retry interval of the present Thread node when it is in the idle state.

config MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_WIFI_ETHERNET
int "MRP local idle retry interval for WIFI or ETHERNET network in milliseconds"
depends on !OPENTHREAD_ENABLED
range 0 3600000
default 500
help
Base retry interval of the present node (WIFI or ETHERNET) when it is in the idle state.

config MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_THREAD
int "MRP retransmission delta timeout for Thread network in milliseconds"
depends on OPENTHREAD_ENABLED
range 0 3600000
default 500
help
A constant value added to the calculated retransmission timeout.

config MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_WIFI_ETHERNET
int "MRP retransmission delta timeout for WIFI or ETHERNET network in milliseconds"
depends on !OPENTHREAD_ENABLED
range 0 3600000
default 0
help
A constant value added to the calculated retransmission timeout.

config MRP_MAX_RETRANS
int "MRP retransmission maximum count"
range 1 10
default 4
help
The maximum number of retransmissions before giving up.

endmenu

endmenu
34 changes: 34 additions & 0 deletions src/platform/ESP32/CHIPPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,37 @@
#ifdef CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER
#define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER 1
#endif // CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER

#ifndef CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL
#if CHIP_ENABLE_OPENTHREAD
#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL \
chip::System::Clock::Milliseconds32(CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_THREAD)
#else
#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL \
chip::System::Clock::Milliseconds32(CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_WIFI_ETHERNET)
#endif // CHIP_ENABLE_OPENTHREAD
#endif // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL

#ifndef CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL
#if CHIP_ENABLE_OPENTHREAD
#define CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL \
chip::System::Clock::Milliseconds32(CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_THREAD)
#else
#define CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL \
chip::System::Clock::Milliseconds32(CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_WIFI_ETHERNET)
#endif // CHIP_ENABLE_OPENTHREAD
#endif // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL

#ifndef CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST
#if CHIP_ENABLE_OPENTHREAD
#define CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST \
chip::System::Clock::Milliseconds32(CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_THREAD)
#else
#define CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST \
chip::System::Clock::Milliseconds32(CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_WIFI_ETHERNET)
#endif // CHIP_ENABLE_OPENTHREAD
#endif // CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST

#ifndef CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS
#define CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS CONFIG_MRP_MAX_RETRANS
#endif // CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS
Loading