From 9dc172db2d94d7ae9d76bb2b73e3ab8cbc281c02 Mon Sep 17 00:00:00 2001 From: Paul Bartell Date: Mon, 30 Oct 2023 22:09:33 -0700 Subject: [PATCH] Use 1500 Bytes as the MTU for all FreeRTOS+TCP demos (#1105) Co-authored-by: Joseph Julicher --- .../FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSIPConfig.h | 9 ++++----- .../IPv6_Multi_WinSim_demo/FreeRTOSIPConfig.h | 9 ++++----- .../Full-TCP-Networkless/Config/FreeRTOSIPConfig.h | 9 ++++----- .../Integration/Full-TCP-Suite/Config/FreeRTOSIPConfig.h | 9 ++++----- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSIPConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSIPConfig.h index 08550f8ec5..ba6d5c18e6 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSIPConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSIPConfig.h @@ -248,11 +248,10 @@ extern UBaseType_t uxRand(); #define ipconfigUSE_TCP_WIN ( 1 ) /* The MTU is the maximum number of bytes the payload of a network frame can - * contain. For normal Ethernet V2 frames the maximum MTU is 1500. Setting a - * lower value can save RAM, depending on the buffer management scheme used. If - * ipconfigCAN_FRAGMENT_OUTGOING_PACKETS is 1 then (ipconfigNETWORK_MTU - 28) must - * be divisible by 8. */ -#define ipconfigNETWORK_MTU 1200U + * contain. Setting this to a number lower than that of the network you are + * connecting to is likely to cause dropped packets. Do not set this parameter + * lower than 1500 unless you fully understand the consequences. */ +#define ipconfigNETWORK_MTU 1500U /* Set ipconfigUSE_DNS to 1 to include a basic DNS client/resolver. DNS is used * through the FreeRTOS_gethostbyname() API function. */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_IPv6_Demo/IPv6_Multi_WinSim_demo/FreeRTOSIPConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_IPv6_Demo/IPv6_Multi_WinSim_demo/FreeRTOSIPConfig.h index 230cbf31f9..d8aa1a7b4c 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_IPv6_Demo/IPv6_Multi_WinSim_demo/FreeRTOSIPConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_IPv6_Demo/IPv6_Multi_WinSim_demo/FreeRTOSIPConfig.h @@ -232,11 +232,10 @@ extern UBaseType_t uxRand(); #define ipconfigUSE_TCP_WIN ( 1 ) /* The MTU is the maximum number of bytes the payload of a network frame can - * contain. For normal Ethernet V2 frames the maximum MTU is 1500. Setting a - * lower value can save RAM, depending on the buffer management scheme used. If - * ipconfigCAN_FRAGMENT_OUTGOING_PACKETS is 1 then (ipconfigNETWORK_MTU - 28) must - * be divisible by 8. */ -#define ipconfigNETWORK_MTU 1200U + * contain. Setting this to a number lower than that of the network you are + * connecting to is likely to cause dropped packets. Do not set this parameter + * lower than 1500 unless you fully understand the consequences. */ +#define ipconfigNETWORK_MTU 1500U /* Set ipconfigUSE_DNS to 1 to include a basic DNS client/resolver. DNS is used * through the FreeRTOS_gethostbyname() API function. */ diff --git a/FreeRTOS-Plus/Test/FreeRTOS-Plus-TCP/Integration/Full-TCP-Networkless/Config/FreeRTOSIPConfig.h b/FreeRTOS-Plus/Test/FreeRTOS-Plus-TCP/Integration/Full-TCP-Networkless/Config/FreeRTOSIPConfig.h index ff15e6c113..71eafde4ec 100644 --- a/FreeRTOS-Plus/Test/FreeRTOS-Plus-TCP/Integration/Full-TCP-Networkless/Config/FreeRTOSIPConfig.h +++ b/FreeRTOS-Plus/Test/FreeRTOS-Plus-TCP/Integration/Full-TCP-Networkless/Config/FreeRTOSIPConfig.h @@ -232,11 +232,10 @@ extern void vLoggingPrintf( const char * pcFormatString, #define ipconfigUSE_TCP_WIN ( 1 ) /* The MTU is the maximum number of bytes the payload of a network frame can - * contain. For normal Ethernet V2 frames the maximum MTU is 1500. Setting a - * lower value can save RAM, depending on the buffer management scheme used. If - * ipconfigCAN_FRAGMENT_OUTGOING_PACKETS is 1 then (ipconfigNETWORK_MTU - 28) must - * be divisible by 8. */ -#define ipconfigNETWORK_MTU 1200U + * contain. Setting this to a number lower than that of the network you are + * connecting to is likely to cause dropped packets. Do not set this parameter + * lower than 1500 unless you fully understand the consequences. */ +#define ipconfigNETWORK_MTU 1500U /* Set ipconfigUSE_DNS to 1 to include a basic DNS client/resolver. DNS is used * through the FreeRTOS_gethostbyname() API function. */ diff --git a/FreeRTOS-Plus/Test/FreeRTOS-Plus-TCP/Integration/Full-TCP-Suite/Config/FreeRTOSIPConfig.h b/FreeRTOS-Plus/Test/FreeRTOS-Plus-TCP/Integration/Full-TCP-Suite/Config/FreeRTOSIPConfig.h index 5bda665285..f3758c6596 100644 --- a/FreeRTOS-Plus/Test/FreeRTOS-Plus-TCP/Integration/Full-TCP-Suite/Config/FreeRTOSIPConfig.h +++ b/FreeRTOS-Plus/Test/FreeRTOS-Plus-TCP/Integration/Full-TCP-Suite/Config/FreeRTOSIPConfig.h @@ -226,11 +226,10 @@ extern uint32_t ulRand(); #define ipconfigUSE_TCP_WIN ( 1 ) /* The MTU is the maximum number of bytes the payload of a network frame can - * contain. For normal Ethernet V2 frames the maximum MTU is 1500. Setting a - * lower value can save RAM, depending on the buffer management scheme used. If - * ipconfigCAN_FRAGMENT_OUTGOING_PACKETS is 1 then (ipconfigNETWORK_MTU - 28) must - * be divisible by 8. */ -#define ipconfigNETWORK_MTU 1200U + * contain. Setting this to a number lower than that of the network you are + * connecting to is likely to cause dropped packets. Do not set this parameter + * lower than 1500 unless you fully understand the consequences. */ +#define ipconfigNETWORK_MTU 1500U /* Set ipconfigUSE_DNS to 1 to include a basic DNS client/resolver. DNS is used * through the FreeRTOS_gethostbyname() API function. */