File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 5050#if ( ipconfigUSE_TCP == 1 )
5151
5252/* Constants used for Smoothed Round Trip Time (SRTT). */
53- #define winSRTT_INCREMENT_NEW 2 /**< New increment for the smoothed RTT. */
54- #define winSRTT_INCREMENT_CURRENT 6 /**< Current increment for the smoothed RTT. */
55- #define winSRTT_DECREMENT_NEW 1 /**< New decrement for the smoothed RTT. */
56- #define winSRTT_DECREMENT_CURRENT 7 /**< Current decrement for the smoothed RTT. */
57- #define winSRTT_CAP_mS 50 /**< Cap in milliseconds. */
53+ #define winSRTT_INCREMENT_NEW 2 /**< New increment for the smoothed RTT. */
54+ #define winSRTT_INCREMENT_CURRENT 6 /**< Current increment for the smoothed RTT. */
55+ #define winSRTT_DECREMENT_NEW 1 /**< New decrement for the smoothed RTT. */
56+ #define winSRTT_DECREMENT_CURRENT 7 /**< Current decrement for the smoothed RTT. */
57+ #define winSRTT_CAP_mS ( ipconfigTCP_SRTT_MINIMUM_VALUE_MS ) /**< Cap in milliseconds. */
58+
5859
5960/**
6061 * @brief Utility function to cast pointer of a type to pointer of type TCPSegment_t.
Original file line number Diff line number Diff line change 373373 #define ipconfigICMP_TIME_TO_LIVE 64
374374#endif
375375
376+ #ifndef ipconfigTCP_SRTT_MINIMUM_VALUE_MS
377+
378+ /* TCP only: when measuring the Smoothed Round Trip Time (SRTT),
379+ * the result will be rounded up to a minimum value.
380+ * The default has always been 50, but a value of 1000
381+ * is recommended (see RFC6298) because hosts often delay the
382+ * sending of ACK packets with 200 ms. */
383+ #define ipconfigTCP_SRTT_MINIMUM_VALUE_MS 50U
384+ #endif
385+
376386#ifndef ipconfigUDP_MAX_RX_PACKETS
377387
378388/* Make positive to define the maximum number of packets which will be buffered
You can’t perform that action at this time.
0 commit comments